Memory requirements for Jetty SSL implementation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Memory requirements for Jetty SSL implementation

Bharti
Hi,

I want to implement Jetty server with SSL configuration. At present reserved memory for Jetty process is 1 GB. I need to know the memory requirement for SSL implementation.

Is it different from non ssl scenarios? How much memory is required per ssl connection?

I have tested a scenario where 1GB is reached after 10k connections are established at Jetty SSL port.
But, without SSL, this limit is not reached.
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-users] Memory requirements for Jetty SSL implementation

Chris Haynes
Don't forget that Jetty relies on the underlying operating system for
SSL connection management.

The limits and timeout behaviours you report could be coming from there.

Why not write yourself a simple Java SSL socket server and re-run your
tests on it - to help distinguish between Jetty and Operating System
limitations.

Chris H

On Mon, 2014-04-07 at 23:28 -0700, Bharti wrote:

> Hi,
>
> I want to implement Jetty server with SSL configuration. At present reserved
> memory for Jetty process is 1 GB. I need to know the memory requirement for
> SSL implementation.
>
> Is it different from non ssl scenarios? How much memory is required per ssl
> connection?
>
> I have tested a scenario where 1GB is reached after 10k connections are
> established at Jetty SSL port.
> But, without SSL, this limit is not reached.
>



_______________________________________________
jetty-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-users] Memory requirements for Jetty SSL implementation

Simone Bordet-2
In reply to this post by Bharti
Hi,

On Tue, Apr 8, 2014 at 8:28 AM, Bharti <[hidden email]> wrote:

> Hi,
>
> I want to implement Jetty server with SSL configuration. At present reserved
> memory for Jetty process is 1 GB. I need to know the memory requirement for
> SSL implementation.
>
> Is it different from non ssl scenarios? How much memory is required per ssl
> connection?
>
> I have tested a scenario where 1GB is reached after 10k connections are
> established at Jetty SSL port.
> But, without SSL, this limit is not reached.

Jetty uses the SSL implementation from the JDK, typically via SSLEngine.
Turns out that the JDK SSL implementation is quite memory hungry,
keeping at least one buffer of 17k around per connection.
Jetty allocates some more per-connection objects on top of that, but I
don't know the exact figure.

Unfortunately the memory allocated by the SSLEngine is not
controllable by Jetty.

We typically suggest to offload SSL via something like HAProxy.

--
Simone Bordet
----
http://cometd.org
http://webtide.com
http://intalio.com
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.
_______________________________________________
jetty-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-users