Page 1 of 1

Estimating memory/overhead usage for a SHC Web site

PostPosted: Fri Feb 03, 2012 12:14 am
by jcarlos
Hi there,

In this site I expect to serve 742* users (visits/connections/clients) simultaneously in any given time period (at the most).

I understand that a headless client (which is started inside the Servoy application server) has an overhead of about 2 Megabyte for each JSP web session (per client being started). Am I correct here?

Assuming that a JSP web session = one visit/connection, I will need 1484 Megabyte of RAM available to serve the JSP pages. This is just about 1.5G of RAM to handle the clients sessions. Is this correct?

Megabyte used to be considered a large amount of data. Now, it seems that all of the clients can be served with 1.5G of RAM. Am I correct in my calculations/approach?

Is there any other overhead/memory cost that I am not considering when deploying a web site as a SHC?

----------------------------------
* I got to that number (742) after looking into the Webalizer/usage statistics for our website. This number is based in the maximum value of number of visits in a single day during the last 12 months; and then in an algorithm that further shrink the number to reflect the maximum number of expected users that could be served in a given period of time. In other words, if I were to use the Smart Client, I needed then 742 client licenses available.
----------------------------------

Thanks!
JC

Re: Estimating memory/overhead usage for a SHC Web site

PostPosted: Fri Feb 03, 2012 2:11 am
by jcarlos
Any one input is more than appreciated!

While estimating memory/overhead usage for a SHC Web site am I in the right path?

JC

Re: Estimating memory/overhead usage for a SHC Web site

PostPosted: Fri Feb 03, 2012 3:07 am
by david
Seem WAY low to me! Based on gut feeling though. Would also be interested in the numbers.

Re: Estimating memory/overhead usage for a SHC Web site

PostPosted: Fri Feb 03, 2012 4:46 am
by jcarlos
david wrote:Seem WAY low to me! Based on gut feeling though. Would also be interested in the numbers.

Wow. Thank you David. I looked for info in the documentation. This is what I found:
The Servoy Headless Client cannot be started directly, but has to be instantiated through Java code. / Depending on the implementation, for example some JSP files or JAR archive files might need to be installed on the Servoy Application Server.


In Servoy Documentation:
http://wiki.servoy.com/display/public/DOCS/Headless+Client
http://wiki.servoy.com/display/Serv52/Headless+Client

Patrick Talbot explained the HC very nicely here:
https://www.servoyforge.net/projects/articles/wiki/CodeExecution#Servoy-Headless-clients
However, I found an old document at this location: http://www.servoy.com/docs/servoy_headless_client.pdf, which pointed out exactly what I stated here:
A headless client is started inside the Servoy application server (overhead is about 2MB per client being started) for each JSP web session.

Servoy, any numbers?

Thanks!

JC

Re: Estimating memory/overhead usage for a SHC Web site

PostPosted: Fri Feb 03, 2012 5:14 am
by ptalbot
How much is a Smart client memory usage, do you think?
Depends on how many forms, foundset, dataset, data, etc. it loads, right?
Why would it be different for a Headless client?

Re: Estimating memory/overhead usage for a SHC Web site

PostPosted: Fri Feb 03, 2012 5:42 am
by jcarlos
ptalbot wrote:How much is a Smart client memory usage, do you think?

Don't know, and I have No idea how I can figure this out. Can you guide me please?

ptalbot wrote:Depends on how many forms, foundset, dataset, data, etc. it loads, right?
Why would it be different for a Headless client?

Don't know much about this stuff, and I couldn't find anything - anywhere that would provide some clues (aside from the PDF in the Servoy site that mentions the 2MB of memory overhead per client for each JSP web session).

Anyway, I thought that a SHC would require less resources (memory overhead) than the Smart Client or Web Client for that matter. I guess, I am wrong.

Can Servoy provide estimates or guidance in this regard?

JC

Re: Estimating memory/overhead usage for a SHC Web site

PostPosted: Fri Feb 03, 2012 7:54 pm
by ROCLASI
One thing HeadlessClient doesn't have to do what SmartClient does is loading the blueprint of the whole solution into memory.
Headless-/Webclient run in the context of the server where Server already have this blueprint loaded for all the HC/WC clients to use. So that overhead is shared.
And as Patrick already stated the actual overhead all depends on the solution and the data you load. So that very much depends on how you coded your solution.

Re: Estimating memory/overhead usage for a SHC Web site

PostPosted: Fri Feb 03, 2012 8:19 pm
by david
Smart client loads into client memory though. End result being that smart client is less of a drag on server resources than web client. And of course web client is less of a drag on the client machine than smart client.

There is no conceivable way that 742 web clients use only 1.5G of RAM on the server no matter how the solution is coded. I agree with JC, there has to be some starting point numbers that make some sense.

Re: Estimating memory/overhead usage for a SHC Web site

PostPosted: Fri Feb 03, 2012 9:00 pm
by jcarlos
david wrote:Smart client loads into client memory though. End result being that smart client is less of a drag on server resources than web client. And of course web client is less of a drag on the client machine than smart client.

What about a specific comparison between the Web Client and Headless Client? I would think that the Headless Client can potentially consume. Correct?

david wrote:There is no conceivable way that 742 web clients use only 1.5G of RAM on the server no matter how the solution is coded. I agree with JC, there has to be some starting point numbers that make some sense.

You know, this whole thing started for me because I heard Marc Boegem saying: ‘If your server can’t handle too many Headless Clients - because of memory, you will get in trouble.' (ServoyCamp 2011 Presentation about the HC Plugin).

We all know that this is an important issues; all we are asking is for guidance on how to figure this thing out. We need some starting point numbers (as David said) - a way of weighing memory on the server for each HC session, for each JSP web session.

JC