Tiny Core Base > TCB Bugs

Udevadm trigger spawns hundreds of processes

<< < (2/3) > >>

curaga:
28 was measured to keep the minimum RAM requirement in place, IIRC. On 64-bit, the patch wasn't applied as 64-bit systems generally have the RAM to run 128*180kb = 23mb worth of udev processes.

Rich:
Hi curaga
If each  /sbin/udevd --daemon  line in the listing andyj posted is a separate process, he's got 369 of them running.

andyj:
Apparently the max number of children is based on RAM so the more memory you have the worse the problem gets. Anyway, there's an easy fix. Add "udev.children-max=24" to the kernel command line. Why 24? Because my VM has 4 CPU's and 1 active process and 5 waiting per CPU seemed like enough. I'm not sure how to find the best answer. But it does seem to me the limiting factor to how many you could reasonably run would be the number of CPU's and not RAM. I'm still not sure why it's doing what it does. And it looks to me like each child spawns a modprobe so between the two that 7.5 megs each and 1 active and 11 waiting per CPU, ignoring all the other processes already running.


--- Code: ---tc@box:~$ sudo udevadm trigger; usleep 300000; ps faux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         2  0.0  0.0      0     0 ?        S    01:00   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        I    01:00   0:00  \_ [kworker/0:0]
root         4  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [kworker/0:0H]
root         6  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [mm_percpu_wq]
root         7  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [ksoftirqd/0]
root         8  0.0  0.0      0     0 ?        I    01:00   0:00  \_ [rcu_sched]
root         9  0.0  0.0      0     0 ?        I    01:00   0:00  \_ [rcu_bh]
root        10  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [migration/0]
root        11  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [cpuhp/0]
root        12  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [cpuhp/1]
root        13  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [migration/1]
root        14  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [ksoftirqd/1]
root        15  0.0  0.0      0     0 ?        I    01:00   0:00  \_ [kworker/1:0]
root        16  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [kworker/1:0H]
root        17  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [cpuhp/2]
root        18  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [migration/2]
root        19  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [ksoftirqd/2]
root        21  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [kworker/2:0H]
root        22  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [cpuhp/3]
root        23  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [migration/3]
root        24  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [ksoftirqd/3]
root        25  0.0  0.0      0     0 ?        I    01:00   0:00  \_ [kworker/3:0]
root        26  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [kworker/3:0H]
root        27  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [netns]
root        28  0.0  0.0      0     0 ?        I    01:00   0:00  \_ [kworker/0:1]
root        29  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [oom_reaper]
root        30  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [writeback]
root        31  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [kcompactd0]
root        32  0.0  0.0      0     0 ?        SN   01:00   0:00  \_ [ksmd]
root        33  0.0  0.0      0     0 ?        SN   01:00   0:00  \_ [khugepaged]
root        34  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [crypto]
root        35  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [kintegrityd]
root        36  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [kblockd]
root        38  0.0  0.0      0     0 ?        I    01:00   0:00  \_ [kworker/2:1]
root        39  0.0  0.0      0     0 ?        I    01:00   0:00  \_ [kworker/3:1]
root        40  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [ata_sff]
root        41  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [devfreq_wq]
root        42  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [watchdogd]
root        43  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [rpciod]
root        44  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [xprtiod]
root        48  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [kswapd0]
root        49  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [nfsiod]
root        83  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [acpi_thermal_pm]
root        84  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_0]
root        85  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_0]
root        86  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [vmw_pvscsi_wq_0]
root        87  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [nvme-wq]
root        90  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_1]
root        91  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_1]
root        92  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_2]
root        93  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_2]
root        94  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_3]
root        95  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_3]
root        96  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_4]
root        97  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_4]
root        98  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_5]
root        99  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_5]
root       100  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_6]
root       101  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_6]
root       102  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_7]
root       103  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_7]
root       104  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_8]
root       105  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_8]
root       106  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_9]
root       107  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_9]
root       108  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_10]
root       109  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_10]
root       110  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_11]
root       111  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_11]
root       112  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_12]
root       113  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_12]
root       114  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_13]
root       115  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_13]
root       116  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_14]
root       117  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_14]
root       118  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_15]
root       119  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_15]
root       120  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_16]
root       121  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_16]
root       122  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_17]
root       123  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_17]
root       124  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_18]
root       125  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_18]
root       126  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_19]
root       127  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_19]
root       128  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_20]
root       129  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_20]
root       130  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_21]
root       131  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_21]
root       132  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_22]
root       133  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_22]
root       134  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_23]
root       135  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_23]
root       136  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_24]
root       137  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_24]
root       138  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_25]
root       139  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_25]
root       140  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_26]
root       141  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_26]
root       142  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_27]
root       143  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_27]
root       144  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_28]
root       145  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_28]
root       146  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_29]
root       147  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_29]
root       148  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_30]
root       149  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_30]
root       153  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_31]
root       155  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_31]
root       157  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [scsi_eh_32]
root       159  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [scsi_tmf_32]
root       166  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [vfio-irqfd-clea]
root       183  0.0  0.0      0     0 ?        I    01:00   0:00  \_ [kworker/u128:31]
root       187  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [kstrp]
root       205  0.0  0.0      0     0 ?        I    01:00   0:00  \_ [kworker/2:3]
root       206  0.0  0.0      0     0 ?        I    01:00   0:00  \_ [kworker/1:2]
root      1339  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [jbd2/sda1-8]
root      1341  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [ext4-rsv-conver]
root      1498  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [kworker/3:1H]
root      1513  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [kworker/0:1H]
root      1634  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [kworker/1:1H]
root      1640  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [kworker/2:1H]
root      3448  0.0  0.0      0     0 ?        I<   01:00   0:00  \_ [ttm_swap]
root      3449  0.0  0.0      0     0 ?        S    01:00   0:00  \_ [irq/16-vmwgfx]
root      9733  0.0  0.0      0     0 ?        I    01:14   0:00  \_ [kworker/u128:0]
root     12929  0.0  0.0      0     0 ?        I    01:19   0:00  \_ [kworker/u128:1]
root         1  0.0  0.0  10064   988 ?        Ss   01:00   0:00 /sbin/init
root       239  2.3  0.1  13104  6648 ?        Rs   01:00   0:35 /sbin/udevd --daemon
root     24890  0.8  0.1  13104  6504 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32808  0.0  0.0    676     4 ?        R    01:25   0:00  |   \_ [modprobe]
root     24891  0.7  0.1  13104  6504 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     25664  0.7  0.1  13104  6500 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32788  0.0  0.0  10064  1140 ?        R    01:25   0:00  |   \_ /sbin/modprobe -bv acpi:PNP0C02:
root     25666  0.5  0.1  13104  6504 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32789  0.0  0.0  10064  1136 ?        S    01:25   0:00  |   \_ /sbin/modprobe -bv acpi:VMW0001:VM_GEN_COUNTER:PNP0C02:
root     25667  0.3  0.1  13104  6500 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32809  0.0  0.1  13104  5044 ?        R    01:25   0:00  |   \_ /sbin/udevd --daemon
root     25668  0.5  0.1  13104  6500 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32790  0.0  0.0  10064  1020 ?        D    01:25   0:00  |   \_ /sbin/modprobe -bv acpi:APP0001:SMC-SANTAROSA:
root     25670  0.4  0.1  13104  6500 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32807  0.0  0.1  13104  5044 ?        R    01:25   0:00  |   \_ /sbin/udevd --daemon
root     25671  0.4  0.1  13104  6492 ?        R    01:24   0:00  \_ /sbin/udevd --daemon
root     32792  0.0  0.0      0     0 ?        Z    01:25   0:00  |   \_ [modprobe] <defunct>
root     25672  0.4  0.1  13104  6500 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32791  0.0  0.0  10064   968 ?        D    01:25   0:00  |   \_ /sbin/modprobe -bv acpi:PNP0100:
root     25673  0.3  0.1  13104  6488 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     25674  0.4  0.1  13104  6428 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32794  0.0  0.0  10064   972 ?        D    01:25   0:00  |   \_ /sbin/modprobe -bv acpi:PNP0200:
root     25675  0.3  0.1  13104  6424 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32796  0.0  0.0  10064  1136 ?        D    01:25   0:00  |   \_ /sbin/modprobe -bv acpi:PNP0303:
root     25676  0.3  0.1  13104  6428 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32795  0.0  0.0  10064  1136 ?        D    01:25   0:00  |   \_ /sbin/modprobe -bv acpi:PNP0400:
root     25677  0.3  0.1  13104  6424 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32798  0.0  0.0  10064   976 ?        D    01:25   0:00  |   \_ /sbin/modprobe -bv acpi:PNP0400:
root     25678  0.3  0.1  13104  6424 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32797  0.0  0.0  10064  1140 ?        D    01:25   0:00  |   \_ /sbin/modprobe -bv acpi:PNP0501:
root     25679  0.3  0.1  13104  6424 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     25680  0.3  0.1  13104  6500 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32784  0.0  0.0  10064  1140 ?        D    01:25   0:00  |   \_ /sbin/modprobe -bv acpi:LNXCPU:
root     25681  0.3  0.1  13104  6500 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     25682  0.3  0.1  13104  6500 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32799  0.0  0.0  10064  1140 ?        D    01:25   0:00  |   \_ /sbin/modprobe -bv acpi:PNP0501:
root     25683  0.3  0.1  13104  6428 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32801  0.0  0.0      0     0 ?        R    01:25   0:00  |   \_ [modprobe]
root     25684  0.3  0.1  13104  6496 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32802  0.0  0.0  10064  1028 ?        D    01:25   0:00  |   \_ /sbin/modprobe -bv acpi:PNP0501:
root     25686  0.3  0.1  13104  6492 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32805  0.0  0.0  10064   980 ?        D    01:25   0:00  |   \_ /sbin/modprobe -bv acpi:PNP0501:
root     25687  0.3  0.1  13104  6424 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32804  0.0  0.0  10064  1140 ?        R    01:25   0:00  |   \_ /sbin/modprobe -bv acpi:PNP0501:
root     25688  0.3  0.1  13104  6400 ?        S    01:24   0:00  \_ /sbin/udevd --daemon
root     32803  0.0  0.0  10064  1136 ?        D    01:25   0:00      \_ /sbin/modprobe -bv acpi:PNP0501:
root      1217  0.0  0.0  10064   108 ?        Ss   01:00   0:00 /sbin/syslogd
root      1219  0.0  0.0  10064   100 ?        Ss   01:00   0:00 /sbin/klogd
root      3548  0.0  0.0 208872   524 ?        Ssl  01:00   0:00 vmware-vmblock-fuse -o subtype=vmware-vmblock,default_permissions,allow_other /var/run/vmblock-fuse
root      3556  0.1  0.2 106272  9644 ?        S    01:00   0:02 /usr/local/bin/vmtoolsd
tc        6807  0.0  0.0  12176  2504 tty1     Ss+  01:00   0:00 -sh
tc        6843  0.0  0.0 169352  3100 ?        Ssl  01:00   0:00 vmhgfs-fuse /mnt/hgfs
root      8063  1.1  1.5 320336 61572 tty2     Ssl+ 01:00   0:17 /usr/local/lib/xorg/Xorg -nolisten tcp
tc        8068  0.0  0.1  51156  6248 tty1     S    01:00   0:00 flwm_topside
tc        8521  0.2  1.1 349320 45708 tty1     S    01:00   0:03 /usr/local/bin/vmtoolsd -n vmusr --blockFd 3
tc        8589  0.0  0.2  80228  8180 tty1     S    01:00   0:00 wbar
tc        8911  0.0  0.2  73148  8524 tty1     S    01:00   0:00  \_ urxvt
tc        8912  0.0  0.0  12176  2468 pts/0    Ss   01:00   0:00  |   \_ sh
tc       12931  0.6  0.0  17268  2844 pts/0    S+   01:19   0:02  |       \_ top
tc        8924  0.0  0.2  73944  9856 tty1     S    01:00   0:01  \_ urxvt
tc        8925  0.0  0.0  12176  2508 pts/1    Ss   01:00   0:00      \_ sh
tc       32810  0.0  0.0  13064  2660 pts/1    R+   01:25   0:00          \_ ps faux
tc        8856  0.0  0.0  30596  2360 tty1     S    01:00   0:00 dbus-launch --autolaunch e3aea5c4876ce0154a7a70895a5d4eb2 --binary-syntax --close-stderr
tc        8861  0.0  0.0  12928  2012 ?        Ss   01:00   0:00 /usr/local/bin/dbus-daemon --syslog-only --fork --print-pid 5 --print-address 7 --session
tc        8865  0.0  0.1 269112  7276 ?        Sl   01:00   0:00 /usr/local/lib/at-spi2-core/at-spi-bus-launcher
tc        8895  0.0  0.0  12928  2188 ?        S    01:00   0:00  \_ /usr/local/bin/dbus-daemon --config-file=/usr/local/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
tc        8903  0.0  0.1 204324  5284 ?        Sl   01:00   0:00 /usr/local/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
root      8910  0.0  0.0  10064   104 ?        Ss   01:00   0:00 /sbin/udhcpc -b -i eth0 -x hostname:box -p /var/run/udhcpc.eth0.pid

--- End code ---

curaga:
RSS is not the amount of memory used, due to copy-on-write and general memory sharing. "pmap -d PID" will show a more accurate number, though even that one is slightly too large when multiple copies are running.

curaga:

--- Quote from: Rich on January 15, 2018, 01:47:11 PM ---Hi curaga
If each  /sbin/udevd --daemon  line in the listing andyj posted is a separate process, he's got 369 of them running.

--- End quote ---
Yeah, the exact formula adds some according to RAM.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version