Skip to content
Event notification library
Branch: master
Clone or download
azat Merge branch 'buffer-read-size'
And after this patch set default evbuffer max read via bufferevent is
16K not 4K.

Here is some numbers for the single max read in evbuffer impact:
  function client() { becat "$@" | pv > /dev/null; }
  function server() { cat /dev/zero | becat -l "$@"; }

Plain bufferevent:

- 40K
  $ server -R $((40<<10)) & client -R $((40<<10))
  700MiB/s

- 16K *default now*
  $ server & client
  1.81GiB/s

- 4K
  $ server -R $((4<<10)) & client -R $((4<<10))
  1.05GiB/s

With OpenSSL (-S):

- 40K *default now*
  $ server -S -R $((40<<10)) & client -S -R $((40<<10))
  900MiB/s

- 16K *default now*
  $ server -S & client -S
  745MiB/s

- 4K
  $ server -S -R $((4<<10)) & client -S -R $((4<<10))
  593MiB/s

So as you can see without openssl 16K is faster then 40K/4K, while for
openssl 40K is still faster then 16K (I guess that this is due to with
openssl SSL_read() more at at time, while with plain we have some
allocations splits in evbuffer and maybe due to some buffer in openssl)

* buffer-read-size:
  sample/becat: bufferevent cat, ncat/nc/telnet analog
  Adjust evbuffer max read for bufferevents
  Maximum evbuffer read configuration
  Fix leaks in error path of the bufferevent_init_common_()
Latest commit 1f4f876 Mar 16, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Documentation Update documentation [ci skip] Mar 11, 2019
WIN32-Code Suppress int conversion warnings in getopt_long compatibility Mar 16, 2019
cmake Fix typos in a comment describing the purpose of `VersionViaGit.cmake` Mar 1, 2019
compat/sys Fix all identifiers with names beginning with underscore. Feb 29, 2012
include Adjust evbuffer max read for bufferevents Mar 16, 2019
m4 autotools: confirm openssl is working before using Sep 10, 2017
sample sample/becat: bufferevent cat, ncat/nc/telnet analog Mar 16, 2019
test bench: suppress int conversion warnings Mar 16, 2019
.clang-format
.gitignore Ignore evconfig-private.h for autotools Jun 20, 2018
.mailmap
.travis.yml
.uncrustify
CMakeLists.txt sample/becat: bufferevent cat, ncat/nc/telnet analog Mar 16, 2019
CONTRIBUTING.md
CONTRIBUTORS.md Move list of contributors into separate file Mar 8, 2019
ChangeLog
ChangeLog-1.4 Fix typos: warnigns -> warnings Mar 1, 2019
ChangeLog-2.0
Doxyfile
LICENSE
Makefile.am
Makefile.nmake Revert "The Windows socket type is defined as SOCKET." Dec 20, 2015
README.md
appveyor.yml Ignore bitrise branches for travis-ci/appvyeor [ci skip] Feb 24, 2019
arc4random.c
autogen.sh autogen.sh: learn about gmake Oct 31, 2016
buffer.c
buffer_iocp.c Have all visible internal function names end with an underscore. Feb 29, 2012
bufferevent-internal.h
bufferevent.c
bufferevent_async.c Eliminate fd conversion warnings and introduce EVUTIL_INVALID_SOCKET … Jan 29, 2019
bufferevent_filter.c
bufferevent_openssl.c Don't loose top error in SSL Feb 26, 2019
bufferevent_pair.c bufferevent: refactor to use type check macros Apr 13, 2017
bufferevent_ratelim.c
bufferevent_sock.c Eliminate fd conversion warnings and introduce EVUTIL_INVALID_SOCKET … Jan 29, 2019
changelist-internal.h
checkpatch.sh Add checkpatch script Oct 5, 2016
configure.ac
defer-internal.h Export symbols for -fvisibility=hidden (under cmake) Mar 13, 2017
devpoll.c Have all visible internal function names end with an underscore. Feb 29, 2012
epoll.c Epoll ET setting lost with multiple events for same fd Oct 30, 2018
epoll_sub.c Merge remote-tracking branch 'origin/patches-2.0' Jan 22, 2014
epolltable-internal.h fix a comment error Dec 15, 2018
evbuffer-internal.h
evconfig-private.h.cmake Define __EXT_POSIX2 for QNX Oct 27, 2018
evconfig-private.h.in
evdns.3 improved nroff mdoc for the man page Oct 15, 2006
evdns.c Added DNS header mask definitions. Feb 12, 2019
event-config.h.cmake sample/becat: bufferevent cat, ncat/nc/telnet analog Mar 16, 2019
event-internal.h Fix missing LIST_HEAD Oct 20, 2018
event.3
event.c Add support for EV_TIMEOUT to event_base_active_by_fd Mar 3, 2019
event_iocp.c Eliminate fd conversion warnings and introduce EVUTIL_INVALID_SOCKET … Jan 29, 2019
event_rpcgen.py
event_tagging.c
evmap-internal.h
evmap.c evmap: use approparite type for changes to avoid warnings under windows Jan 29, 2019
evport.c Have all visible internal function names end with an underscore. Feb 29, 2012
evrpc-internal.h
evrpc.c
evsignal-internal.h Add a new libevent_global_shutdown() to free all globals before exiting. Mar 22, 2012
evthread-internal.h
evthread.c
evthread_pthread.c
evthread_win32.c
evutil.c
evutil_rand.c
evutil_time.c
ht-internal.h
http-internal.h
http.c http: add WebDAV methods support Mar 14, 2019
iocp-internal.h cmake: Export missing symbols for win32 Mar 14, 2017
ipv6-internal.h Convert include-guard macro convention to avoid reserved identifiers Feb 29, 2012
kqueue-internal.h Replace pipe-based notification with EVFILT_USER where possible Apr 11, 2012
kqueue.c
libevent.pc.in libevent.pc: link against core/extra Oct 28, 2018
libevent_core.pc.in
libevent_extra.pc.in
libevent_openssl.pc.in Use correct openssl libs and includes in pkgconfig file Nov 16, 2012
libevent_pthreads.pc.in
listener.c
log-internal.h
log.c
make-event-config.sed config.h can't be prefixed unconditionally Jun 7, 2018
make_epoll_table.py Implemented EV_CLOSED event for epoll backend (EPOLLRDHUP). Jan 18, 2014
minheap-internal.h Remove an unreachable return statement in minheap-internal.h Aug 1, 2013
mm-internal.h
openssl-compat.h Fix build with LibreSSL 2.7 Apr 2, 2018
poll.c poll: Prevent libevent from spinning if POLLNVAL occurs Nov 4, 2016
ratelim-internal.h
select.c Tweak the new evutil_weakrand_() code Apr 9, 2012
signal.c
strlcpy-internal.h
strlcpy.c Fix all identifiers with names beginning with underscore. Feb 29, 2012
time-internal.h Export symbols for -fvisibility=hidden (under cmake) Mar 13, 2017
util-internal.h
whatsnew-2.0.txt "buffer" spelling Feb 8, 2013
whatsnew-2.1.txt
whatsnew-2.2.txt Provide Makefile variables LIBEVENT_{CFLAGS,CPPFLAGS,LDFLAGS} Feb 24, 2018
win32select.c win32select: print an error in case of failure Jan 29, 2019

README.md

libevent logo

Appveyor Win32 Build Status Travis Build Status Coverage Status Join the chat at https://gitter.im/libevent/libevent

1. BUILDING AND INSTALLATION

Autoconf

$ ./configure
$ make
$ make verify   # (optional)
$ sudo make install

See Documentation/Building#Autoconf for more information

CMake (Windows)

Install CMake: https://www.cmake.org

$ md build && cd build
$ cmake -G "Visual Studio 10" ..   # Or whatever generator you want to use cmake --help for a list.
$ start libevent.sln

See Documentation/Building#Building on Windows for more information

CMake (Unix)

$ mkdir build && cd build
$ cmake ..     # Default to Unix Makefiles.
$ make
$ make verify  # (optional)

See Documentation/Building#Building on Unix (With CMake) for more information

2. USEFUL LINKS:

For the latest released version of Libevent, see the official website at http://libevent.org/ .

There's a pretty good work-in-progress manual up at http://www.wangafu.net/~nickm/libevent-book/ .

For the latest development versions of Libevent, access our Git repository via

$ git clone https://github.com/libevent/libevent.git

You can browse the git repository online at:

https://github.com/libevent/libevent

To report bugs, issues, or ask for new features:

Patches: https://github.com/libevent/libevent/pulls

OK, those are not really patches. You fork, modify, and hit the "Create Pull Request" button. You can still submit normal git patches via the mailing list.

Bugs, Features [RFC], and Issues: https://github.com/libevent/libevent/issues

Or you can do it via the mailing list.

There's also a libevent-users mailing list for talking about Libevent use and development:

http://archives.seul.org/libevent/users/

3. ACKNOWLEDGMENTS

The following people have helped with suggestions, ideas, code or fixing bugs.

You can’t perform that action at this time.