ar- / incron

cron-like daemon which handles filesystem events
Other
229 stars 51 forks source link

No limit on number of processes #26

Open danfruehauf opened 9 years ago

danfruehauf commented 9 years ago

When executing commands for new files that arrive, there is no limit to the number of fork() calls.

Imagine the following scenario:

What happens:

What should happen:

demestav commented 8 years ago

I also believe that his feature is important. If the rate at which files are arriving to the directory is higher than the rate they are processed then soon enough there will be trouble!

danfruehauf commented 8 years ago

If the rate at which files are arriving to the directory is higher than the rate they are processed then soon enough there will be trouble!

@demestav Why not prevent the trouble then?

demestav commented 8 years ago

@danfruehauf In order to prevent the trouble, I would need incrond to limit the number of processes so the files are processes in a controlled way. For example, every time at some specific tasks, I have tens of files arriving into a specific directory for processing. So, every 5 seconds a new file arrives in the directory but it takes about 20 seconds for that file to get processed. Soon enough the number of processes spawned by incrond overwhelms the system. If there was an upper limit to the number of processes, the all the files would be processed in a controlled way, without overwhelming the system.

danfruehauf commented 8 years ago

@demestav Sorry about my previous comment, I misread you. We simply agree on that matter.