Skip to main content

Java NIO on windows performance problem for high traffic

2 replies [Last post]
muzaffercoruh
Offline
Joined: 2008-04-10

Hi,

I use java NIO and I m very happy for its performance in small time range. My usage is that, I have one server machine work on 64bit java (Windows 2003). 20 client applications(32bit) in the same and very huge machine (8CPU-16GB RAM-Windows 2008) and totally all clients have 500 request/recieve per second. Every client has its threaded structure and I make pooling these threads with thread's nio connection so for every client almost 40-60 connections alive. My server application works very well. But after my clients start, almost one hour later my client's CPU goes %90 and most of this is kernel process. After I stop my clients, 1-2 minutes overhead continues.

I think there is some problem with NIO and Windows. Is it necessary to do some configuration on windows? Or something else?

Regards.
Muzaffer

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmpassos
Offline
Joined: 2008-04-05

This seems to be a memory leak issue, specially because you said that after kill the process you still have some overhead for some minutes, what looks like a SWAP usage.

heaththegreat
Offline
Joined: 2003-07-02

Have you tried running on linux or osx?

In my experience, windows 2003 ran high numbers of concurrent connections about as well as linux and osx did.

I'd highly suggest an NIO framework rather than pure NIO. Look at apache MINA or grizzly. Your issue sounds like you may have a problem with your selector thread. An NIO framework will solve a lot of those issues for you. I've been using MINA on my chat server, and its given me great performance (5000 concurrent connections).