Earlier, I said,
| tzuk wrote: |
| I might be able to introduce small delays when a lot of programs are created during a short period of time. But I should tell you, I am not considering this a top priority. |
I tried this approach but I couldn't get it to work well in practice. Whatever value I used for "maximum of programs at once", it meant that this many programs at once can spawn multiple copies of themselves. The end result was always an unmanageable system.
The hard limit approach turns out to work much better, so version 3.45.01 introduces two new settings:
ProcessLimit1=100
ProcessLimit2=200
Once the sandbox has more than X programs at the same time, each new program will be delayed for ten seconds before it starts to run. (X is the number specified in ProcessLimit1.)
Once the sandbox has more than Y programs at the same time, each new program will be immediately terminated. (Y is the number specified in ProcessLimit2.)
The default numbers are 100 and 200 as mentioned above. ProcessLimit2 cannot be smaller than ProcessLimit1.
Creative values can turn off one or both modes. For example,
ProcessLimit2=999999
will effectively disable the termination feature. Whereas,
ProcessLimit1=50
ProcessLimit2=50
Will effectively disable the delaying feature.