TomcatExpert

Allocating more RAM to Apache Tomcat on Windows

posted by SpringSource on April 15, 2010 08:36 AM

If you've recently upgraded the RAM, or are moving your Tomcat applications to a larger box, you may want to update your allocated memory.

To find out how much RAM is allocated already to your Tomcat instance, if you have Tomcat installed as a Windows service, you can run Regedit and look at:

HKEY_LOCAL_MACHINE
SOFTWARE
Apache Software Foundation
Procrun 2,0

Under that key will be all the tomcat service instances you have installed on that machine. If you expand an instance tree you will see another key named Parameters. Expand this and you will see a number of named values:

JvmMs - is the minimum memory, equivalent to -Xms
JvmMx - is the maximum memory equivalent to -Xmx
Options - any other java options you wish to set for this server.

When you run Tomcat as a service it calls the jvm.dll directly so anything you modify in one of the bat files will be disregarded. So you will need to set those options by changing those registry values. The default Tomcat configuration does not use any memory configuration. If you haven't set the -Xms or -Xmx parameters explicitly anywhere you will wind up with the JDK default which is 64M.

Be aware that even if you increase the physical memory size, if you are running 32 bit windows you won't be able to allocate over 2GB of memory per VM. On Win32 the max size for your heap is going to be 2 GB. While that is as big as it will be able to get on that platform, that does not necessarily mean that you will be able to allocate a 2GB heap. In order to achieve that, the JVM must be able to allocate that entire quantity in a set of contiguous addresses. Depending on what you have loaded, if there is anything loaded into memory that is not movable and interferes with allocating that block, it will fail to start and you'll have to reduce the size until it fits in what IS available.

There are a number of different ways to modify the memory settings for the JVM at Tomcat startup via the -Xmx and -Xms settings. 

You can set these (and other JVM parameters) in either the JAVA_OPTS or the CATALINA_OPTS in the set_env.bat. These can also be set via the Windows System Environment dialogs. If that has been done you can type set JAVA_OPTS OR set CATALINA_OPTS at the command prompt, and if they are set you will see them. Or they can be set from the command line before starting Tomcat (although if that was being done it wouldn't help you in this case). These can also be set in any of the called startup scripts such as startup.bat, catalina.bat, or set_env.bat. Do a text search through all the bat files and check to see whether the environment variables are being explicitly set somewhere there.

Normally, the quickest way to find out what the actual startup setting is would be to edit catalina.bat. 

Find the tag: doneSetArgs. Immediately after that add the line:

echo %_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% 

When you next type startup it will print out the exact command line being used to start Tomcat. If you see an -Xmx parameter, the value immediately after that will be your maximum memory for that instance. If you don't see that setting at all, it is the JVM default, 64M.

For more than 10 years, SpringSource employees have been supporting Apache technologies, with unparalleled experience and commitment to the Apache Software Foundation. More than 400 of the Fortune 500 count on SpringSource to support their mission-critical business applications. Leaders of the Apache Software Foundation, including Board Members, work at SpringSource and dedicate a significant amount of time further developing the Apache Tomcat open source project. Over the last 2 years, 95% of the issues fixed in the Apache Tomcat project were fixed by SpringSource engineers. For more information on how SpringSource can help your enterprise, see the SpringSource website, or call 800/444-1935.

Comments

Memory Allocation

What is the most amount of memory you could allocate to tomcat in a x64 OS?

And then secondly, what is the best way to allocate or set the values xmx, xms, permsize?

Chux

kami adalah

kami adlah perusahaan besi baja yang paling oke harga besi wf harga besi h beam harga besi cnp harga besi unp harga besi beton harga plat besi harga besi siku besi pipa besi

These can also be set via the

These can also be set via the Windows System Environment dialogs.

how to buy soundcloud plays

I am in same problem

Thanks for your wonderful tutorial.But need more explain how to upgrade ram.Some point are not clear so if you can explain that will be easy for us.
________
Aero Auto
Webs: Auto transport California
California.

here i got the way to get

here i got the way to get marvel contest of champions hack with the hack and cheat

On unionized campuses, there

On unionized campuses, there may also be contractual limits on section size that were CAS-001 vce designed with the traditional model in mind but that do not make sense for a hybrid model. It is possible that these constraints would be changed in future contract negotiations, but that too will take time.

amazon

And he just bought me lunch since I found it for him smile Thus let me rephrase that: Thanks for lunch! amazon gift card generator

free itunes codes

such a fantastic site itunes gift card and free itunes codes generator to get for i phone,ios its really good work for any placefor music and songs,ringtone,photo shop keep it up! go to website for itunes codes online generator

good post

The purpose of posting this article is to aware the people that if you want to use Apache Tomcat with window then it Allocating more RAM to Apache Tomcat on Windows. So, Be confirm before using it that either your RAM is enough or not. Later you don't have any worry to take that system. This article is good for us. any how, I'm trying to get rushessay custom writing but as student of computer user like to read that article.

GAME HACK

castle clash hack This is exciting, nevertheless it is vital for you to visit this specific url: clash of clans triche

Psn codes generator

They would build several legitimate rules all time through opening this ps4 System collection.
http://free-psncodesonline.com

free psn codes

nice post

Now with LED lighting industry becoming more prosperous, more companies have started to look on top of the current e-commerce. The rapid growth of online shopping for the LED lighting industry sales channels provide a new possibility. Therefore, exploring the road of LED lighting industry, e-commerce is very important.
stadium lights

Great

I enjoyed over read your blog post. Your blog have nice information, I got good ideas from this amazing blog. I am always searching like this type blog post. I hope I will see again..
animal jam| cool games| cool math games| 8 ball pool| sudoku| yoob| stickman games| unblocked games | shooting games| friv4school|
happy wheels| fighting games

agario

Thanks for the great post. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts.
Visit to play: Agario jeu est un jeu affronte des milliers de concurrents. agario - agar io - agar - agar.io - agario jeu - agario - agar - agar.io - agar io - agario jeu

thanks

Although I do not fully understand the significance of your article but I still like it. It gives me something new and laughter. I just need so. Great. descargar facebook , descargar facebook , baixar whatsapp , descargar whatsapp , baixar whatsapp plus , baixar mobogenie gratis , mobogenie

like

Thank you for sharing. Your blog posts are more interesting and impressive. I think there are many people like and visit it regularly, including me. baixar facebook , baixar facebook , descargar facebook , descargar whatsapp gratis , descargar mobogenie gratis , baixar mobogenie gratis , messenger whatsapp

thanks

I also agree with your opinion. It is very deep and meaningful, I think you have to spend time to write it. facebook movel , whatsapp gratis , jogos de futebol , baixar facebook , baixar facebook

Prathap

Java Training If you are using or considering using Apache Tomcat and would like to improve your knowledge, join Apache experts and committers Mark Thomas and Filip Hanik as they outline the top Tips and Tricks to make management and administration of Apache Tomcat easier, faster Java Training Courses Online Classroom teaches and more productive. Course curriculum

Gym.Prathap

Java Training in Chennai

 

Pet

You are right I have just upgraded the RAM but did not understand how to transfer tompcat.Now i will try again to moving it.Lets see what happen.I will update you.
___________
Thanks
Website: Blueberries for dogs

Re: 2014 Football Outsiders Awards

This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post. downloadallstuffs.com

Temple Run 2

I found lots of interesting information here.Great work
Thanks for the share loved reading the article, please do share more like this wiht us .

Temple Run 2
Run 3
Click Jogos

great

This is quite a nice and smart move, I did wonder a lot on why the same thing did not occur to my mind. I am sure that you will easily fall in love with what this will let you achieve. dish network

Packing and Moving Services

Packers and Movers Mumbai
Packers and Movers Pune
Packers and Movers Bangalore

Best Relocation Services

Packers and Movers Delhi
Packers and Movers Gurgaon
Packers and Movers Hyderabad

hilo

tanks fors sharink harga besi baja

Tomcat 6 Maximum and Minimum Memeory

Hi,

I just want to know what are the thresholds for maximum and the minimum memory allocation capacities for Tomcat6.0.45 which runs on x64 Windows server 2012 R2 Standard. Can we exceed 4GB or 8GB capacities for maximum memory?

An early reply is appreciated

Great

Love involves a peculiar unfathomable combination of understanding and misunderstanding.
mutant fighting cup 2 | manny pacquiao | stardew valley wiki | slitherio | powerpuff yourself | zumbi tsunami | fishdom | quotes about love |love quotes | chinese food near me | snake

Pretty good post

baixar Score Hero é um dos excelentse jogos de futebol para telemóveis e dispositivos que usam Android de 2 ou superior. Photo Grid baixar é um aplicativo de edição de foto, fazer colagem com muitos quadros atraentes.

latahza.com

kamu tidak akan memakai laptopmu dalam jangka waktu yang cukup lama, kamu juga harus memastikan
Klik start > type power > power options > change plan settings > change advanced power settings > battery option > critical battery level > buat jadi 5 persen (artinya laptopmu akan

www.umamvanhauten.com www.cerahcollection.com www.husnialbardani.com www.mrosidin.com www.alwanun.com www.enjangbasyarudin.com rizqirgi.com

alakakj

www.latahza.com

Spandek

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.