home home search search -  login login  | reload edit datainfo version cmd icon diff delete  | help help

Blog/2010/10/04/"Echo" Server, Client Example using Apache MINA (v1)

Blog/2010/10/04/"Echo" Server, Client Example using Apache MINA (v1)

Blog / 2010 / 10 / 04 / "Echo" Server, Client Example using Apache MINA (v1)
id: 11 owner: msakamoto-sf    created at: 2010-10-04 17:50:05
category: Java 

"Echo" Server/Client Example using Apache MINA:

FEATURE:

  • "act8" send/receive 1MB(larger size enable) payload repeatedly.

MAIN PURPOSE:

Check memory usage, heap overflow, and out-of-memory behaviours when building Apache MINA applications sending/receiving large size data.


EXAMPLE (EXTREM TRANSMISSION SITUATION):

Server-side GC log sample (10 client connection, 1MB packet, 100ms interval):
Images/2010/10/04/174932/WS000220.jpg;

Blue-line : usage heap.
Gray-vertical-line: gc time.

Server-side java parameter:

-server -Xms200m -Xmx200m -Xloggc:gc.log

No overflow, no out-of-memory. But Full-GCs invoked about every 10 seconds:
Images/2010/10/04/174952/WS000221.jpg;

Black-vertical-line: Full-GC


EXAMPLE 2 (NORMAL SITUATION):

But above case, all traffic packet per second are:

1MB x 10 (1000/100ms) x 10 client= 100MB/sec = 800Mbps(bits/sec)

This is extremely over traffic situation when using 100Mbps ethernet card.

Let's assume we are using 100Mbps ethernet card at next example, and avoid over traffic.
New client-side parameters are :

262,144 bytes, 200ms interval, 10 client
->
262,144 x 5 (1000/200ms) x 10 client = 13,107,200 Bytes/sec = 100M bits/sec
(Actually, TCP/IP header sizes should be added, but ignored for convenience.)
(Server-side parameter doesn't change)

Images/2010/10/04/210840/WS000222.jpg;

Stable heap usage, gc invocation, NO Full-GC.


download as plain text
display version : 1
current version : 2
updated by: msakamoto-sf
updated at: 2010-10-04 21:25:23
md5:41cb35e05d80aa837c683a96f4430fe6
sha1:0bcdc20048bd94df8ceb448290a5a90d530d6ab9
comments
Please login to post new comment.