Freya World
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Freya World

Open Source Java Project
 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

 

 Lag after 10/15hs withouht memory use

Go down 
2 posters
AuthorMessage
zenithpk




Posts : 7
Join date : 2011-06-09

Lag after 10/15hs withouht memory use Empty
PostSubject: Lag after 10/15hs withouht memory use   Lag after 10/15hs withouht memory use Icon_minitimeThu Jun 16, 2011 1:39 pm

Hi!
First, sorry my english, i'm not english native speaker! Well, i will explain my problem.



This is my server machine:

Pentium Dual Core E5200 @ 2.5ghz per core (2 cores)
4GB RAM memory
320gb SATA 2 3gb/s HD

Virtual Memory: 6GB MIN/6GB MAX

Windows optimized for Programs in both optimize options

OS: Windows Server 2003 Enterprise Edition (x86)
Java Version: Both JAVA SE & JAVA EE in diferent folders

This is my .bat
Code:

@echo off
title Game Server Console
:start
echo Starting FreyaWorld Game Server.
echo.

:: EXAMPLE PATH
:: set JAVA_PATH="C:\Program Files\Java\jdk1.6.0_20"
set JAVA_PATH="C:\glassfish3\jdk"

if NOT EXIST "%JAVA_HOME%"\lib\tools.jar GOTO check_path
goto je

:check_path
if NOT EXIST %JAVA_PATH%\lib\tools.jar GOTO jne
SET JAVA_HOME="%JAVA_PATH%"
goto je

:jne
ECHO.
echo    JAVA JDK not exists.
echo    Set path to JAVA JDK into JAVA_PATH in this script file or
echo    set JAVA_HOME variable into system variables.
goto end

:je
java -Djava.util.logging.manager=freya.world.util.L2LogManager -Xmx1024m -Xms1024m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts -cp ./../libs/*;freyaworld.jar freya.world.gameserver.GameServer

if ERRORLEVEL 2 goto restart
if ERRORLEVEL 1 goto error
goto end
:restart
echo.
echo Admin Restart ...
echo.
goto start
:error
echo.
echo Server terminated abnormaly
echo.
:end
echo.
echo server terminated
echo.
pause

Also, i've readed the 1000+ Players guide and i follow most of the tips.

When i open the gameserver.bat everthing works fine, java.exe take 1.5gb RAM, cpu is 1~3% of use, and everthing work fine.
When 30~40 Player online, everthing still fine, ~40% CPU Peaks, java memory round about 1~1.5gb
But in a certain moment (about 12 hours) the server start laggin, some players got stucked, another players can move but can't attack, in that moment i look at server task manager, and CPU goes to 100% but memory usage of java slow down to 300~400mb.
NO java exceptions, NO java errors, server still runing but extremelly lagged and bug players making them restart the client.
Without restarting machine i reset the game server and everting work fine again.


I tried to:

use -server flag in .bat with the same memory config : Throw java exception: Out of memory error
use -Xmx1536 -Xms1024m -Xmn512m -XX:PermSize=256m : Geodata start throwing errors, after a few seconds, Out of memory exceptions everywhere
use -server with the above config: Out of memory error before server start (black screen with an error, cannot alocate memory for heap or something like that)

And with the posted bat, no errors, no exceptions, but server becomes laggy and don't use memory after 12 hours.

I don't know what i should try now... If someone know something about that, i will apreciate your help
Back to top Go down
Willow
Admin
Willow


Posts : 113
Join date : 2011-05-24

Lag after 10/15hs withouht memory use Empty
PostSubject: Re: Lag after 10/15hs withouht memory use   Lag after 10/15hs withouht memory use Icon_minitimeThu Jun 16, 2011 2:45 pm

I used to have kind of the same problems on an AMD server with 8GB RAM.
Moved to an Intel-i7 server with 12GB RAM and had no lag issues ever since.
Back to top Go down
 
Lag after 10/15hs withouht memory use
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Freya World :: Development :: Bug Reports-
Jump to: