[Development] QProcess fork() failure and overcommit
thiago.macieira at intel.com
Wed Mar 8 14:32:58 CET 2017
Em quarta-feira, 8 de março de 2017, às 13:51:49 CET, Christian Kandeler
> I use the default settings for overcommit (0/heuristic). My application
> starts QProcesses in a loop. If the application has not allocated
> additional memory, strace -T for clone() gives:
> Here's the same application using 1GB of additional memory:
> So, factors around 100?
Not unexpected, if you use 100x more memory. clone() has a fixed cost for
creating the necessary book-keeping and it may have some non-O(1) dependent on
the number of running processes running, but it's definitely O(n) on the memory
-- the Linux kernel does not apply the book-keeping on the 2MB page table
directory level, only on the actual 4 kB page table entries.
That said, look at the numbers: it increased from ~100 µs to 16.9 ms in the
worst case. You can't perceive that difference.
> (Also, I get lots of ERESTARTNOINTR in the latter case).
Ignore that, it's not visible.
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development