About Memory

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
User avatar
LaraCroft
Posts: 360
Joined: Sat Aug 08, 2009 1:37 am

About Memory

Post 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...
:mrgreen:
!!!knowledge and intelligence must be shared!!!
dinor
Posts: 141
Joined: Tue Aug 26, 2008 10:07 am

Re: About Memory

Post 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
User avatar
TheClown
Posts: 54
Joined: Wed Feb 20, 2008 7:41 pm
Location: Chile

Re: About Memory

Post 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
dinor
Posts: 141
Joined: Tue Aug 26, 2008 10:07 am

Re: About Memory

Post by dinor »

You can use the same, just change the -XX:ParallelGCThreads from 6 to 3
User avatar
TheClown
Posts: 54
Joined: Wed Feb 20, 2008 7:41 pm
Location: Chile

Re: About Memory

Post 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
dinor
Posts: 141
Joined: Tue Aug 26, 2008 10:07 am

Re: About Memory

Post 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

Code: Select all

-Xmx5000m
to

Code: Select all

-Xmx4096m
User avatar
LaraCroft
Posts: 360
Joined: Sat Aug 08, 2009 1:37 am

Re: About Memory

Post 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.
:|
!!!knowledge and intelligence must be shared!!!
dinor
Posts: 141
Joined: Tue Aug 26, 2008 10:07 am

Re: About Memory

Post by dinor »

no these are java commands

read here and try make a good configuration for your system

http://java.sun.com/docs/hotspot/gc1.4.2/faq.html

http://www.petefreitag.com/articles/gctuning/

http://publib.boulder.ibm.com/infocente ... nejvm.html

note: you need to have jdk installed, not just jre
User avatar
badboy29
Posts: 417
Joined: Fri Apr 24, 2009 5:34 am
Location: Brazil

Re: About Memory

Post 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 :P)

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 
Aka UnHoly
User avatar
Szponiasty
Advanced User
Advanced User
Posts: 557
Joined: Mon Apr 21, 2008 1:31 pm
Location: Eastern Poland

Re: About Memory

Post 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
And in the next chronicle they went into space, fighting the evil empire... In a galaxy far, far away xD
JMD
Advanced User
Advanced User
Posts: 1440
Joined: Wed Apr 15, 2009 10:07 am

Re: About Memory

Post by JMD »

for 2 gb of ram whats the setting?
User avatar
Raikkon35
Posts: 178
Joined: Sat Mar 08, 2008 2:54 pm

Re: About Memory

Post 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! :D
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
User avatar
LaraCroft
Posts: 360
Joined: Sat Aug 08, 2009 1:37 am

Re: About Memory

Post 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...
:mrgreen:

Only one detail...
The usage of cpu are increased... on average stay of 50%...
:|
!!!knowledge and intelligence must be shared!!!
User avatar
Szponiasty
Advanced User
Advanced User
Posts: 557
Joined: Mon Apr 21, 2008 1:31 pm
Location: Eastern Poland

Re: About Memory

Post 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...
:mrgreen:

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 :(
And in the next chronicle they went into space, fighting the evil empire... In a galaxy far, far away xD
User avatar
LaraCroft
Posts: 360
Joined: Sat Aug 08, 2009 1:37 am

Re: About Memory

Post by LaraCroft »

!!!knowledge and intelligence must be shared!!!
Post Reply