[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-nio-dev
Subject:    Re: Performance regression on jdk7u25 vs jdk7u40 due to EPollArrayWrapper.eventsLow
From:       Alan Bateman <Alan.Bateman () oracle ! com>
Date:       2014-01-10 21:09:32
Message-ID: 52D0618C.4080002 () oracle ! com
[Download RAW message or body]

On 10/01/2014 16:37, Martin Buchholz wrote:
> I took a look at EPollArrayWrapper, it's basically implementing a map 
> int -> byte by combining a byte array for "small" integers and a 
> HashMap for large ones.  The 64k byte array does look like it may be 
> spending too much memory for the performance gain - typical java 
> memory bloat.    In the common case file descriptors will be "small".
These are the data structures for queuing up the updates to epoll. The 
original assumption that was if the file descriptor limit is small then 
the updates could be directly addressed in eventsLow. When the file 
descriptor limit is very high or unlimited then anything above the 
threshold goes into the fd->event map. Looking at it now then maybe that 
the threshold is too high (meaning the maximum size of eventsLow is too 
big) but at least it is configurable and we'll see if the original 
poster comes back with any results from tuning that.

As you noted, this is self-contained so it can easily be changed if we 
need it (but typically the number of Selectors is small so hasn't been 
an issue).

-Alan
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic