Open MoisesFV opened 7 years ago
How big is your $config['cache_lifespan']
?
How big is your engine/cache/highscores.cache.php file?
How many rows have you configured in $config['highscore']
?
Is the RAM usage on your host machine capped?
Does the host machine use a spindisk or an SSD disk?
I have tested on two servers, linux and windows. Both with hd ssd.
$config['cache_lifespan'] = 6 * 60 * 60;//60 * 15; // 15 minutes.
The engine / cache / highscores.cache.php file is on average at 15 mb
$config['highscore'] = array( 'rows' => 100, 'rowsPerPage' => 20, 'ignoreGroupId' => 2, // Ignore this and higher group ids (staff) );
Is totally dedicated, 8gb of ram
Do you have many vocations? My highscores.cache.php file is about 500kb with 100 rows of score data for each vocation
About 50 vocations ..
@MoisesFV when you configured those vocations in config.php, did you configure the "fromvoc" property? Vocations that can be grouped together on the highscore should be linked to each other with fromvoc, that way we reduce the amount of data we need to store.
Etc: currently sorcerers and master sorcerers are grouped together as "sorcerer", their vocation is so similar it makes sense to group them together.
Else we may need to refine highscore loading even further, like making separate cache files for each vocation, maybe only query and cache the vocation we have selected.
The stored data is pretty huge, for each single vocation, we store 100 * (8-9 skill types) rows of data. That would be around 40000 rows of data collected, parsed, saved and loaded for your 50 vocations if they are all separate. Even if the cache files were to be entirely stored in RAM, the CPU consumption to parse it would slow the site down significantly.
Hmm, I might be able to save a few queries if we can bundle weapons (axe, club, sword) into one highscore group as well.
Perhaps change rows to 10, and rowsPerPage to 10. It won't show much data, but the most important data, and the highscores will load much quicker. (10 times as quick).
I'm having trouble with the cache. They cause a lot of processor usage when being written, especially the cache "highscores". How can I remove the highscores cache, or improve the recording?