Amanda-Users

Re: Amanda Processes using too much of the system CPU, how to thr ottle back

2004-07-02 03:32:47
Subject: Re: Amanda Processes using too much of the system CPU, how to thr ottle back
From: Paul Bijnens <paul.bijnens AT xplanation DOT com>
To: donald.ritchey AT exeloncorp DOT com
Date: Fri, 02 Jul 2004 09:22:12 +0200
donald.ritchey AT exeloncorp DOT com wrote:

Unfortunately, no, 'tar' is not an option, but the suggestion about a dump
wrapper seems to fit our situation.  I will try the suggestion and see what
results from it.

For a complete different problem, I once wrote this quick hack,
called "slowdown".
Maybe it give some inspiration, or you can insert in a pipe just
after vdump in the dumpwrapper.


============= cut here ==============
#!/usr/bin/perl

# slow throughput down to X bytes per seconds (default = 128k/s)
# Usage:  somefastprogram | slowdown 32k | ...

$BS=shift || '128k';
$BS =~ s/(\d+)k/$1 * 1024/ie;
$BS =~ s/(\d+)M/$1 * 1024 * 1024/ie;

while ($n = read(STDIN, $buf, $BS)) {
        syswrite(STDOUT, $buf, $n)  ||  die("$0: syswrite: $!\n");
        sleep 1;
}

============= cut here ==============


--
Paul Bijnens, Xplanation                            Tel  +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM    Fax  +32 16 397.512
http://www.xplanation.com/          email:  Paul.Bijnens AT xplanation DOT com
***********************************************************************
* I think I've got the hang of it now:  exit, ^D, ^C, ^\, ^Z, ^Q, F6, *
* quit,  ZZ, :q, :q!,  M-Z, ^X^C,  logoff, logout, close, bye,  /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt,  abort,  hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e,  kill -1 $$,  shutdown, *
* kill -9 1,  Alt-F4,  Ctrl-Alt-Del,  AltGr-NumLock,  Stop-A,  ...    *
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out          *
***********************************************************************



<Prev in Thread] Current Thread [Next in Thread>