how to allocate more Ram to the gameserver

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Kamira
Posts: 16
Joined: Sun Feb 20, 2011 1:44 pm

how to allocate more Ram to the gameserver

Post 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...
Sleek
Posts: 112
Joined: Tue Dec 28, 2010 1:11 pm

Re: how to allocate more Ram to the gameserver

Post 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.
Kamira
Posts: 16
Joined: Sun Feb 20, 2011 1:44 pm

Re: how to allocate more Ram to the gameserver

Post by Kamira »

but how?? i use winscp what i must do?
Kamira
Posts: 16
Joined: Sun Feb 20, 2011 1:44 pm

Re: how to allocate more Ram to the gameserver

Post by Kamira »

i found it out :D all ok now ^^ thx
User avatar
Micr0
Posts: 119
Joined: Sun Sep 05, 2010 5:44 pm

Re: how to allocate more Ram to the gameserver

Post 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
User avatar
shoko
Posts: 160
Joined: Sat Jul 28, 2007 11:46 am

Re: how to allocate more Ram to the gameserver

Post by shoko »

My server has ram 8G

Can set ram ? for gameserver
-Xms4024m -Xmx4024m >>>> 4GB RAM
User avatar
Micr0
Posts: 119
Joined: Sun Sep 05, 2010 5:44 pm

Re: how to allocate more Ram to the gameserver

Post 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
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: how to allocate more Ram to the gameserver

Post 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.
User avatar
valdaron
Posts: 199
Joined: Mon Apr 18, 2011 3:11 pm
Location: Poland

Re: how to allocate more Ram to the gameserver

Post 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?
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: how to allocate more Ram to the gameserver

Post 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.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
valdaron
Posts: 199
Joined: Mon Apr 18, 2011 3:11 pm
Location: Poland

Re: how to allocate more Ram to the gameserver

Post 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.
User avatar
midnex
Posts: 26
Joined: Wed Aug 13, 2008 5:39 am

Re: how to allocate more Ram to the gameserver

Post by midnex »

install 64bit java/os
Post Reply