Project

General

Profile

Actions

Bug #17335

closed

cf-agent writes a lot of times to performance db

Added by Benoît PECCATTE almost 4 years ago. Updated almost 4 years ago.

Status:
Released
Priority:
N/A
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:

Description

This impacts a lots on io of the machine (almost half a typical run)
It should be done only when configured to, but it is forced for all file promises.

Here is the line to analyse a trace:

strace -t -e trace=%desc -o /tmp/trace -f rudder agent run -ui
grep -E "open|write" trace4 | ./script.pl

And the script

#!/usr/bin/perl

while(<>) {
  if (/openat\(.*?, *"(.*?)".*= *-1 ENOENT/) {
  } elsif (/openat\(.*?, *"(.*?)".*= *(\d+)$/) {
    $fd{$2} = $1;
  } elsif (/openat\(.*?, *"(.*?)".*unfinished/) {
    $lastfile = $1;
  } elsif (/openat resumed.*= *-1 ENOENT/) {
  } elsif (/openat resumed.*= *(\d+)$/) {
    $fd{$1} = $lastfile;
  } elsif (/writev?\((\d+),.*= *(\d+)$/) {
    $sum{$fd{$1}} += $2;
  } elsif (/pwrite64\((\d+),.*= *(\d+)$/) {
    $sum{$fd{$1}} += $2;
  } elsif (/write\((\d+),.*unfinished/) {
    $lastfd = $1;
  } elsif (/write resumed.*= *(\d+)$/) {
    $sum{$fd{$lastfd}} += $1;
  } elsif (/read\(/) {
  } elsif (/read resumed/) {
  } else {
    print("unhandled line $_");
  }
}

foreach $k (keys %sum) {
  $kb = int($sum{$k}/1024);
  print "$kb  $k\n";
}


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #17371: Agent consuming lots of IO and resources at each runReleasedAlexis MoussetActions
Actions #1

Updated by Benoît PECCATTE almost 4 years ago

  • Status changed from New to In progress
  • Assignee set to Benoît PECCATTE
Actions #2

Updated by Benoît PECCATTE almost 4 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Benoît PECCATTE to Alexis Mousset
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/2266
Actions #3

Updated by Benoît PECCATTE almost 4 years ago

  • Status changed from Pending technical review to Pending release
Actions #4

Updated by Benoît PECCATTE almost 4 years ago

  • Related to Bug #17371: Agent consuming lots of IO and resources at each run added
Actions #5

Updated by Vincent MEMBRÉ almost 4 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 6.1.0~beta3 which was released today.

Actions

Also available in: Atom PDF