Stefan Fuhrmann <[email protected]> writes:

> <[email protected]>wrote:
>>
>> Perhaps we could start up a separate hook script process before
>> allocating the large FSFS cache and then delegate the fork/exec to that
>> smaller process?
>>
>
> I wonder whether there is a way to pass a different
> cache setting to the sub-process.

I don't think this would work.  It's the fork that is failing, the child
process never exists so it cannot use a smaller memory footprint.

Having hooks run in a separate process is complicated.  The process
would need to be multi-threaded, or multi-process, to avoid hooks
running in serial.  stdin/out/err would need to be handled
somehow. Pipes perhaps?  By passing file descriptors across a Unix
domain socket?

For now I think we just have to recommend that the system has sufficient
swap for the fork to work.  Once the child execs the hook the memory
footprint of the process goes down.  So as far as I can tell on my Linux
system nothing gets written to swap, it just has to exist when fork is
called.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Reply via email to