Tiny Core Base > TCB Bugs

Udevadm trigger spawns hundreds of processes

<< < (3/3)

andyj:
I did some testing using udevadm monitor and trigger and came up with some data. I created a file with some plausible max-children numbers, did eight runs shuffling the numbers each time, and totaled the elapsed time based on the kernel time difference between the first and last events:



It turns out that 24 max-children was a good guess, so I'm going to stick with that for now. Yes, 48 looks better, but 24 is almost as good and uses half the memory. Keep in mind that this is on a 64-bit VMware VM with 4 CPU's and 4 GB RAM. I didn't script it, but here are the details in case someone wants to take it on:

In one terminal window:

--- Code: ---udevadm monitor -k -u > udevadm-child-test
--- End code ---

In another terminal window:

--- Code: ---for a in $(cat numbers_file); do echo $a; sudo udevadm control --children-max=$a; sudo udevadm trigger; sleep 15; done
--- End code ---

Wait 20 minutes, then ctrl-C the monitor. You will need to see what the first line of the output file is, then grep -B1 for that line in the output and append the last line. At this point I pasted the results into LibreOffice Calc and hammered it all out, but a clever person could work out the details to get the results in a script. My monitor test file had 362k lines because each trigger generates almost 3600 events so expect a few. I'm curious how it would go on real hardware.

andyj:
I reran the same test but with 30 trials for each candidate:



Some smoothing, but otherwise about the same. The bump for 36 is still evident. I don't know what that's about. The times are averages in seconds for this graph. This also confirms that the settle timeout of 5 seconds should be good enough for any reasonable setting of max-children.

Navigation

[0] Message Index

[*] Previous page

Go to full version