有一种可能是mina对并发不做人为限制,而是天然限制,比如内存,超重载荷下就OutOfMemery了,这种情况下就增大内存配给。Troubleshooting I get OutOfMemoryError or response timeout and connection reset under heavy load.We recommend to switch the default buffer type to 'heap' by inserting the following code before you start a server:ByteBuffer.setUseDirectBuffers(false); ByteBuffer.setAllocator(new SimpleByteBufferAllocator());If you prefer direct buffers to heap buffers, JVM might have ran out of direct memory. Please try increasing maximum direct memory size using -XX:MaxDirectMemorySize option (e.g. -XX:MaxDirectMemorySize=128M)
就是说在使用mina的时候,没有什么配置什么的吗?
就直接用像网上那些基本的小例子那种收发消息。
性能没法再提升吗?
靠外部实现队列、缓存等方法不算,如何靠mina本身提高性能
I get OutOfMemoryError or response timeout and connection reset under heavy load.We recommend to switch the default buffer type to 'heap' by inserting the following code before you start a server:ByteBuffer.setUseDirectBuffers(false);
ByteBuffer.setAllocator(new SimpleByteBufferAllocator());If you prefer direct buffers to heap buffers, JVM might have ran out of direct memory. Please try increasing maximum direct memory size using -XX:MaxDirectMemorySize option (e.g. -XX:MaxDirectMemorySize=128M)
就是说得靠外部去实现负载均衡来提高吞吐量?
mina框架本身可以通过配置实现类似的功能吗?