You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Ahmed Al-Obaidy <ah...@yahoo.com> on 2007/07/13 02:05:11 UTC

MINA Performance and Scalability

Hi guys...
I'm using MINA to build a very loaded GPRS gatway... 
The server should handle 10K RTU... each will have about 6 TCP messages per minute... every message is about 100 byte

The gateway will access MySQL database using Hibernate...

Is that too much for MINA...
how can I determine my hardware requirements... 
what is the performance tips ... both for the programming and the configuration...

what is the preferred OS and VM for such server?

 
---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and 
always stay connected to friends.

Re: MINA Performance and Scalability

Posted by Mladen Turk <mt...@apache.org>.
Vinod Panicker wrote:
> 
> Seconded.  If I've learned one thing from server development, it is
> that each component should be tested thoroughly before it is used as a
> dependency.  Hibernate may be a boon for certain people, but it really
> doesn't cut it when performance is a concern - at least that's what we
> found out.
>

I personally know the authors and designers of the Hibernate.
Really weird guys :)

However, the same rule (and that's why I like it) can be
applied to the Mina as well. Usability, then performance.
IMHO it is more important that you have an adaptable infrastructure
then a optimized one for a specific task.
After all, if you know all usage then it's pretty straightforward,
however, the next use case will put you back to the start line.

It's always kind of balance between generic and performance, and
projects that cope to handle that thin line are successful one.
Others are simply gone no mater how performant they were.

Regards,
Mladen.


Re: MINA Performance and Scalability

Posted by Vinod Panicker <vi...@gmail.com>.
On 7/13/07, Michael Grundvig <mi...@electrotank.com> wrote:
> I think your real performance problem on the Java side will be
> Hibernate (assuming you are going to be calling it 1000 times per second).

Seconded.  If I've learned one thing from server development, it is
that each component should be tested thoroughly before it is used as a
dependency.  Hibernate may be a boon for certain people, but it really
doesn't cut it when performance is a concern - at least that's what we
found out.

Regards,
Vinod.

Re: MINA Performance and Scalability

Posted by Michael Grundvig <mi...@electrotank.com>.
See, everyone seems to have good experience with MySQL except for me ;) I've 
worked with multiple companies that use it under the covers yet can't seem 
to get it to perform worth crap under even medium loads. I know of two 
companies at least that have invested small fortunes into MySQL tuning and 
configuration only to give up in the end and switch to Oracle.

In regards to monitoring and tuning, that really seems to be a black art. 
MINA does support JMX for monitoring but with only 10k connections though, I 
really wouldn't worry too much about it. That load isn't very much and MINA 
will handle it easily. Better to focus on coding the app as cleanly as 
possible initially and testing it heavily to make certain you know how it 
performs. I think your real performance problem on the Java side will be 
Hibernate (assuming you are going to be calling it 1000 times per second).

Mike

----- Original Message ----- 
From: "Vinod Panicker" <vi...@gmail.com>
To: <de...@mina.apache.org>
Sent: Friday, July 13, 2007 1:47 AM
Subject: Re: MINA Performance and Scalability


> On 7/13/07, Ahmed Al-Obaidy <ah...@yahoo.com> wrote:
>> Thank you Michael,
>>
>> 1. So you think MINA is able to support 10K session?
>> 2. Do u recommend PostgreSQL or even MaxDB  to replace MySQL?
>> 3. where can I find articles about monitoring and tuning my server?
>
> We've seen over 50k sessions per machine using mina during load and
> even 200k without any load. It all depends on your OS.
>
> I've seen over 20k queries per second on MySQL (with tables having
> millions of records) and found it to be fantastic in terms of
> performance.  It all depends on how you structure your data and tune
> the server.
>
> For best performance, use a server JVM with Epoll enabled.  The 1.6
> JRE has it by default and 1.5_0.11+ JRE's have support for it via a
> JVM option.
>
> Regards,
> Vinod. 


Re: MINA Performance and Scalability

Posted by Vinod Panicker <vi...@gmail.com>.
On 7/13/07, Ahmed Al-Obaidy <ah...@yahoo.com> wrote:
> Thank you Michael,
>
> 1. So you think MINA is able to support 10K session?
> 2. Do u recommend PostgreSQL or even MaxDB  to replace MySQL?
> 3. where can I find articles about monitoring and tuning my server?

We've seen over 50k sessions per machine using mina during load and
even 200k without any load. It all depends on your OS.

I've seen over 20k queries per second on MySQL (with tables having
millions of records) and found it to be fantastic in terms of
performance.  It all depends on how you structure your data and tune
the server.

For best performance, use a server JVM with Epoll enabled.  The 1.6
JRE has it by default and 1.5_0.11+ JRE's have support for it via a
JVM option.

Regards,
Vinod.

Re: MINA Performance and Scalability

Posted by mat <fo...@gmail.com>.
How many concurrent users per box?

On 7/13/07, Michael Grundvig <mi...@electrotank.com> wrote:
>
> That's about 1000 messages per second and well within what we've seen MINA
> do. Personally, I think MINA will give you no problems but I wouldn't
> trust
> MySQL that much (I know, others love it but I've never worked on a project
> where it performed as well as all the hype suggests).
>
> With Hibernate and such, I think your biggest issue will be all the CPU
> usage. I'd probably go for at least a dual processor, dual core box with 4
> gigs of RAM (2g should be allocated to the VM). You might need more CPU
> with
> Hibernate in the mix though. As for OS and VM, we've had significantly
> better performance out of Linux running Java 1.6. Just make sure you
> increase the file descriptor limit on the box. Good luck!
>
> Mike
>
> ----- Original Message -----
> From: "Ahmed Al-Obaidy" <ah...@yahoo.com>
> To: <de...@mina.apache.org>
> Sent: Thursday, July 12, 2007 7:05 PM
> Subject: MINA Performance and Scalability
>
>
> > Hi guys...
> > I'm using MINA to build a very loaded GPRS gatway...
> > The server should handle 10K RTU... each will have about 6 TCP messages
> > per minute... every message is about 100 byte
> >
> > The gateway will access MySQL database using Hibernate...
> >
> > Is that too much for MINA...
> > how can I determine my hardware requirements...
> > what is the performance tips ... both for the programming and the
> > configuration...
> >
> > what is the preferred OS and VM for such server?
> >
> >
> > ---------------------------------
> > Don't be flakey. Get Yahoo! Mail for Mobile and
> > always stay connected to friends.
>
>

Re: MINA Performance and Scalability

Posted by Ahmed Al-Obaidy <ah...@yahoo.com>.
Thank you Michael,

1. So you think MINA is able to support 10K session?
2. Do u recommend PostgreSQL or even MaxDB  to replace MySQL?
3. where can I find articles about monitoring and tuning my server?



Michael Grundvig <mi...@electrotank.com> wrote: That's about 1000 messages per second and well within what we've seen MINA 
do. Personally, I think MINA will give you no problems but I wouldn't trust 
MySQL that much (I know, others love it but I've never worked on a project 
where it performed as well as all the hype suggests).

With Hibernate and such, I think your biggest issue will be all the CPU 
usage. I'd probably go for at least a dual processor, dual core box with 4 
gigs of RAM (2g should be allocated to the VM). You might need more CPU with 
Hibernate in the mix though. As for OS and VM, we've had significantly 
better performance out of Linux running Java 1.6. Just make sure you 
increase the file descriptor limit on the box. Good luck!

Mike

----- Original Message ----- 
From: "Ahmed Al-Obaidy" 
To: 
Sent: Thursday, July 12, 2007 7:05 PM
Subject: MINA Performance and Scalability


> Hi guys...
> I'm using MINA to build a very loaded GPRS gatway...
> The server should handle 10K RTU... each will have about 6 TCP messages 
> per minute... every message is about 100 byte
>
> The gateway will access MySQL database using Hibernate...
>
> Is that too much for MINA...
> how can I determine my hardware requirements...
> what is the performance tips ... both for the programming and the 
> configuration...
>
> what is the preferred OS and VM for such server?
>
>
> ---------------------------------
> Don't be flakey. Get Yahoo! Mail for Mobile and
> always stay connected to friends. 



       
---------------------------------
Yahoo! oneSearch: Finally,  mobile search that gives answers, not web links. 

Re: MINA Performance and Scalability

Posted by Michael Grundvig <mi...@electrotank.com>.
That's about 1000 messages per second and well within what we've seen MINA 
do. Personally, I think MINA will give you no problems but I wouldn't trust 
MySQL that much (I know, others love it but I've never worked on a project 
where it performed as well as all the hype suggests).

With Hibernate and such, I think your biggest issue will be all the CPU 
usage. I'd probably go for at least a dual processor, dual core box with 4 
gigs of RAM (2g should be allocated to the VM). You might need more CPU with 
Hibernate in the mix though. As for OS and VM, we've had significantly 
better performance out of Linux running Java 1.6. Just make sure you 
increase the file descriptor limit on the box. Good luck!

Mike

----- Original Message ----- 
From: "Ahmed Al-Obaidy" <ah...@yahoo.com>
To: <de...@mina.apache.org>
Sent: Thursday, July 12, 2007 7:05 PM
Subject: MINA Performance and Scalability


> Hi guys...
> I'm using MINA to build a very loaded GPRS gatway...
> The server should handle 10K RTU... each will have about 6 TCP messages 
> per minute... every message is about 100 byte
>
> The gateway will access MySQL database using Hibernate...
>
> Is that too much for MINA...
> how can I determine my hardware requirements...
> what is the performance tips ... both for the programming and the 
> configuration...
>
> what is the preferred OS and VM for such server?
>
>
> ---------------------------------
> Don't be flakey. Get Yahoo! Mail for Mobile and
> always stay connected to friends.