Skip to content

Latest commit

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

waterwave

About

  • a network framework,implements modes of AIO BIO NIO and buffer optimization
  • an implementation of proxy based this network framework
  • may no additional lib is in dependency
  • 一个网络框架,实现主流的模型AIO NIO BIO等,以及相应的缓存优化
  • 实现了一版基于框架的 PROXY 代理功能
  • 框架计划一直不依赖JDK外任何外部LIB

TODO

  • protocols interface
  • HTTP protocols, MYSQL protocols analysis implements of protocols interface
  • proxy data log interface and implementations
  • 下一步增加协议接口
  • 基于定义的接口实现HTTP,MYSQL协议解析
  • 代理的数据日志接口,以及实现

First test (proxy):

ENV

  • VM: Xeon E312xx 2.4Ghz X 8 16GB RAM
  • MYSQL 5.7.17
  • JAVA 1.8.74
  • NET VM NETWORK, SAME SEGMENT

DESC

  • AIO: 2 thread for server R/W handler, 2 thread for client R/W handler
  • NIO: 1 thread for server R/W handler, 1 thread for client R/W handler, nT hread for work handler
  • BIO: n thread for server R/W client R/W and work handler
  • NIO(1t): 1 thread for server R/W client R/W and work handler
  • NETTY(1t): 1 thread for server R/W client R/W and work handler

RESULT

  • just Mysql can be 100K QPS
  • the best is the single thread Proxy, and may reach 75K QPS with low CPU using
  • with the handler it may reach 70K QPS with some CPU using
  • due to the implementation with synchronization in the writer, the NIO with 1T + 1T + nT implementation has low QPS, this may improve by the changes of the strategy

THREADS QPS (KQPS)

TDB QPS(NOPROXY)AIO(2T+2T)NIO(1T+1T+nT)BIO(nT)NIO(1T)NETTY(1T)
20503015323530
40905218505946
601006221656360
801056219687267
1001056819727474

THREADS CPU USING (%)

TDB CPU(NOPROXY)AIO(2T+2T)NIO(1T+1T+nT)BIO(nT)NIO(1T)NETTY(1T)
2040025020014070100
4070030025029089150
6078031027032090220
8079031026038092240
10079032026042093220

THREADS QPS

WW-QPS-201701.png

THREADS CPU USING

WW-CPU-201701.png

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages