![]() |
CPU Usage for requestsql
The CPU usage that shows in /stats seems to be bloated significantly for scripts using requestsql (even with transactions). I could be wrong, but I don't think so. Has anyone else experienced similar things?
|
I've noticed it too.
|
If you are working with an unindexed schema, the queries will use a lot of CPU. Transactions have nothing to do with it. Certainly queries are unindexable.
I have no idea if the /stats are accurate, but be aware that SQLite doesn't perform any magic if you don't tell it to. If you post your schema/queries I can give some pointers. |
Quote:
|
Quote:
|
Quote:
Although, it still is a possibility that /stats is inaccurate. |
Quote:
|
Quote:
|
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. |
Quote:
|
Quote:
|
Quote:
|
| All times are GMT +2. The time now is 09:17 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.