Hardware problem?

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
hope
Posts: 1160
Joined: Thu Aug 30, 2007 5:17 pm

Re: Hardware problem?

Post by hope »

elmatig89 wrote:
hope wrote:
elmatig89 wrote:Something strange is happening now. Some characters, not all of them, get stuck and after a while they start running to a random place. I have 600 characters online now counting offliners, could the sh1ti hard drive be the problem?
do u have a ftp running?
check task manager see what is using ur cpu to much
my cpu is always at 5%, or 10%, it has some 35%-40% pikes. Today ive discovered something, that probably is making the problem.

The error is happening at the same time this event runs: viewtopic.php?f=73&t=19807 (TvT rounds by SolidSnake). Maybe something in that code is making my server loose axis sync with some characters. I will test the server without the event. I will report the results asap.


hope wrote:-java -server -Xmx4096m -Xms2048m -Xmn1024m
+java -server -Xmx4g -Xms2g -Xmn1024m
i would put it like this dont think it will fix ur problem but u never know
I will try that, is that +java a typo error for -java or the (+) does change something?, if it does what it changes?. Just curious.
the - and the + are only showing you what has been changed dont add them to the console
change these two only -Xmx4g -Xms2g
User avatar
elmatig89
Posts: 79
Joined: Sun Dec 07, 2008 6:39 pm

Re: Hardware problem?

Post by elmatig89 »

oh... my mistake, its like a .diff, sry.
User avatar
Stake
Posts: 383
Joined: Sun Mar 23, 2008 9:33 pm
Location: Hungary
Contact:

Re: Hardware problem?

Post by Stake »

Do you run any programs at background that could affect the TCP communication? I mean like a packet blocker. But I think, you should try this with a clean core. Database could not be the problem, since that is updated only periodically, that you can set in config. The main part is stored in memory through the gs, so the problem could be caused by 2 things:
- wrong cpu or network overloading code in the core
- some other background applications you run under windows server consuming or blocking a lot of network traffic
Image
Image
User avatar
elmatig89
Posts: 79
Joined: Sun Dec 07, 2008 6:39 pm

Re: Hardware problem?

Post by elmatig89 »

Now with 720 characters online + giran and aden sieges going on the problem intensifies, almost everyone that was on giran siege started runing to the other side, so they needed to restart. Also in aden lot of ppl reported the same problem. I have the java console opened, and the cpu usage never goes more than 40%, its using between 5 and 15% and it have pikes of 40%. The GC is running smoothly. It is strange. Could it be because of insufcient I/O transfer of my HDD?
User avatar
elmatig89
Posts: 79
Joined: Sun Dec 07, 2008 6:39 pm

Re: Hardware problem?

Post by elmatig89 »

Limitless wrote:Yeap or the line
Sorry im not a native english speaker. What do you mean with "Yeap or the line"?
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Hardware problem?

Post by jurchiks »

it was probably smth like:
Yep. Or the network connection.
Basically just post-counting.
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
elmatig89
Posts: 79
Joined: Sun Dec 07, 2008 6:39 pm

Re: Hardware problem?

Post by elmatig89 »

jurchiks wrote:it was probably smth like:
Yep. Or the network connection.
Basically just post-counting.
Oh, thx jurchiks.

Ok now im having new reports from my users, ive added 2gbs to -Xmx in case the ram is insuficient so now is set to -Xmx6gb, but the problem persists. Today some users reported that they got stucked and all npcs dissapeared, they needed to restart the client, and when they restarted the users appeared in random places. The strange thing is that it always matches with the start of any event, such as siege or tvt, im suere the CPU is fine since it only uses between 2% and 6%, and it has 60% pikes now. With 700 characters online, the jconsole informs that the ram consume is between 1.2gb ~ 3.6 gb(in extreme cases such as 4 sieges going on with 750 characters online) and im using about 6% of my total bandwith (100mb dedicated). by discarding the problem must be the I/O max tranfer of my HDD, an unefficent code in my core or a bad mysql+JVM setting. The thing is that theres no custom code in my core excluding some typo changes (ive already checked my core and datapack modifications), and no one had any complain about this so far, so i just want to know, form someone who has the knowledge to afirm it, if an insuficient I/O max transfer of a HDD can generate this kind of problem, if it can, it must be a bad configuration of my.ini or jvm.

In case is a bad setting heres my.ini and my jvm config, so someone can help me to find the problem. Thank you all who is helping me solve this problem, im very gratefull to all of you guys.

my.ini (mysql 5.5)

Code: Select all

# MySQL Server Instance Configuration File# ----------------------------------------------------------------------# Generated by the MySQL Server Instance Configuration Wizard### Installation Instructions# ----------------------------------------------------------------------## On Linux you can copy this file to /etc/my.cnf to set global options,# mysql-data-dir/my.cnf to set server-specific options# (@localstatedir@ for this installation) or to# ~/.my.cnf to set user-specific options.## On Windows you should keep this file in the installation directory # of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). To# make sure the server reads the config file use the startup option # "--defaults-file". ## To run run the server from the command line, execute this in a # command line shell, e.g.# mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"## To install the server as a Windows service manually, execute this in a # command line shell, e.g.# mysqld --install MySQLXY --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"## And then execute this in a command line shell to start the server, e.g.# net start MySQLXY### Guildlines for editing this file# ----------------------------------------------------------------------## In this file, you can use all long options that the program supports.# If you want to know the options a program supports, start the program# with the "--help" option.## More detailed information about the individual options can also be# found in the manual.### CLIENT SECTION# ----------------------------------------------------------------------## The following options will be read by MySQL client applications.# Note that only client applications shipped by MySQL are guaranteed# to read this section. If you want your own MySQL client program to# honor these values, you need to specify it as an option during the# MySQL client library initialization.#[client] port=7765 [mysql] default-character-set=latin1  # 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=7765  #Path to installation directory. All paths are usually resolved relative to this.basedir="F:/Program Files/MySQL/MySQL Server 5.5/" #Path to the database rootdatadir="F:/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=800 # 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=87 # 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=768M  # 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=200 #*** 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=125M # 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=768M # 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=64Kread_rnd_buffer_size=256K # 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=256K  #*** 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=23M # 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=16M # 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=2G # 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=512M # 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=10 memlock innodb_file_per_table
JVM setting (Core REV:4545 ~ DP REV:7875) :

Code: Select all

java -server -Xmx6g -Xms2g -Xmn1024m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts -cp ./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServer
hope
Posts: 1160
Joined: Thu Aug 30, 2007 5:17 pm

Re: Hardware problem?

Post by hope »

putting it to 6g i would say is way to high 4g would be better
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Hardware problem?

Post by jurchiks »

Let's just say that l2j is not optimized for many players, no matter what you change in configs/javaopts you won't squeeze the life out of it, at best ~30% improvement in performance.
This project was written by hundreds of developers and there was nobody to keep track of it all so it's no wonder people have problems.
Using better hardware to improve performance is not the way programs are supposed to work.

I know this doesn't help at all, just felt like writing it.

But if you want to check out the javaopts in more depth, read this topic: http://forums.bukkit.org/threads/how-ca ... post-52782
it has some very nice explanations about some of the more often used javaopts.
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
elmatig89
Posts: 79
Joined: Sun Dec 07, 2008 6:39 pm

Re: Hardware problem?

Post by elmatig89 »

jurchiks wrote:Let's just say that l2j is not optimized for many players, no matter what you change in configs/javaopts you won't squeeze the life out of it, at best ~30% improvement in performance.
This project was written by hundreds of developers and there was nobody to keep track of it all so it's no wonder people have problems.
Using better hardware to improve performance is not the way programs are supposed to work.

I know this doesn't help at all, just felt like writing it.

But if you want to check out the javaopts in more depth, read this topic: http://forums.bukkit.org/threads/how-ca ... post-52782
it has some very nice explanations about some of the more often used javaopts.
Hey jurchiks, i know that l2j is not optimized for many players, but i also think that 750 characters online (including offliners and dual box) is not the limit of this software, probably the problem that im having is not the quality of the code. I had, in the past, a server with more than 900 characters online, when offline system wasnt implemented and i had no problem with it, i know that know l2jserver has a lot of new revs, and may be one of those revs had a bad quality code implemented, but i doubt it since a lot of ppl is using this software and noone complained about it.
Thank you very much for the link, i will read it carefully. Im always willing to learn, thats how i first started with this, and i want to keep on learning. Thank you.
User avatar
badboy29
Posts: 417
Joined: Fri Apr 24, 2009 5:34 am
Location: Brazil

Re: Hardware problem?

Post by badboy29 »

jurchiks wrote:Let's just say that l2j is not optimized for many players, no matter what you change in configs/javaopts you won't squeeze the life out of it, at best ~30% improvement in performance.
This project was written by hundreds of developers and there was nobody to keep track of it all so it's no wonder people have problems.
Using better hardware to improve performance is not the way programs are supposed to work.

I know this doesn't help at all, just felt like writing it.

But if you want to check out the javaopts in more depth, read this topic: http://forums.bukkit.org/threads/how-ca ... post-52782
it has some very nice explanations about some of the more often used javaopts.
Really nice link jurchiks, thank you very much :P I will play with these parameters :)
Aka UnHoly
User avatar
elmatig89
Posts: 79
Joined: Sun Dec 07, 2008 6:39 pm

Re: Hardware problem?

Post by elmatig89 »

ive found a really nice jvm config for my server considering my hardware, it runs really smooth and the gc is giving no lag at all. But the problem persists, ive disabled the community since maybe that is increasing the db usage. the problem persists but not as frequent as before, so i think its a hdd problem, i will try making a 15 gb particion to the hdd to optimize it.
User avatar
badboy29
Posts: 417
Joined: Fri Apr 24, 2009 5:34 am
Location: Brazil

Re: Hardware problem?

Post by badboy29 »

elmatig89 wrote:ive found a really nice jvm config for my server considering my hardware, it runs really smooth and the gc is giving no lag at all. But the problem persists, ive disabled the community since maybe that is increasing the db usage. the problem persists but not as frequent as before, so i think its a hdd problem, i will try making a 15 gb particion to the hdd to optimize it.
You have some scripts on your site, like top pvp/pk, etc ? If yes, try disable this and checks if the same problem occurs in the last 24 hours. Also when you see these problems, connect on telnet and type debug full, post your log here.
Aka UnHoly
User avatar
elmatig89
Posts: 79
Joined: Sun Dec 07, 2008 6:39 pm

Re: Hardware problem?

Post by elmatig89 »

badboy29 wrote:
elmatig89 wrote:ive found a really nice jvm config for my server considering my hardware, it runs really smooth and the gc is giving no lag at all. But the problem persists, ive disabled the community since maybe that is increasing the db usage. the problem persists but not as frequent as before, so i think its a hdd problem, i will try making a 15 gb particion to the hdd to optimize it.
You have some scripts on your site, like top pvp/pk, etc ? If yes, try disable this and checks if the same problem occurs in the last 24 hours. Also when you see these problems, connect on telnet and type debug full, post your log here.
Thank you badboy29, ive disabled all php scripts that uses database except for Account Manager and the problem isnt so frecuent, i will enable telnet and post the full debug asap.

I have a doubt, is it ok to set this in my.ini to 0?

Code: Select all

query_cache_size=0
Since some people told me that it was better for l2jserver to set it to 0 but it has no sense since l2jserver has a lot of repetitive querrys, isnt it? im just guesing.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Hardware problem?

Post by jurchiks »

most queries in l2j differ from each other, like inserting/deleting/updating an item almost always has a different item/char ID.
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.
Post Reply