-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misc: reduce memory usage of performance recalculation script #412
Comments
maybe too high effort solution but we could use a cache which keeps the most frequently accessed maps and evicts the others to keep the memory down |
maybe instead of recalculating pp on a score id going upwards basis calculate it per map? so it goes through all maps in the maps table and recalcs all scores for that particular map? |
I agree with that, it just like the old way we calculate by command. |
is this query the problem? Lines 183 to 190 in 701c462
looks like it's only chunked for processing once in memory which is not particularly useful, it should be pulled from sql in chunks to keep memory usage down |
The problem is that everytime a map gets recalced the whole map needs to be read by rosu-pp and therefore loaded into ram I think |
This won't take too much because millions of scores will only cost about 100 mb. It's worthwhile to cost memory in enchange of some io performance |
Cache every map during recalculation may cause memory lack on low-end server if there are too many maps (may eat many gigs of ram). It's better to make cache optional which can easily enable or disable by providing args (--use-cache or other something)
The text was updated successfully, but these errors were encountered: