Package: runit
Version: 1.5.1-1
Severity: wishlist

Hi,

svlogd can become a performance bottleneck if log traffic is high. The pipe
buffer between it and the service is filled and svlogd doesn't read older
messages quickly enough with the default buffer size of 1024.

In one particular scenario, increasing buffer size to 16384 (with -b)
reduced "system" cpu time from 80% to about 65%.

I can imagine several ways of dealing with this problem:

- increase default buffer size (probably unnecessary);

- point out performance effect in documentation;

- print warnings to stderr if the read() returns buflen characters a
suitably low consecutive N times in a row (which would indicate buffer
congestion);

- instead of (or in addition to) the warning, increase the buffer adaptively
(max. size should be configurable);

- (probably overkill:) make svlogd multi-threaded, with one thread
constantly reading the input and stuffing it into a larger buffer for the
other thread to retrieve and commit to disk/udp.

Andras

-- 
                 Andras Korn <korn at chardonnay.math.bme.hu>
                 <http://chardonnay.math.bme.hu/~korn/> QOTD:
                        All programmers are optimists.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to