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

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



On Sat, Mar 16, 2019 at 06:04:10PM +0300, azat@xxxxxxxxxxxx wrote:
> On Mon, Mar 04, 2019 at 11:03:35AM +0000, Thompson, Adam wrote:
> > for various reasons it'll be a while before I can put together a
> > patch.  As such, if you have an idea and can make the changes it'd probably
> > be far quicker for you to make the changes and I'll be more than happy to
> > test them in our environment to see what difference they make.
> 
> Hi Adam,
> 
> I've just pushed this changes to the upstream, so you need to compile
> libevent from sources [1] to get it.
> 
> Also there is becat utility with which you can play to test bufferevent
> throughput, you will find usage examples here [2].
> 
>   [1]: https://github.com/libevent/libevent
>   [2]: https://github.com/libevent/libevent/commit/1f4f8769c4e78b14e6aa21d8300f432f67def8df
> 
> Also note that [2] contains numbers way more bigger then you had in your
> tests (and it also contains two bufferevents).

Thanks for this, appears to improve performance by a good margin.  I've
attached a tiny patch because we're compiling with -Werror and there's an
additional comma at the end of an enum in http.h.  This patch fixes this.
diff --git a/include/event2/http.h b/include/event2/http.h
index 53c3844..71c251d 100644
--- a/include/event2/http.h
+++ b/include/event2/http.h
@@ -549,7 +549,7 @@ enum evhttp_cmd_type {
 	EVHTTP_REQ_LOCK    = 1 << 12,
 	EVHTTP_REQ_UNLOCK  = 1 << 13,
 	EVHTTP_REQ_COPY    = 1 << 14,
-	EVHTTP_REQ_MOVE    = 1 << 15,
+	EVHTTP_REQ_MOVE    = 1 << 15
 };
 
 /** a request object can represent either a request or a reply */