netty5/transport-native-epoll/src/main/java/io/netty/channel/epoll
Norman Maurer ed98ce27e1 Faster event processing when epoll transport is used
Motivation:

Before we used a long[] to store the ready events, this had a few problems and limitations:
 - An extra loop was needed to translate between epoll_event and our long
 - JNI may need to do extra memory copy if the JVM not supports pinning
 - More branches

Modifications:

- Introduce a EpollEventArray which allows to directly write in a struct epoll_event* and pass it to epoll_wait.

Result:

Better speed when using native transport, as shown in the benchmark.

Before:
[xxx@xxx wrk]$ ./wrk -H 'Connection: keep-alive' -d 120 -c 256 -t 16 -s scripts/pipeline-many.lua  http://xxx:8080/plaintext
Running 2m test @ http://xxx:8080/plaintext
 16 threads and 256 connections
 Thread Stats   Avg      Stdev     Max   +/- Stdev
   Latency    14.56ms    8.64ms 117.15ms   80.58%
   Req/Sec   286.17k    38.71k  421.48k    68.17%
 546324329 requests in 2.00m, 73.78GB read
Requests/sec: 4553438.39
Transfer/sec:    629.66MB

After:
[xxx@xxx wrk]$ ./wrk -H 'Connection: keep-alive' -d 120 -c 256 -t 16 -s scripts/pipeline-many.lua  http://xxx:8080/plaintext
Running 2m test @ http://xxx:8080/plaintext
 16 threads and 256 connections
 Thread Stats   Avg      Stdev     Max   +/- Stdev
   Latency    14.12ms    8.69ms 100.40ms   83.08%
   Req/Sec   294.79k    40.23k  472.70k    66.75%
 555997226 requests in 2.00m, 75.08GB read
Requests/sec: 4634343.40
Transfer/sec:    640.85MB
2015-02-07 08:22:46 +01:00
..
AbstractEpollChannel.java Faster event processing when epoll transport is used 2015-02-07 08:22:46 +01:00
AbstractEpollServerChannel.java Allow to change epoll mode 2015-02-04 21:37:34 +01:00
AbstractEpollStreamChannel.java Allow to change epoll mode 2015-02-04 21:37:34 +01:00
DomainSocketAddress.java Add support for Unix Domain Sockets when using native epoll transport 2015-02-04 15:39:41 +01:00
DomainSocketReadMode.java Allow to recv and send file descriptors when using EpollDomainSocketChannel. 2015-02-04 20:07:43 +01:00
Epoll.java Add more utility methods to check the availability of the epoll transport 2014-08-04 15:05:05 -07:00
EpollChannelConfig.java Allow to change epoll mode 2015-02-04 21:37:34 +01:00
EpollChannelOption.java Allow to change epoll mode 2015-02-04 21:37:34 +01:00
EpollDatagramChannel.java Allow to change epoll mode 2015-02-04 21:37:34 +01:00
EpollDatagramChannelConfig.java Allow to change epoll mode 2015-02-04 21:37:34 +01:00
EpollDomainSocketChannel.java Allow to change epoll mode 2015-02-04 21:37:34 +01:00
EpollDomainSocketChannelConfig.java Allow to change epoll mode 2015-02-04 21:37:34 +01:00
EpollEventArray.java Faster event processing when epoll transport is used 2015-02-07 08:22:46 +01:00
EpollEventLoop.java Faster event processing when epoll transport is used 2015-02-07 08:22:46 +01:00
EpollEventLoopGroup.java [#3378] Automatically increase number of possible handled events 2015-01-30 06:51:34 +01:00
EpollFileDescriptor.java Allow to recv and send file descriptors when using EpollDomainSocketChannel. 2015-02-04 20:07:43 +01:00
EpollMode.java Allow to change epoll mode 2015-02-04 21:37:34 +01:00
EpollServerChannelConfig.java Allow to change epoll mode 2015-02-04 21:37:34 +01:00
EpollServerDomainSocketChannel.java Allow to recv and send file descriptors when using EpollDomainSocketChannel. 2015-02-04 20:07:43 +01:00
EpollServerSocketChannel.java Allow to recv and send file descriptors when using EpollDomainSocketChannel. 2015-02-04 20:07:43 +01:00
EpollServerSocketChannelConfig.java Allow to recv and send file descriptors when using EpollDomainSocketChannel. 2015-02-04 20:07:43 +01:00
EpollSocketChannel.java Faster event processing when epoll transport is used 2015-02-07 08:22:46 +01:00
EpollSocketChannelConfig.java Allow to change epoll mode 2015-02-04 21:37:34 +01:00
EpollTcpInfo.java [#3112] Add supprt for TCP_INFO when using EpollSocketChannel 2015-01-27 07:06:38 +01:00
IovArray.java Add support for sendmmsg(...) and so allow to write multiple DatagramPackets with one syscall. Related to [#2719] 2014-09-09 09:49:53 +02:00
IovArrayThreadLocal.java Add support for sendmmsg(...) and so allow to write multiple DatagramPackets with one syscall. Related to [#2719] 2014-09-09 09:49:53 +02:00
Native.java Faster event processing when epoll transport is used 2015-02-07 08:22:46 +01:00
NativeDatagramPacketArray.java Add support for sendmmsg(...) and so allow to write multiple DatagramPackets with one syscall. Related to [#2719] 2014-09-09 09:49:53 +02:00
package-info.java Introduce a native transport for linux using epoll ET 2014-02-15 22:44:56 +01:00