0

I want to be sure that a scheduled job, mostly using gzip, will not impact the production.
This is an old Linux server with few CPU, it has SAN attachment so the gzip is running at its maximum using 99% of a processor.
I thought to use nice to reduce the impact on the service but as the other processes of the server are running for a long time their priority should be lower.
It is unclear to me how a "young" gzip process with a high nice value will compete for the CPU against "old" server processes could someone explain it here.

Edit: The vmstat during gzip operation (server is a cluster, cpu is idle at start because I ran the GZIP test on the failover node to not impact the production).

procs     -----------memory----------  ---swap-- -----io---- -system-- -----cpu------
 r  b   swpd     free    buff   cache   si   so    bi    bo   in   cs us sy id wa st
 0  0  34372 26589240 3160636 2233220    0    0    26    30    5    0  1  2 97  0  0
 1  0  34372 26589108 3160636 2233220    0    0     0     0  388  731  0  1 99  0  0
 0  0  34372 26589108 3160636 2233220    0    0     0    30  386  753  0  1 99  0  0
 1  0  34372 26589172 3160636 2233220    0    0     0     0  379  751  0  0 100 0  0
 1  0  34372 26588668 3160636 2233220    0    0     0     0  563  714 18  1 81  0  0  -- gzip starts
 1  0  34372 26588852 3160636 2233220    0    0     0     2  832 1194 25  3 72  0  0
 5  1  34372 26585692 3160656 2233228    0    0     0   656  785 1288 26  4 68  3  0
 2  0  34372 26585296 3160656 2233284    0    0     0     0  829 1390 27  4 70  0  0
 1  0  34372 26588524 3160656 2233292    0    0     0     0  641  860 25  2 74  0  0
 1  0  34372 26588464 3160656 2233288    0    0     0     0  638  710 25  1 74  0  0
 1  0  34372 26588464 3160656 2233288    0    0     0     2  788 1127 26  3 72  0  0
 2  0  34372 26588464 3160656 2233288    0    0     0     0  627  738 25  1 74  0  0
 1  0  34372 26588488 3160656 2233288    0    0     0     0  629  747 25  1 74  0  0
 1  0  34372 26588568 3160656 2233280    0    0     0    16  600  722 25  1 75  0  0
 1  0  34372 26588584 3160660 2233276    0    0     0    54  636  726 25  1 74  0  0
 1  0  34372 26588484 3160660 2233272    0    0     0     0  836 1137 26  3 71  0  0
 2  0  34372 26588352 3160660 2233272    0    0     0     0  618  751 25  1 74  0  0
 1  0  34372 26588180 3160660 2233272    0    0     0     0  634  781 25  1 74  0  0
 1  0  34372 26588188 3160660 2233272    0    0     0    72  606  750 25  1 75  0  0
 1  0  34372 26588220 3160660 2233272    0    0     0     0  620  760 25  1 74  0  0
 1  0  34372 26588800 3160660 2233276    0    0     0     0  828 1139 26  3 72  0  0
 1  0  34372 26588676 3160660 2233272    0    0     0     0  632  737 25  1 74  0  0
 1  0  34372 26588676 3160660 2233272    0    0     0     0  627  732 25  1 74  0  0
 1  0  34372 26588716 3160668 2233272    0    0     0    34  606  721 24  1 74  0  0
 1  0  34372 26588716 3160668 2233272    0    0     0     0  636  731 25  1 74  0  0
 0  0  34372 26589184 3160668 2233272    0    0     0     4  679 1162  2  2 96  0  0  -- gzip finish
 1  0  34372 26589308 3160668 2233272    0    0     0     0  371  745  0  1 99  0  0
  • probably I/O bound...have a look at ionice – Rui F Ribeiro Mar 2 '16 at 11:51
  • please add to the post the output of vmstat – Rui F Ribeiro Mar 2 '16 at 12:56
  • 1
    look at chrt -i to schedule a process for idle cpu on linux. – meuh Mar 2 '16 at 13:26
  • 1
    @meuh thank you. The man chrt directed me to man 2 sched_setscheduler which is really informative. – Emmanuel Mar 2 '16 at 13:44
  • @RuiFRibeiro IO are fast compared to the CPU, that is why the gzip can reach near 100% cpu usage – Emmanuel Mar 2 '16 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.