Server Increase performance question.

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
xone
Posts: 122
Joined: Thu Nov 05, 2009 5:04 am

Re: Server Increase performance question.

Post by xone »

Yes very useful , Thanks!
maxstyleboy
Posts: 183
Joined: Thu Jul 15, 2010 12:26 am

Re: Server Increase performance question.

Post by maxstyleboy »

400 players on have lag.

Quad Core i7
8GB Ram ddr3
150 GB 10K RPM SATA2 Hard Drive
100mbps down/up duplex
------------------------------------------

Java JDK JRE 64bit
Mysql 5.5 64bit

------------------------------------------
my.ini

Code: Select all

# SERVER SECTION# ----------------------------------------------------------------------## The following options will be read by the MySQL Server. Make sure that# you have installed the server correctly (see above) so it reads this # file.#[mysqld] # The TCP/IP Port the MySQL Server will listen onport=3306  #Path to installation directory. All paths are usually resolved relative to this.basedir="C:/Program Files/MySQL/MySQL Server 5.5/" #Path to the database rootdatadir="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.5/Data/" # The default character set that will be used when a new schema or table is# created and no character set is definedcharacter-set-server=latin1 # The default storage engine that will be used when create new tables whendefault-storage-engine=INNODB # Set the SQL mode to strictsql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" # The maximum amount of concurrent sessions the MySQL server will# allow. One of these connections will be reserved for a user with# SUPER privileges to allow the administrator to login even if the# connection limit has been reached.max_connections=600 # Query cache is used to cache SELECT results and later return them# without actual executing the same query once again. Having the query# cache enabled may result in significant speed improvements, if your# have a lot of identical queries and rarely changing tables. See the# "Qcache_lowmem_prunes" status variable to check if the current value# is high enough for your load.# Note: In case your tables change very often or if your queries are# textually different every time, the query cache may result in a# slowdown instead of a performance improvement.query_cache_size=0 # The number of open tables for all threads. Increasing this value# increases the number of file descriptors that mysqld requires.# Therefore you have to make sure to set the amount of open files# allowed to at least 4096 in the variable "open-files-limit" in# section [mysqld_safe]table_cache=400 # Maximum size for internal (in-memory) temporary tables. If a table# grows larger than this value, it is automatically converted to disk# based table This limitation is for a single table. There can be many# of them.tmp_table_size=256M  # How many threads we should keep in a cache for reuse. When a client# disconnects, the client's threads are put in the cache if there aren't# more than thread_cache_size threads from before.  This greatly reduces# the amount of thread creations needed if you have a lot of new# connections. (Normally this doesn't give a notable performance# improvement if you have a good thread implementation.)thread_cache_size=8 #*** MyISAM Specific options # The maximum size of the temporary file MySQL is allowed to use while# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.# If the file-size would be bigger than this, the index will be created# through the key cache (which is slower).myisam_max_sort_file_size=100G # If the temporary file used for fast index creation would be bigger# than using the key cache by the amount specified here, then prefer the# key cache method.  This is mainly used to force long character keys in# large tables to use the slower key cache method to create the index.myisam_sort_buffer_size=510M # Size of the Key Buffer, used to cache index blocks for MyISAM tables.# Do not set it larger than 30% of your available memory, as some memory# is also required by the OS to cache rows. Even if you're not using# MyISAM tables, you should still set it to 8-64M as it will also be# used for internal temporary disk tables.key_buffer_size=554M # Size of the buffer used for doing full table scans of MyISAM tables.# Allocated per thread, if a full scan is needed.read_buffer_size=128Kread_rnd_buffer_size=512K # This buffer is allocated when MySQL needs to rebuild the index in# REPAIR, OPTIMZE, ALTER table statements as well as in LOAD DATA INFILE# into an empty table. It is allocated per thread so be careful with# large settings.sort_buffer_size=512K  #*** INNODB Specific options ***  # Use this option if you have a MySQL server with InnoDB support enabled# but you do not plan to use it. This will save memory and disk space# and speed up some things.#skip-innodb # Additional memory pool that is used by InnoDB to store metadata# information.  If InnoDB requires more memory for this purpose it will# start to allocate it from the OS.  As this is fast enough on most# recent operating systems, you normally do not need to change this# value. SHOW INNODB STATUS will display the current amount used.innodb_additional_mem_pool_size=15M # If set to 1, InnoDB will flush (fsync) the transaction logs to the# disk at each commit, which offers full ACID behavior. If you are# willing to compromise this safety, and you are running small# transactions, you may set this to 0 or 2 to reduce disk I/O to the# logs. Value 0 means that the log is only written to the log file and# the log file flushed to disk approximately once per second. Value 2# means the log is written to the log file at each commit, but the log# file is only flushed to disk approximately once per second.innodb_flush_log_at_trx_commit=2 # The size of the buffer InnoDB uses for buffering log data. As soon as# it is full, InnoDB will have to flush it to disk. As it is flushed# once per second anyway, it does not make sense to have it very large# (even with long transactions).innodb_log_buffer_size=10M # InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and# row data. The bigger you set this the less disk I/O is needed to# access data in tables. On a dedicated database server you may set this# parameter up to 80% of the machine physical memory size. Do not set it# too large, though, because competition of the physical memory may# cause paging in the operating system.  Note that on 32bit systems you# might be limited to 2-3.5G of user level memory per process, so do not# set it too high.innodb_buffer_pool_size=1G # Size of each log file in a log group. You should set the combined size# of log files to about 25%-100% of your buffer pool size to avoid# unneeded buffer pool flush activity on log file overwrite. However,# note that a larger logfile size will increase the time needed for the# recovery process.innodb_log_file_size=343M # Number of threads allowed inside the InnoDB kernel. The optimal value# depends highly on the application, hardware as well as the OS# scheduler properties. A too high value may lead to thread thrashing.innodb_thread_concurrency=40
StartGameServer.bat

Code: Select all

@echo offtitle Game Server Console:startecho Starting L2J Game Server.echo.REM -------------------------------------REM Default parameters for a basic server.REM java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms4024m -Xmx6024m -cp ./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServerREMREM If you have a big server and lots of memory, you could experiment for example withREM java -server -Xmx1536m -Xms1024m -Xmn512m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOptsREM If you are having troubles on server shutdown (saving data),REM add this to startup paramethers: -Djava.util.logging.manager=com.l2jserver.L2LogManager. Example:REMjava -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xmx7096m -cp ./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServerjava -server -Xmx4096m -Xms2048m -Xmn1024m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts -cp ./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServerREM -------------------------------------if ERRORLEVEL 2 goto restartif ERRORLEVEL 1 goto errorgoto end:restartecho.echo Admin Restart ...echo.goto start:errorecho.echo Server terminated abnormalyecho.:endecho.echo server terminatedecho.pause
maxstyleboy
Posts: 183
Joined: Thu Jul 15, 2010 12:26 am

Re: Server Increase performance question.

Post by maxstyleboy »

have lag only local pvp
maxstyleboy
Posts: 183
Joined: Thu Jul 15, 2010 12:26 am

Re: Server Increase performance question.

Post by maxstyleboy »

i need help...
User avatar
xone
Posts: 122
Joined: Thu Nov 05, 2009 5:04 am

Re: Server Increase performance question.

Post by xone »

Any ideeas why MySQL can't lock memory?
Searched on the Net for answers ... but nothing ...
110216 14:13:26 [Note] Plugin 'FEDERATED' is disabled.
110216 14:13:26 InnoDB: Started; log sequence number 0 44233
110216 14:13:26 [Warning] Failed to lock memory. Errno: 12

110216 14:13:26 [Note] Event Scheduler: Loaded 0 events
110216 14:13:26 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-1ubuntu8.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306$
Using this:

Code: Select all

memlockmyisam-recover = BACKUPkey_buffer = 600Mjoin_buffer = 10Mjoin_buffer_size = 256Kmax_allowed_packet = 32Mthread_stack = 256Kthread_cache_size = 16max_connections = 600table_cache = 1024thread_concurrency = 8query_cache_limit = 128Mquery_cache_size = 512Mquery_cache_type = 1skip-federated 
macdonald12
Posts: 89
Joined: Mon Sep 15, 2008 8:51 am

Re: Server Increase performance question.

Post by macdonald12 »

Code: Select all

Error 12 is OS error code:(ENOMEM) Out of memory.
MySQL cannot 'claim' memory that's not available.
User avatar
xone
Posts: 122
Joined: Thu Nov 05, 2009 5:04 am

Re: Server Increase performance question.

Post by xone »

well memory as in RAM I presume, got 8GB RAM using ubuntu Server x64 ... only thing that was using memory was mysql when it started :)) ... this mysql is making me crazy ... lol
macdonald12
Posts: 89
Joined: Mon Sep 15, 2008 8:51 am

Re: Server Increase performance question.

Post by macdonald12 »

Having 8 GB available and not being able to use 600M is quite strange ;)

Try decreasing the memory for MySQL and see if that goes without errors. If so, then you might want to test your ram-modules for errors.
User avatar
xone
Posts: 122
Joined: Thu Nov 05, 2009 5:04 am

Re: Server Increase performance question.

Post by xone »

I will try to decrese MySQL`s memory, if that doesn't work ... I'm stuck ...
and my ram-modules are clean ... they are 2 weeks old ... and tested with memtest (latest version) when I first installed them.
macdonald12
Posts: 89
Joined: Mon Sep 15, 2008 8:51 am

Re: Server Increase performance question.

Post by macdonald12 »

What happens with the L2J-server itself? Does it swap everything?
User avatar
xone
Posts: 122
Joined: Thu Nov 05, 2009 5:04 am

Re: Server Increase performance question.

Post by xone »

macdonald12 wrote:What happens with the L2J-server itself? Does it swap everything?
What exactly do you mean by swap everything ?
When I changed config with 'memlock" the l2jserver database was already in mysql.
Could that have made memlock not usable ?
macdonald12
Posts: 89
Joined: Mon Sep 15, 2008 8:51 am

Re: Server Increase performance question.

Post by macdonald12 »

xone wrote: When I changed config with 'memlock" the l2jserver database was already in mysql.
Could that have made memlock not usable ?
No, that should not cause a problem. Memlock can be enabled / disabled at any moment.
xone wrote:What exactly do you mean by swap everything ?
Well, since the OS seems to 'be out of memory' when trying to give 600M of RAM to MySQL, what happens with your memory-usage when afterward you start your gameserver process, which - for example - wants an additional 1024M. Ideally it should consume RAM and not swap it out to the page-file.

If your page-file does not increase in size when starting up MySQL, starting up the gameserver or while running the gameserver, then i think you can ignore this error message.
User avatar
xone
Posts: 122
Joined: Thu Nov 05, 2009 5:04 am

Re: Server Increase performance question.

Post by xone »

Thanks for the helpfull info and the help :D !

Seems swap memory isn't used.
You do not have the required permissions to view the files attached to this post.
User avatar
Stake
Posts: 383
Joined: Sun Mar 23, 2008 9:33 pm
Location: Hungary
Contact:

Re: Server Increase performance question.

Post by Stake »

Swap is a virtual memory partition. Since you have enough physical memory, virtual is not needed.
Image
Image
macdonald12
Posts: 89
Joined: Mon Sep 15, 2008 8:51 am

Re: Server Increase performance question.

Post by macdonald12 »

xone wrote:Seems swap memory isn't used.
Then i think everything is fine :)
Post Reply