Page 1 of 2
About Memory
Posted: Sun Jul 18, 2010 2:49 pm
by LaraCroft
Hi guys...
I have a small doubt... Which can also be doubt of others...
I searched the forum but not found an answer...
I have this PC to run the server:
Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz, 8 cores
With 8 GB of memory and Linux Ubuntu 9 64 Bits
Currently I use this configuration to start the server:
java -server -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms2048m -Xmx2048m -Xmn1024m -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1
How much memory can I use on this memory options?
I can use all memory or just the minimum to start the server?
I want to find the best configuration to increase the server performance.
My server have an average of 120 players online.
Thx a lot...

Re: About Memory
Posted: Sun Jul 18, 2010 4:08 pm
by dinor
You can use over half memory
you can try this
Code: Select all
java -server -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms2048m -Xmx5000m -Xmn512m -Xss128k -XX:ParallelGCThreads=6 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -XX:+AggressiveOpts -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1
if you see server is unstable remove -XX:+AggressiveOpts
if you have 2 HDD move your database only to the 2nd HDD for better performance
Re: About Memory
Posted: Tue Jul 20, 2010 3:07 am
by TheClown
Same question i haves this
Code: Select all
HP ProLiant DL180 G5Microsoft Windows Server 2003 R2 x64QuadCore Intel Xeon E5405, 2000 MHz (6 x 333)System Memory: 9216 MBChannel0-DIMM1: Qimonda 72T512220EP3SC2 4 GB DDR2-667 Reg. ECC DDR2 SDRAM (5-5-5-15 @ 333 MHz) (4-4-4-12 @ 266 MHz) (3-3-3-9 @ 200 MHz)Channel0-DIMM5: Qimonda 72T512220EP3SC2 4 GB DDR2-667 Reg. ECC DDR2 SDRAM (5-5-5-15 @ 333 MHz) (4-4-4-12 @ 266 MHz) (3-3-3-9 @ 200 MHz)Channel0-DIMM6: Micron 18HTF12872PY-667F1 1 GB DDR2-667 Reg. ECC DDR2 SDRAM (5-5-5-15 @ 333 MHz) (4-4-4-12 @ 266 MHz) (3-3-3-9 @ 200 MHz)HP LOGICAL VOLUME SCSI Disk Device (465 GB) 15.000 RPM
Currently configuration to start the server:
Code: Select all
java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms4096m -Xmx4096m -cp
I have 550 players Online
Re: About Memory
Posted: Tue Jul 20, 2010 7:26 am
by dinor
You can use the same, just change the -XX:ParallelGCThreads from 6 to 3
Re: About Memory
Posted: Tue Jul 20, 2010 7:58 am
by TheClown
Code: Select all
java -server -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms2048m -Xmx5000m -Xmn512m -Xss128k -XX:ParallelGCThreads=6 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -XX:+AggressiveOpts -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1
this dont work for my
Re: About Memory
Posted: Tue Jul 20, 2010 8:26 am
by dinor
did you change the
-XX:ParallelGCThreads from 6 to 3?
also remove this
> log/stdout.log 2>&1
if it says that you don't have much memory to do this then change
to
Re: About Memory
Posted: Tue Jul 20, 2010 11:06 am
by LaraCroft
these options are for windows server?
Code: Select all
-XX:ParallelGCThreads=6 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -XX:+AggressiveOpts
I guess it does not work on linux server.

Re: About Memory
Posted: Tue Jul 20, 2010 11:36 am
by dinor
Re: About Memory
Posted: Wed Jul 21, 2010 9:59 pm
by badboy29
LaraCroft wrote:these options are for windows server?
Code: Select all
-XX:ParallelGCThreads=6 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -XX:+AggressiveOpts
I guess it does not work on linux server.

Works and i use Debian 5.0 x64 on Quad Core CPU:
(my test server is running on windows and this startup works too, sure, on bat file

)
Code: Select all
#!/bin/bash # exit codes of GameServer:# 0 normal shutdown# 2 reboot attempt while :; do [ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M-%S`_java.log" [ -f log/stdout.log ] && mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log" java -server -Dfile.encoding=UTF-8 -Xms2g -Xmx5g -Xmn512m -Xss128k -XX:ParallelGCThreads=2 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -XX:+AggressiveOpts -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1 [ $? -ne 2 ] && break# /etc/init.d/mysql restart sleep 10done
Re: About Memory
Posted: Thu Jul 22, 2010 2:35 am
by Szponiasty
Hmm. Instead of doing combinations with 1000 types of garbage collectors, I advice you to use "-XX:+UseCompressedOops". Makes 64bit VM work a little like 32bit, while still having all 3+GB physical RAM acessible. I've tuned a little config to suit my servers, and have to say - this options makes a huge difference if it comes to server performance. Here's sample config, it's from my event server (PhenomX4 945, 8GB DDR3, Win7 x64):
Code: Select all
java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xmn512m -Xms1024m -Xmx4096m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts -XX:MaxPermSize=512m -XX:+UseCompressedOops -server -cp ./../libs/*;L2_GameServer.jar com.l2jserver.gameserver.GameServer
//EDIT: Short description if anyone interested:
http://download.oracle.com/docs/cd/E174 ... dOops.html
Re: About Memory
Posted: Thu Jul 22, 2010 9:45 am
by JMD
for 2 gb of ram whats the setting?
Re: About Memory
Posted: Thu Jul 22, 2010 12:50 pm
by Raikkon35
Here is my report about memory consumption using different values in startGameServer.bat.
I wish I could try it on a dedicated server, but now I don't have. I'm trying it in my PC (test server):
- ASUS P5Q Pro
- Intel Core 2 Duo E6600 @ 3.00 Ghz
- 4 GB RAM Kingston DDR2 667 Mhz
- Gigabyte GeForce GTX 260 OC 896 MB GDDR3
- Creative Sound Blaster X-Fi Titanium Fatal1ty Pro
- Seagate 400 GB 7200.10
Default (clean server): 1.067.504 KB.
Default with -XX:+UseCompressedOops: 858.972 KB.
My own config: 652.408 KB.
Server is loaded with geodata and pathnodes!
My own config is a fast compilation of the things that I view in this topic.
I do not repair about specific configurations, so don't flame!
java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1g -Xmx1g -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -Xnoclassgc -XX:+AggressiveOpts -XX:+UseCompressedOops -XX:ParallelGCThreads=2 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:MaxTenuringThreshold=31 -cp ./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServer
Re: About Memory
Posted: Thu Jul 22, 2010 1:06 pm
by LaraCroft
Hi guys...
Im using this on Linux Ubuntu 9 64 Bits:
Code: Select all
#!/bin/bash # exit codes of GameServer:# 0 normal shutdown# 2 reboot attempt while :; do [ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M-%S`_java.log" [ -f log/stdout.log ] && mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log" java -server -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xmx4096m -Xms2048m -Xmn1024m -Xss256k -XX:ParallelGCThreads=6 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -XX:+AggressiveOpts -Dc3p0.unreturnedConnectionTimeout=1500 -Dc3p0.maxStatements=150 -Dc3p0.maxIdleTime=300 -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1 [ $? -ne 2 ] && break# /etc/init.d/mysql restart sleep 10done
worked very well... without errors...
I see a small performance increase... On average of 100 players on...
Only one detail...
The usage of cpu are increased... on average stay of 50%...

Re: About Memory
Posted: Thu Jul 22, 2010 1:25 pm
by Szponiasty
LaraCroft wrote:Hi guys...
Im using this on Linux Ubuntu 9 64 Bits:
Code: Select all
#!/bin/bash # exit codes of GameServer:# 0 normal shutdown# 2 reboot attempt while :; do [ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M-%S`_java.log" [ -f log/stdout.log ] && mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log" java -server -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xmx4096m -Xms2048m -Xmn1024m -Xss256k -XX:ParallelGCThreads=6 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -XX:+AggressiveOpts -Dc3p0.unreturnedConnectionTimeout=1500 -Dc3p0.maxStatements=150 -Dc3p0.maxIdleTime=300 -cp ./../libs/*:l2jserver.jar com.l2jserver.gameserver.GameServer > log/stdout.log 2>&1 [ $? -ne 2 ] && break# /etc/init.d/mysql restart sleep 10done
worked very well... without errors...
I see a small performance increase... On average of 100 players on...
Only one detail...
The usage of cpu are increased... on average stay of 50%...

Code: Select all
-Dc3p0.unreturnedConnectionTimeout=1500 -Dc3p0.maxStatements=150 -Dc3p0.maxIdleTime=300
do some testing, you're set to 150 max statements. Lately i had up to 1200 on my serv, on ~230 ppl online. If you set it too low your ppl will probably start loosing things

Re: About Memory
Posted: Thu Jul 22, 2010 5:05 pm
by LaraCroft