Page 1 of 1

how to allocate more Ram to the gameserver

Posted: Fri May 18, 2012 10:46 am
by Kamira
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision 5316:
L2JDP Revision 8812:

Hi, can anyone EXPLAIN me how to give the gameserver more Ram? I use Linux CentOS 6. i already used google but didnt found a good guide...

Re: how to allocate more Ram to the gameserver

Posted: Fri May 18, 2012 10:51 am
by Sleek
Kamira wrote:If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision 5316:
L2JDP Revision 8812:

Hi, can anyone EXPLAIN me how to give the gameserver more Ram? I use Linux CentOS 6. i already used google but didnt found a good guide...
Edit your GameServer_loop.sh file inside the gameserver folder.

Re: how to allocate more Ram to the gameserver

Posted: Fri May 18, 2012 11:42 am
by Kamira
but how?? i use winscp what i must do?

Re: how to allocate more Ram to the gameserver

Posted: Fri May 18, 2012 12:07 pm
by Kamira
i found it out :D all ok now ^^ thx

Re: how to allocate more Ram to the gameserver

Posted: Fri May 18, 2012 12:15 pm
by Micr0
open file GameServer_loop.sh with some text editor and change this -Xms1024m -Xmx1024m

on line
java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1024m -Xmx1024m -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1
you can use
-Xms1024m -Xmx1024m >>>> 1GB RAM
-Xms2024m -Xmx2024m >>>> 2GB RAM
-Xms3024m -Xmx3024m >>>> 3GB RAM
-Xms4024m -Xmx4024m >>>> 4GB RAM
-Xms5024m -Xmx5024m >>>> 5GB RAM
-Xms6024m -Xmx6024m >>>> 6GB RAM
or
-Xms1g -Xmx1g >>>> 1GB RAM
-Xms2g -Xmx2g >>>> 2GB RAM
-Xms3g -Xmx3g >>>> 3GB RAM
-Xms4g -Xmx4g >>>> 4GB RAM
-Xms5g -Xmx5g >>>> 5GB RAM
-Xms6g -Xmx6g >>>> 6GB RAM

Re: how to allocate more Ram to the gameserver

Posted: Fri May 18, 2012 12:45 pm
by shoko
My server has ram 8G

Can set ram ? for gameserver
-Xms4024m -Xmx4024m >>>> 4GB RAM

Re: how to allocate more Ram to the gameserver

Posted: Sat May 19, 2012 12:02 am
by Micr0
yes
for windows xp/vista/7 etc edit gameserver.bat
for linux or etc edit file GameServer_loop.sh

only change this two line -Xms1024m -Xmx1024m

Re: how to allocate more Ram to the gameserver

Posted: Sat May 19, 2012 4:38 am
by MELERIX
you don't need to increase -Xms like -Xmx, remember that Xms is initial heap size.

if you use 32 bits -Xms1204m should be enough.
if you use 64 bits -Xms2048m should be enough.

also you shouldn't assign whole system memory to -Xmx, because you share system memory with Windows and MySQL.

Re: how to allocate more Ram to the gameserver

Posted: Mon Aug 06, 2012 5:08 pm
by valdaron
Hello.

I have Ubuntu and I can't set any of this:

-Xms2024m -Xmx2024m >>>> 2GB RAM
-Xms3024m -Xmx3024m >>>> 3GB RAM
-Xms4024m -Xmx4024m >>>> 4GB RAM
-Xms5024m -Xmx5024m >>>> 5GB RAM
-Xms6024m -Xmx6024m >>>> 6GB RAM

Machine have 16gb RAM

Finally I set -Xms1024M -Xmx1536M and it works but I'm afraid that is not enough.
Any idea how to put more ram?

Re: how to allocate more Ram to the gameserver

Posted: Mon Aug 06, 2012 5:17 pm
by jurchiks
-Xms2g -Xmx8g should be enough for you. Also, how do you know it's not set? You don't actually need l2j to allocate all 16 gigabytes of RAM on startup, that would be insane.

Re: how to allocate more Ram to the gameserver

Posted: Mon Aug 06, 2012 6:08 pm
by valdaron
I have bad feelings, I'll check tomorrow at the morning and I'll let U know.
I tried many options like -Xms1g -Xmx5g, -Xms1024M -Xmx8192M, ..., and I had :
Invalid maximum heap size: -Xmx5g
The specified size exceeds the maximum representable size.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Re: how to allocate more Ram to the gameserver

Posted: Mon Aug 06, 2012 6:10 pm
by midnex
install 64bit java/os