Jump to content

[Guide]Tweak your server!


Recommended Posts

Here is a system tweak and some java tweaks so as your players are gonna have less lag (but watch out, not less lag caused by the server's connection, but less caused by the server's PC.

 

The first tweak is simple, and has really nice affects on your server when you have lots of people logged in. Let's say that you have about 4GB of physical memory (it is really good for a server PC) but you have lag... lot's of lag! Why don't you try to set off your page file system? If you use less than the 4GB of the physical ram, you have a good connection and too much lag, turn off the page file system of your OS (that's why i suggest linux for your server, it has a clever ram management system, not like w$). More about this on microsoft's site. (It is on the advanced tab of your PC properties, on performance setttings). Don't forget that, if you go up to 4GB your PC will lack of RAM and pouf, server is down ;D Suggested only if the rest of the ram is free. Do not forget to set the restart time of the server on less than 6 hours, as after that time your RAM usage is getting bigger and bigger.

 

Another tweak is a java tweak on the startgameserver.bat. Totally three. Take a look, and pay attention.

 

The first tweak is the RAM usage. Let's say that you have 2GB physical RAM (as i do). Look inside the .bat file, there is a row which is starting with...

 

java -Xmx512m -cp

 

This tells java not to go over that value, but use it as it wishes. You can change it in steps of 256mb. REMEMBER NOT TO EXCEED THE 60% OF YOUR PHYSICAL RAM.

 

You can also put in front of this value this command -Xms512m and it tells java that IT WILL USE always 512mb. It almost elimates your memory (always that memory usage is a high amount) but it helps a lot. It should look like this:

 

java -Xms512m -Xmx512m -cp

 

The last code is about the memory that java uses for getting rid of the bad code... what do i mean...? Every program running for some time, makes tons of garbage, which it doesn't need, and java makes a f*cking great amount of useless code. We can add this command: -Xmn128m in our code, so it will kick the bad code every some minutes, and will use 128mb for this job. Try it:

 

java -Xmn128m -Xms512m -Xmx512m -cp

 

Remember not to exceed the 25% of the next value (in this case the 512, so 25% of 512 is 128).

 

Another tweak (that is know) is to set java priority to high, or real time (only if it is a dedicated server PC) which greatly increases your server's performance, but needs to be automated to restart every 6 hours (because CPU usage after 6 hours of realtime or high priority gets over 95%, sometimes even 100%). To set it to real time or high priority, use the task manager, go to threads manager and find the java thread, right click, priority settings. If you want it to be setted auto by the machine priority to realtime, open your startgameserver.bat file and add before java: start/realtime/wait

So, it seems like this now:

@echo off

:start

echo Starting L2J Game Server.

echo.

start/realtime/wait java -Xmx512m -cp ./config/;commons..................................................

 

The last tweak, is a dirty trick, huhuhu. If you want to make your players to think that server is running on a powerful machine without any bit of lag, or whatever, give 20% more running speed to all chars from your db (yes, set it as the default, so any new char gets instead of the official speed +20% more). Now they think they fly, but in the reality it is just a trick. Nobody will note it.

 

Have fun ;) Tested on my hlapex server (if you played there huh ;D).

 

*Collected from some old .txt files of my c3-c4 packs collection. The guide is mine ;) But i got the basic idea from there :P

Link to comment
Share on other sites

  • 3 weeks later...

killer_007 i bored all your shares ... all of those shares are copy paste bliah and u dont give any credits omg and then you call me spammer or sthin like that ...

 

but  i  cant say u found a good site to copy paste :D

Link to comment
Share on other sites

Yeah? Do you have evidence? At least, i respect the people who write some things, because i do write guides and shares, and i always give proper credits where needed, so if you don't have proof, if you don't like me, if you don't know what i do share, if you can't explain how i know some things that you do not know (because you are egoist, or because of immaturity) IN YOUR LIFE YOU CAN NEVER - EVER accuse somebody if you don't have EVIDENCE. Is that clear? Instead of being so useless, try helping some people and not just go around and say <<omfg noob, come on i can do it, you thief!>>. I learned these things from somewhere, and that doesn't mean i don't respect the people who were teaching for my 3 years of knowledge in l2j, i learned all these things i share with you from those people, i respect their work and their face, but as i respect them i want some people to respect me for my work.

Link to comment
Share on other sites

killer_007 i bored all your shares ... all of those shares are copy paste bliah and u dont give any credits omg and then you call me spammer or sthin like that ...

 

but  i  cant say u found a good site to copy paste :D

and if they are copy paste? He IS MAGAS and not bored to do the copy paste (in case that is copy paste) And he knows the answer in problems that happen in these "copy paste" as you say so??? Even If they are copy paste he knows what the copy paste he done is For And he's not a Noob that only copy  pastes!!! Anyway Killer You Rock for me and i dont care iF they are a Copy  paste something i dont believe I care only for the topic maker's Name And name is Killer_007!!!! nice m8 ;)

Link to comment
Share on other sites

killer_007 i bored all your shares ... all of those shares are copy paste bliah and u dont give any credits omg and then you call me spammer or sthin like that ...

 

but  i  cant say u found a good site to copy paste :D

and if they are copy paste? He IS MAGAS and not bored to do the copy paste (in case that is copy paste) And he knows the answer in problems that happen in these "copy paste" as you say so??? Even If they are copy paste he knows what the copy paste he done is For And he's not a Noob that only copy  pastes!!! Anyway Killer You Rock for me and i dont care iF they are a Copy  paste something i dont believe I care only for the topic maker's Name And name is Killer_007!!!! nice m8 ;)

killer_007 i bored all your shares ... all of those shares are copy paste bliah and u dont give any credits omg and then you call me spammer or sthin like that ...

 

but  i  cant say u found a good site to copy paste :D

and if they are copy paste? He IS MAGAS and not bored to do the copy paste (in case that is copy paste) And he knows the answer in problems that happen in these "copy paste" as you say so??? Even If they are copy paste he knows what the copy paste he done is For And he's not a Noob that only copy  pastes!!! Anyway Killer You Rock for me and i dont care iF they are a Copy  paste something i dont believe I care only for the topic maker's Name And name is Killer_007!!!! nice m8 ;)

 

+6456465423168453185

i agree completely!!!

with their logic from the first time sth is said anywhere it can never be repeated there or at any other place.....

read the gpl ppl.....

 

PS: tnxvm killer_007

Link to comment
Share on other sites

  • 5 years later...
Guest
This topic is now closed to further replies.


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock