Project

General

Profile

Actions

Bug #17335

closed

cf-agent writes a lot of times to performance db

Added by Benoît PECCATTE over 4 years ago. Updated over 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

Also available in: Atom PDF