Hello!
Can someone tell me or suggest why does getconf returns
total available to a physical machine
cpu count, and not LDOM allocated processor/vcpu count ?
ttip$ getconf -a | grep PROCESSORS
_NPROCESSORS_CONF 256
_NPROCESSORS_ONLN 16
i believe, nproc (from coreutils) use getconf as well :
ttip$ nproc --all
256
ttip$ nproc
16
But this LDOM is defined as following (16 vcpus allocated):
# ldm list
NAME STATE FLAGS CONS VCPU MEMORY UTIL NORM UPTIME
ttip active -n---- 5004 16 32G 0.0% 0.0% 3h 1m
Just to compare, if we take power systems (ppc64) LPAR, it reports only LPAR allocated CPU count (not physical machine available cpu/core count).
I'm raising this issue, because some userspace tools use nproc to run parallel make for example. And starting from 4.15+ (but not on 4.14) kernel overcommited CPU usage (for example, using make -j256 on a LDOM with 16 vcpus allocated) gets me to the following (reproducible):
Message from syslogd@ttip at Apr 3 14:53:15 ...
kernel:[ 942.850499] BUG: workqueue lockup - pool cpus=8 node=0 flags=0x0 nice=0 stuck for 36s!
Apr 03 14:53:15 ttip kernel: BUG: workqueue lockup - pool cpus=8 node=0 flags=0x0 nice=0 stuck for 36s!
Apr 03 14:53:15 ttip kernel: Showing busy workqueues and worker pools:
Apr 03 14:53:15 ttip kernel: workqueue mm_percpu_wq: flags=0x8
Apr 03 14:53:15 ttip kernel: pwq 16: cpus=8 node=0 flags=0x0 nice=0 active=1/256
Apr 03 14:53:15 ttip kernel: pending: vmstat_update
Apr 03 14:53:15 ttip kernel: workqueue xfs-sync/dm-0: flags=0x4
Apr 03 14:53:15 ttip kernel: pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/256
Apr 03 14:53:15 ttip kernel: pending: xfs_log_worker [xfs]
^C
Message from syslogd@ttip at Apr 3 14:53:45 ...
kernel:[ 972.929725] BUG: workqueue lockup - pool cpus=8 node=0 flags=0x0 nice=0 stuck for 66s!
Message from syslogd@ttip at Apr 3 14:54:15 ...
kernel:[ 1003.008979] BUG: workqueue lockup - pool cpus=8 node=0 flags=0x0 nice=0 stuck for 96s!
Message from syslogd@ttip at Apr 3 14:54:46 ...
kernel:[ 1033.088189] BUG: workqueue lockup - pool cpus=8 node=0 flags=0x0 nice=0 stuck for 126s!
Message from syslogd@ttip at Apr 3 14:55:16 ...
kernel:[ 1063.166574] BUG: workqueue lockup - pool cpus=8 node=0 flags=0x0 nice=0 stuck for 156s!
Message from syslogd@ttip at Apr 3 14:55:46 ...
kernel:[ 1093.244982] BUG: workqueue lockup - pool cpus=8 node=0 flags=0x0 nice=0 stuck for 186s!
This messages occasionally lead to machine/LDOM being unstable, i.e. with some lockups to processes.