Tag Info

New answers tagged

0

I realize that this is straying from the original question, but it is staying on the theme of efficiency (you mention "huge strains on my server")... I'm inferring (or guessing!) from what you've posted that you are creating a tar containing a set of files and then gzip-ing the result. You could save yourself a lot of disk I/O (and temporary space ...


0

While the next will not help you on memory swapping, it should help you on IO impact of your process. It seems that you should explicit set the level as well. ionice -c2 -n5 ./slowscript.sh C2 alone might not be enough, depending on your kernel. Qoute from the manpage (man ionice) Note that before kernel 2.6.26 a process that has not asked ...


1

You cannot limit "pace" of consuming memory, but you can limit it's total memory usage via various different mechanisms. 1) security limits Limit memory usage for user running the process via /etc/security/limits.conf. This may not work in your case if you are running this process as the same user working on different stuff. Example: username hard as ...


0

Inspired by zhihui's answer, what I actually used: renice -n <niceness> -p `ps --no-heading -Lo tid <PID>`


4

I'd take a different approach... No, I wouldn't mess around with nice for this. And gzip isn't that great. Plus, you're using gzip -9 which gives the greatest compression rates at the expense of CPU. Do you really need that level of compression over the default (level 6)? Does your system get strained as much if you don't use gzip level 9? What are the ...


6

There are caveats to pay attention to. Since the question doesn't specify an exact OS (but implies it is some Unix like OS), the list of caveats will depend on specific OS and version. The most important to keep in mind are: nice is intended to affect how much CPU time is given to a process, but not how much RAM or I/O capacity. Thus instead of the intended ...



Top 50 recent answers are included