[Help] Best Settings Mysql, Java, Linux!

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
Mage
Posts: 277
Joined: Fri Apr 17, 2009 2:29 pm

[Help] Best Settings Mysql, Java, Linux!

Post by Mage »

Hello Members,

I'am helping an Admin to create a great Server. He ordered this Machine:

Code: Select all

Marca 	IntelModelo 	i7 920Frequenza 	4x 2x 2.66 GHzNIC 	GigaEthernetMemoria RAM 	8 GBDisco 	2 x 1 TBLine     1 Gbps
The Server have 80-150 Players Online.

In this Maching there are GS, LS, Mysql, Site. (Not forum)

Now first to transfer all the server on the new machine I wanted to test the best setting.

-Java
-Mysql
-Linux

For linux i found this guide that it's very usefull:
http://l2-adrenaline.com/linux/L2DCLinu ... elease.pdf

But i'm searching also the best string to lunch the gamserver_loop.sh, i found this:

Code: Select all

 java -server -Xms768m -Xmx3g -Xmn256m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+DoEscapeAnalysis -XX:+UseCompressedOops -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -XX:+AggressiveOpts
For Mysql i don't find nothing, only this settings:

Code: Select all

 skip-external-lockingmemlockmyisam-recover = BACKUPkey_buffer = 600Mjoin_buffer = 10Mjoin_buffer_size = 256Kmax_allowed_packet = 32Mthread_stack = 256Kthread_cache_size = 16max_connections = 600table_cache = 1024#thread_concurrency = 10query_cache_limit = 128Mquery_cache_size = 512Mquery_cache_type = 1
Are good?


Any help is welcomed, although some guides are fine ;)

Mage
Last edited by Mage on Mon May 03, 2010 9:46 pm, edited 1 time in total.
Forum rules: Please do not use or alter the official L2J Avatars/Signatures/Names for your personal use.
macdonald12
Posts: 89
Joined: Mon Sep 15, 2008 8:51 am

Re: [Help] Best Settings Mysql, Java, Linux!

Post by macdonald12 »

The assigned 3 gigabyte RAM for the gameserver is too much if the machine only has 4 gig and is running all those other services.
Mage
Posts: 277
Joined: Fri Apr 17, 2009 2:29 pm

Re: [Help] Best Settings Mysql, Java, Linux!

Post by Mage »

macdonald12 wrote:The assigned 3 gigabyte RAM for the gameserver is too much if the machine only has 4 gig and is running all those other services.
Yes, the Admin decided to change the Machine with this.

Code: Select all

 Marca 	IntelModelo 	i7 920Frequenza 	4x 2x 2.66 GHzNIC 	GigaEthernetMemoria RAM 	8 GBDisco 	2 x 1 TB

I search the best Settings, Thank for the Advises.

Mage
Forum rules: Please do not use or alter the official L2J Avatars/Signatures/Names for your personal use.
User avatar
badboy29
Posts: 417
Joined: Fri Apr 24, 2009 5:34 am
Location: Brazil

Re: [Help] Best Settings Mysql, Java, Linux!

Post by badboy29 »

Mage i currently use it:

MySQL Server(static tables on MyISAM and dynamic tables on INNODB):

Code: Select all

default-storage-engine=INNODBmax_connections=300table_cache=3000query_cache_size=350Mquery_cache_type=1query_cache_limit=512ktmp_table_size=512Mmax_heap_table_size=512Mthread_cache_size=2048log_slow_queriesmemlockwait_timeout =3600interactive_timeout=3600query_prealloc_size=16k #*** MyISAM Specific optionsmyisam_max_sort_file_size=100Gmyisam_max_extra_sort_file_size=100Gmyisam_sort_buffer_size=30Mkey_buffer_size=350Mread_buffer_size=64Kread_rnd_buffer_size=256Ksort_buffer_size=256k # #*** INNODB Specific options ***innodb_additional_mem_pool_size=8Minnodb_flush_log_at_trx_commit=1innodb_log_buffer_size=16Minnodb_buffer_pool_size=1024Minnodb_log_file_size=150Minnodb_thread_concurrency=8innodb_lock_wait_timeout =50innodb_file_per_tableinnodb_open_files=2400
-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 12M (Tables: 82)
[--] Data in InnoDB tables: 216M (Tables: 54)
[OK] Total fragmented tables: 0

-------- Performance Metrics -------------------------------------------------
[--] Up for: 1d 5h 14m 35s (2M q [25.370 qps], 2K conn, TX: 452M, RX: 412M)
[--] Reads / Writes: 13% / 87%
[--] Total buffers: 2.2G global + 952.0K per thread (300 max threads)
[OK] Maximum possible memory usage: 2.5G (31% of installed RAM)
[OK] Slow queries: 0% (0/2M)
[OK] Highest usage of available connections: 13% (40/300)
[OK] Key buffer size / total MyISAM indexes: 350.0M/126.9M
[OK] Key buffer hit rate: 99.3% (249K cached / 1K reads)
[OK] Query cache efficiency: 42.6% (236K cached / 555K selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (45 temp sorts / 20K sorts)
[OK] Temporary tables created on disk: 3% (67 on disk / 1K total)
[OK] Thread cache hit rate: 98% (40 created / 2K connections)
[OK] Table cache hit rate: 97% (199 open / 205 opened)
[OK] Open file limit used: 3% (204/6K)
[OK] Table locks acquired immediately: 99% (2M immediate / 2M locks)
[OK] InnoDB data size / buffer pool: 216.1M/1.0G

-------- Recommendations -----------------------------------------------------
No additional performance recommendations are available.
Use this tool, help a lot: http://blog.mysqltuner.com/download/
GS:

Code: Select all

nice -n -2 java -server -Dfile.encoding=UTF-8 -Xms2g -Xmx5g -Xmn512m -Xss128k -XX:PermSize=128m -XX:MaxPermSize=768m -XX:ParallelGCThreads=2 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 -XX:CMSIncrementalDutyCycle=10 -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -XX:+AggressiveOpts -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:gc.txt
I use this on machine Debian 5.0 x64(Quad Core Xeon with 8GB Ram). For you, replace -XX:ParallelGCThreads=2 to -XX:ParallelGCThreads=6
Last edited by badboy29 on Sun May 23, 2010 10:51 pm, edited 1 time in total.
Aka UnHoly
User avatar
badboy29
Posts: 417
Joined: Fri Apr 24, 2009 5:34 am
Location: Brazil

Re: [Help] Best Settings Mysql, Java, Linux!

Post by badboy29 »

Update JVM settings by *fork* Guide :)
Aka UnHoly
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: [Help] Best Settings Mysql, Java, Linux!

Post by UnAfraid »

the command nice its root command how i know why you run the server under root user?
I saw somewhere in source code the server is setting priority automatically ..

i am using

Code: Select all

ulimit -n 8192
about the problem with "too many open files"

and running the server under non-root users mysql, linux
Image
Post Reply