2016-01-28 15:53 GMT+01:00 Mark Thomas <ma...@apache.org>:

> On 28/01/2016 14:16, Konstantin Kolinko wrote:
> > 2016-01-28 17:04 GMT+03:00  <ma...@apache.org>:
> >> Author: markt
> >> Date: Thu Jan 28 14:04:00 2016
> >> New Revision: 1727355
> >>
> >> URL: http://svn.apache.org/viewvc?rev=1727355&view=rev
> >> Log:
> >> Switch OutputBuffer to a local Map of C2BConvertors. Loading testing
> with HTTP/2 and default Tomcat home page suggests an improvement of a few
> percent in throughput.
> >
> > How much memory is wasted?
>
> I wouldn't call that memory 'wasted'. I'd call it 'used' to gain
> somewhere in the region of a 2% to 4% throughput increase.
>
> > Every connection (incl. keep-alive ones) will have its own map of
> > encoders?  Encoders are not reused across different connections?
>
> Using the same load test as I used for the performance numbers, I see a
> retained size of less than 1MB all of which is eligible for GC. There
> isn't much reuse in HTTP/2.
>
> If I switch to HTTP/1.1 and run the same test I end up with ~60
> instances using ~16k. Scale that up to 2000 concurrent connections and
> you get ~550k so I am not worried about memory use in this case.
>
> I didn't measure the performance gain of this change for HTTP/1.1 but
> I'd expect there to be some benefit although not as much as HTTP/2
> simply because HTTP/2 uses more concurrency for broadly the same load.
>
> I have always used local encoders and decoders, nobody ever complained
about memory use so it's most likely not a problem.

Rémy

Reply via email to