pigz seems do not using all cpu core

rpereyra

Member
Apr 24, 2008
18
0
51
Hello


I've configured pigz to use for backup process, and seems do not using all cpu core:

I do not see any difference with gzip backup in the time backup.

cpu usage is always below 50%.

Any help ? I doing some wrong ?

roberto


This is the top process:

----------------------

Code:
Tasks:  84 total,   1 running,  75 sleeping,   0 stopped,   8 zombie
Cpu(s):  7.3%us,  1.0%sy,  4.5%ni, 86.1%id,  0.9%wa,  0.0%hi,  0.0%si,  0.2%st
Mem:   2621440k total,  1255892k used,  1365548k free,        0k buffers
Swap:        0k total,        0k used,        0k free,   821628k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                        
29235 root      39  19 60796 4604  516 S 17.6  0.2   0:03.78 /usr/local/cpanel/3rdparty/bin/pigz -1 --processes 4 --blocksize 128           
18259 mysql     20   0  151m  41m 4092 S 12.0  1.6   1119:07 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=
----------------------

and cat /dev/cpuinfo output:

Code:
[email protected] [/]# cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 45
model name	: Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz
stepping	: 7
cpu MHz		: 2300.006
cache size	: 15360 KB
physical id	: 0
siblings	: 12
core id		: 0
cpu cores	: 6
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 x2apic popcnt aes xsave avx lahf_lm arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid
bogomips	: 4600.01
clflush size	: 64
cache_alignment	: 64
address sizes	: 46 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 45
model name	: Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz
stepping	: 7
cpu MHz		: 2300.006
cache size	: 15360 KB
physical id	: 0
siblings	: 12
core id		: 1
cpu cores	: 6
apicid		: 2
initial apicid	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 x2apic popcnt aes xsave avx lahf_lm arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid
bogomips	: 4600.01
clflush size	: 64
cache_alignment	: 64
address sizes	: 46 bits physical, 48 bits virtual
power management:

processor	: 2
vendor_id	: GenuineIntel
cpu family	: 6
model		: 45
model name	: Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz
stepping	: 7
cpu MHz		: 2300.006
cache size	: 15360 KB
physical id	: 0
siblings	: 12
core id		: 2
cpu cores	: 6
apicid		: 4
initial apicid	: 4
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 x2apic popcnt aes xsave avx lahf_lm arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid
bogomips	: 4600.01
clflush size	: 64
cache_alignment	: 64
address sizes	: 46 bits physical, 48 bits virtual
power management:

processor	: 3
vendor_id	: GenuineIntel
cpu family	: 6
model		: 45
model name	: Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz
stepping	: 7
cpu MHz		: 2300.006
cache size	: 15360 KB
physical id	: 0
siblings	: 12
core id		: 3
cpu cores	: 6
apicid		: 6
initial apicid	: 6
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 x2apic popcnt aes xsave avx lahf_lm arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid
bogomips	: 4600.01
clflush size	: 64
cache_alignment	: 64
address sizes	: 46 bits physical, 48 bits virtual
power management:
 
Last edited:

Eric

Well-Known Member
Nov 25, 2007
752
12
143
Texas
cPanel Access Level
Root Administrator
Howdy,

What do you have pigz set to in tweak settings? It defaults to 4 but you have a really beefy server and might be able to go faster. Just keep in mind you want to leave some resources to host sites with too. :D

Thanks!
 

rpereyra

Member
Apr 24, 2008
18
0
51
Howdy,

What do you have pigz set to in tweak settings? It defaults to 4 but you have a really beefy server and might be able to go faster. Just keep in mind you want to leave some resources to host sites with too. :D

Thanks!
Hi

These are my settings:

gzip compression level = 1 (I want fast compression)

Number of pigz processes = 4 (my core number)

Number of kilobyte chunks per compression work unit = 128 (default)

I did one compression test with a big files:

-----------------------------------------------
/usr/local/cpanel/3rdparty/bin/pigz -1 test.tar

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29564 root 20 0 60796 4604 512 S 323.5 0.2 0:11.81 pigz
----------------------------------------

You may see, in one case less than 20% of the cpu (cpanel backup) and when use pigz only I have over 300%.

best regard

roberto
 

eugenevdm.host

Active Member
Oct 21, 2019
42
5
8
Cape Town
cPanel Access Level
DataCenter Provider
On my 16 core processor, I have "Number of pigz processes"set to 16.

When I run the backup command from the command line:
Bash:
/usr/local/cpanel/bin/backup
Then I do HTOP I can see lots of processes and cores look evenly split, but see attached PRTG image, there is appears only one core is working hard, and the rest are resting.

Any ideas where to look next?
 

Attachments