Lance,

On 1/19/22 17: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.

You need to provide a lot more information.

Some application servers can get away with a tiny amount of memory --
say, 64 megabytes of heap space -- and others needs many gigabytes.

Are you maintaining large caches of objects? Are you handling large
result sets from your database where those results need to temporarily
reside in memory? Do you expect large numbers of logged-in users with
HttpSession object which contain large amounts of stuff?

If none of the above are true, you may not need very much of that 16GiB
of RAM you have there.

At $work, we run application servers which have 8GiB of physical RAM and we run 4 separate JVM+Tomcat+application instances on each of them. The application with the largest heap space is set to 640MiB. We have several hundred users logged-in on each node at any given time and we have plenty of heap space.

Only *you* can tell what kind of memory requirements your application has. Usually "more is better" but sometimes, "more" just adds unnecessary costs.

If you only have OS + JVM/Tomcat/application running on this machine, I would set your heap to something conservative like 8GiB and monitor the application over time: see what memory-load your users are putting on it. SAVE YOUR DATA OVER TIME! If you see a saw-tooth pattern of used-heap (which is great!), look at the minimum value of that sawtooth pattern over time and that's essentially the minimum memory you need. Whatever you add on top of that gives you room to expand to more concurrent users, or handle larger temporary memory-usage scenarios, such as collating a large data set in memory (instead of having the database do it for you, for example).

Hope that helps,
-chris

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

Reply via email to