[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] Cross-linked socket and openssl bufferevent throughput issue



Hi all,

I am working on a project using libevent (the issue appears to be present
with both 2.1.8 and 2.1.9 beta) which, as part of a larger system, uses two
bufferevents one of which is a socket based bufferevent (specifically a unix
domain stream socket) and the other is an openssl based bufferevent going
out to the network.  The aim is to link them so that data can flow in both
directions.  This appears to work however in testing the throughput of the
overall system is very low.  I've ruled out other system components already.

When examining the running process with strace I noticed that each event
loop itteration is limited to a 4096 byte read in spite of running with a
much larger setting in the bufferevent (I used the bufferevent_set_max*
functions to set maximums for read and write).  The 4096 limit appears to be
hard-coded in buffer.c, is that correct? If so is there any way to increase
the limit as it appears that with this limit the system is unable to
keep up with the amount of traffic (the strace output shows increasing
amounts of data available for reading).  If not are there any other settings
I can alter in libevent to tune it for this use-case?

In case it's relevant I should add that the system is multi-threaded with
separate event bases per thread but the pair of bufferevents are running on
the same thread.

Cheers,
Adam.

-- 
Adam Thompson
Software Development Engineer - Cloud Web Systems, Reading, UK

Forcepoint
www.forcepoint.com
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.