Hello Lance,

just one remark: Take care about the 32 GB. Configuring more than 32 GB, the 
Java Pointers will use 64 Bit and thus need double the space.
Thus 34 GB memory can be worse than 31 GB.
See also 
https://blog.codecentric.de/en/2014/02/35gb-heap-less-32gb-java-jvm-memory-oddities/

Just my 2 cents.

Greetings, Thomas

-----Ursprüngliche Nachricht-----
Von: Olaf Kock <tom...@olafkock.de> 
Gesendet: Donnerstag, 20. Januar 2022 09:54
An: users@tomcat.apache.org
Betreff: Re: Tomcat dedicated server

Hi Lance

On 19.01.22 23:35, Campbell, Lance wrote:
> On a Tomcat 9.x dedicated Linux server with 16G of memory, how much memory 
> would you allocate for the OS?
>
> Assume there is no file processing taking place.  Also assume Tomcat is 
> communicating primarily with a PostgreSQL database and Apache web server each 
> running on their own dedicated servers.  The Tomcat application server is the 
> only thing running on the Linux server.

It depends (TM)

Without knowing your application, the load (e.g. number of concurrent
users) and general setup, there's no way to tell. I'd rather handle the 
question the other way around: How much memory does (your application
on) Tomcat require. Tomcat itself is happy with just a little bit of memory, 
but applications vary widely. Also, some applications are memory-bound, some 
are I/O-bound, some are CPU-bound. So memory might not be your bottleneck to 
worry about.

You should load-test your application with a realistic load (plus
margin) and keep an eye on memory consumption. But in the end you'll find out 
what is the first bottleneck to appear. It might not be memory.

But to come back closer to your original question: I recommend to deactivate 
swapspace for production servers, and configure -Xms equal to -Xmx, so that you 
find shortages of memory early (when you start the
application) rather than Sunday night at 3am. You might want to leave 1-2G for 
the OS and start testing this way, or rather test how little memory your app 
requires to run and add margin. My rule of thumb is: The more memory there is 
to be claimed in GC, the longer a full GC run takes. Often, many short but 
frequent GC runs are preferable to fewer but longer lasting. (I didn't check if 
this still applies to the newer generation of garbage collectors, so take this 
GC-statement with a grain of salt)

Olaf



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to