• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

More Ram = Slower server save?

El bananero

New Member
Joined
Jun 6, 2009
Messages
15
Reaction score
0
Hello, I have a b ig problem that is annoying me a lot, I'm using TFS 0.3.4 PL2 with a map of 35~40MB.

I had a server AMD Opteron 146 with 2 GB of RAM
OS: Ubuntu 8 - 32 bits

with this server the server save took about 10~20 seconds with 300~400 players online. Since it was slow i decided to order a new server with these specs:

Intel Core2Quad Yorkfield 2.83GHZ w/ 12Mb L2 Cache with 8 GB of RAM
OS: Debian Etch - 64 Bits

And running the server with the same configuration and the same map everything same the server save now takes about 50~60 seconds with 300~400 players online.

So any idea why is going on? the Ram is supposed to make your server save faster, but in this case it's making it slower :/

Thanks
 
This is what i got:

General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Increase table_cache gradually to avoid file descriptor limits

query_cache_limit (> 2M, or use smaller result sets)
query_cache_size (> 16M)
table_cache (> 192)
innodb_buffer_pool_size (>= 106M)

What would be the best values of these variables?

Also these config vales from config.lua:

sqlKeepAlive = 0
mysqlReadTimeout = 10
mysqlWriteTImeout = 10

should be changed or the are fine?
 
*facepalms* How on earth would overclocking his SERVER GRAPHICS CARD help with the problem he's having?



I see, well then it should be properly configured and such.
Did you just restore a backup of your server database, or did you use a clean database?

Also, does your server window display any errors during save?

god damnit i told i dont know anything about dedicated servers im just an lua scripter gosh
 
god damnit i told i dont know anything about dedicated servers im just an lua scripter gosh
FLAME
So why on earth did you reply here? He asked for help, not this misleading crap of information you toss around. Just to increase your post count? is that it? -.-

OT,
I really don't think the RAM or the Processor is the problem.
Like some guy said before me, it might be because the swap is "too big", and for some reason it uses that instead of RAM. Try decresing it, if you have alot of RAM, you dont need swap at all. I recomend you to try setting it to 0, and see if it helps.


Sharing some experience;
We host our server with Intel P4 2,6GHz and 2 GiB ram. 40 players, 5-10 sec save. (Debian x64, TFS 0.3.4)
Though, we do use a seperate server as MySQL host, it might have something to do with it. (The MySQL server is crap, but we got better server saves when we use two seperate computers, one for the server itselv and one for MySQL hosting :))

Well, good luck mate, hope you'll sort this out.
 
Bump~ Thanks for the help.

I have checked some queries and it seems that the problem with the server save is with the queries:

INSERT INTO `player_viplist` (`player_id`, `vip_id`) VALUES (`N`,`N`)
DELETE FROM `player_items` WHERE `player_id` = N;
DELETE FROM `player_depotitems` WHERE `player_id` = N;
UPDATE `players` SET `online` = 0 WHERE `id` = N;

The problem is that sometimes there queries take x30~x50 times what it should. For example one of these queries should take 0.02 ~ 0.05 second (that's what it takes on my server i tested it) But sometimes for some reson the query "lags" and server save takes a lot of time, the worst thing is that let's say the server save execute about 1500 queries (99% of them take 0.002 ~ 0.005 seconds each and then 1 or 2 queries take 15~20 seconds and these cause the lag) I have tried a lot of config with the mysql, But i'm not sure if the problem is with the Mysql or with Tfs..

Any Idea? Also have this happened to anyone before? I think that on this computer hosting 300~400 players with a 30mb map server save should took 8~10 seconds max or it's normal that server save takes 45~60 seconds?

PD : This is the TOP of the server

top - 19:40:25 up 3 days, 16:24, 3 users, load average: 0.20, 0.36, 0.49
Tasks: 97 total, 1 running, 96 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.2%us, 0.3%sy, 1.6%ni, 94.6%id, 2.9%wa, 0.2%hi, 0.2%si, 0.0%st
Mem: 8179152k total, 6396156k used, 1782996k free, 133816k buffers
Swap: 2104504k total, 403184k used, 1701320k free, 468516k cached

As you see the swap isn't too big and the cpu uses just a few of it
 
You should optimize your myqsl config, as have been said before,
Maybe you could look into changing db types (a bitch to do if i remember correctly, but it effects preformance) innodb as i remember my high mysql usage days is pretty crap, but not sure if that applies to otserver... but do some research about it, if you wish.
If you decide to do it, keep backups since it's easy to fuck it up. :p

My serversave on a similar server, is about 3sec, (40-50 players during peak) but i save once every 30min.. (totally unoptimized server)


But it's trial and error optimizing the server, do some small changes, check peak time what your preformance is, change some more until it's optimized..

good luck :)
I tough it could help gosh.. w/e ain't bitching with newbs

You give incorrect advice, and you say others are the noobs? :)
Ah logic prevails.. or does it? :)
 
You should optimize your myqsl config, as have been said before,
Maybe you could look into changing db types (a bitch to do if i remember correctly, but it effects preformance) innodb as i remember my high mysql usage days is pretty crap, but not sure if that applies to otserver... but do some research about it, if you wish.
If you decide to do it, keep backups since it's easy to fuck it up. :p

My serversave on a similar server, is about 3sec, (40-50 players during peak) but i save once every 30min.. (totally unoptimized server)


But it's trial and error optimizing the server, do some small changes, check peak time what your preformance is, change some more until it's optimized..

good luck :)


You give incorrect advice, and you say others are the noobs? :)
Ah logic prevails.. or does it? :)
I tough for f**k sake dont piss me off...
 
Switch to MyISAM.

did you ever figure it out?

why is that??

Code:
[15/07/2009 01:25:11] mysql_real_query(): INSERT INTO `server_motd` (`id`, `world_id`, `text`) VALUES (6, 0, 'Welcome to the LesanyaOT Server!'); - MYSQL ERROR: Duplicate entry '6-0' for key 1 (1062)
 
Last edited by a moderator:
Back
Top