Performance regression on jdk7u25 vs jdk7u40 due to EPollArrayWrapper.eventsLow

Alan Bateman Alan.Bateman at oracle.com
Fri Jan 10 13:09:32 PST 2014


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


More information about the nio-dev mailing list