weird mini lags

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
abeyerp
Posts: 7
Joined: Sat Jul 03, 2010 7:58 pm

weird mini lags

Post by abeyerp »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision 4176M:
L2JDP Revision 7405:

(YES, I HAVE USED SEARCH)

well.. since i started my server like 1 month ago it have some weird mini lags 1-5 secs when players cant do anything but npcs still acts and kill players when this smalls lags happens.

my server hardware:
Model: Tyan Tank GT-14
2x Xeon 5050 @ 3.0Ghz dual core
12gb DDR2 ram ECC
1x 320gb Sata 2 7200RPM HDD 2.5''

Line: 1GBPS inside my coutry, 20MBPS international.


Software:
OS: Windows server 2003 X64 R2 SP2
Java: latest.
Mysql: Mysql 5.1.48 64bits


I have 1 L2j server epilogue running with that hardware and 1 L2off HB server wunning on the same machine, but the lags are only for the l2j server dunno why.

L2J server IS NOT virtualized.


also, i have to restart l2j server every 2 days because of memory use of this l2j server... some fix for that without losing performance?


thanks.
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: weird mini lags

Post by JIV »

so you have mysql+l2j+mssql+l2off on one pc? lol
abeyerp
Posts: 7
Joined: Sat Jul 03, 2010 7:58 pm

Re: weird mini lags

Post by abeyerp »

that's not a good answer.

as i see you don't know the difference between a PC and a SERVER.


L2off doesn't have this weird lags, but the l2j server does.
dinor
Posts: 141
Joined: Tue Aug 26, 2008 10:07 am

Re: weird mini lags

Post by dinor »

check you java settings in startgameserver.bat
how many people do you have online?
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: weird mini lags

Post by MELERIX »

java + mysql + mssql + l2j + l2off in one server machine ? this is not a good idea xD specially when l2off have a lot of consoles and consume a lot of resources.
abeyerp
Posts: 7
Joined: Sat Jul 03, 2010 7:58 pm

Re: weird mini lags

Post by abeyerp »

as you can see, i have 2 Dual core Xeon + HT, so i have 8 proccessors and 12gb ram, i have always more than 6 gb ram free, the l2off server has ~150 players and the l2j server has ~60 players, so i don't know why does this lags comes.

also, with the l2off server down i still have this l2j server lags.

and what to check in startgameserver.bat??


i saw in some configurations in the l2j server that there's something about threads or something, what is that for? can i set it to use 2 cores?

with all server UP CPU usage is like 6% and network usage is no more than 2% at peak times.
dinor
Posts: 141
Joined: Tue Aug 26, 2008 10:07 am

Re: weird mini lags

Post by dinor »

startGameServer.bat:

Code: Select all

@echo offtitle Game Server Console:startecho Starting L2J Game Server.echo.REM -------------------------------------REM Default parameters for a basic server.java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1024m -Xmx1024m -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:REM java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xmx1024m -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 
I don't know if you are familiar with this, just right click and edit...

Add REM to the default parameters:
this:

Code: Select all

java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1024m -Xmx1024m -cp ./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServer
should be like this:

Code: Select all

REM java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1024m -Xmx1024m -cp ./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServer
And remove the REM from this:

Code: Select all

REM java -server -Xmx1536m -Xms1024m -Xmn512m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts
It is probably the reason you have lag...

Else if your server is not stable with these parameters, search in forum, there are plenty of guides with explenation of how this work...

One more thing, 2 game servers in 1 server machine is too match...
Not only because of the resourses that consumes but mostly because of the 2 DBs that you have.
Imagine that for each DB your hard drive read, write and delete thousands of entries per second.

Now imagine having your local pc to copy/paste more than 2 folders with thousands of small txt files at the same time.. try it at home :) you will see significant loss in performance.

So in addition to that if you have the ability, add an extra hard drive (a 15k rpm would be prefered) and run the 2nd server and DB from there.

Thats all, i hope i helped.
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: weird mini lags

Post by JIV »

does it lag when l2off and mssql is off? or you even didn't bother try such option?
abeyerp
Posts: 7
Joined: Sat Jul 03, 2010 7:58 pm

Re: weird mini lags

Post by abeyerp »

thanks dinor, i will try it.

and yes JIV, the MSSQL server is in a secondary server that is running a Luna server + web server + ts server.

The only server that isn't working well is the L2j one with that small lags, but i'll try what dinor says.


thanks :)
dinor
Posts: 141
Joined: Tue Aug 26, 2008 10:07 am

Re: weird mini lags

Post by dinor »

I am not really sure but i think you will also need to add a path of your java/bin in startGameServer.bat with the command i advised you... i will check it and let you know.
If anyone knows about that plz you are welcome.

EDIT:-----------------------------------------------------------

I just tried it to my pc and is not working the way it should because i have no much RAM.
With 64bit OS and 12GB RAM you shouldn't have problem

if you have any errors copy this

Code: Select all

SET PATH="C:\Program Files\Java\jdk1.6.0_20\bin"
(edit it acording to your jdk installation of java)

before the "java -server" command
abeyerp
Posts: 7
Joined: Sat Jul 03, 2010 7:58 pm

Re: weird mini lags

Post by abeyerp »

yes, i already made that when i started my server 1+ month ago... i'm waiting for a server restart to try your fix...
abeyerp
Posts: 7
Joined: Sat Jul 03, 2010 7:58 pm

Re: weird mini lags

Post by abeyerp »

well... with your fix i get this all time...

Code: Select all

 Starting L2J Game Server. Error occurred during initialization of VMCould not reserve enough space for object heapCould not create the Java virtual machine. Server terminated abnormaly server terminated Press any key to continue . . . 
how many memory does this need?

i have my startserver.bat this way:

Code: Select all

@echo offtitle Game Server Console:startecho Starting L2J Game Server.echo.SET PATH="C:\Sun\SDK\jdk\bin"REM -------------------------------------REM Default parameters for a basic server.REM java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1024m -Xmx1024m -cp ./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServerREMREM If you have a big server and lots of memory, you could experiment for example withjava -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:REM java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xmx1024m -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
what's wrong?

this is a screenshot of my resources:

http://img153.imageshack.us/img153/8199/servers.jpg


i hope you guys can help me.
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: weird mini lags

Post by JIV »

post here output
java -version
dinor
Posts: 141
Joined: Tue Aug 26, 2008 10:07 am

Re: weird mini lags

Post by dinor »

Ok this line works for my PC, with 2GB RAM, cpu C2Q

Code: Select all

java -server -Xmx1536m -Xms1024m -Xmn512m -XX:PermSize=128m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts -cp ./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServer
Try higher values for your server machine, maybe double values for all, except the -XX:SurvivorRatio=8 (leave this as is)
abeyerp
Posts: 7
Joined: Sat Jul 03, 2010 7:58 pm

Re: weird mini lags

Post by abeyerp »

Here is my output:

Code: Select all

java version "1.6.0_16"Java(TM) SE Runtime Environment (build 1.6.0_16-b01)Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)

now its running with Dinor's code, lets see how it runs if no i'll double that params.


Wish me luck :D
Post Reply