Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-16-2010, 12:36 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
The displayed CPU usage is not very accurate when other processes run at the same time and slow down the machine. Most servers with playerworlds on them don't take a lot of CPU time though, it's often more about memory usage which leads to memory swapping if many servers use too much memory. It's always the first thing you should check when your npcserver is slow. Get rid of npcs with tons of variables, try to delete database npcs when you have more than 5000. You can also use "this.dontsave = true" and "this.savelocally = true" to reduce the number of npcs.

For optimizing SQLite I found the query "PRAGMA synchronous=OFF" very helpful, it's basicly not flushing the database to file each time you do an update. It should still be quite reliable.
Reply With Quote
  #2  
Old 02-16-2010, 12:42 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by Stefan View Post
The displayed CPU usage is not very accurate when other processes run at the same time and slow down the machine. Most servers with playerworlds on them don't take a lot of CPU time though, it's often more about memory usage which leads to memory swapping if many servers use too much memory. It's always the first thing you should check when your npcserver is slow. Get rid of npcs with tons of variables, try to delete database npcs when you have more than 5000. You can also use "this.dontsave = true" and "this.savelocally = true" to reduce the number of npcs.

For optimizing SQLite I found the query "PRAGMA synchronous=OFF" very helpful, it's basicly not flushing the database to file each time you do an update. It should still be quite reliable.
Do you think you could add "total memory" to /memstats ? That way we could tell if things are about to swap or not.
Reply With Quote
  #3  
Old 02-16-2010, 12:50 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Quote:
Originally Posted by WhiteDragon View Post
Do you think you could add "total memory" to /memstats ? That way we could tell if things are about to swap or not.
It shows the memory the npcserver/gserver are currently allocating in /stats.
Reply With Quote
  #4  
Old 02-16-2010, 01:31 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by Stefan View Post
It shows the memory the npcserver/gserver are currently allocating in /stats.
Right but how much memory is available?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:01 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.