-
Notifications
You must be signed in to change notification settings - Fork 289
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
Set more aggressive cache expiry values and run a Long-term storage test #1689
Comments
Sent a patch with more aggressive cache expiry values here: https://groups.google.com/a/damus.io/g/patches/c/rw_CHFh7nWo I will start long term testing. |
Long-term test startsDevice: "Daniel's iPhone"
Procedure:
@jb55, @alltheseas, I started this right away to give us more time to run this long term test, which might take a few days or weeks to get meaningful data patterns. Please let me know if you have questions or suggestions! |
What's the expiry value? Is it duration based (e.g. 1 month)? Size based (e.g. 20 GB)? |
@alltheseas it is currently duration-based, and depends on the type of image. The current Damus Testflight version (1.6 (26)
My patch is changing these to:
|
I am setting the expiration values lower because it seems that the previous values were not keeping storage usage low enough. Testing: Testing will be performed as a long-term test on Github issue #1689 (#1689) Signed-off-by: Daniel D’Aquino <[email protected]> Signed-off-by: William Casarin <[email protected]>
@alltheseas, although the patch was merged, can I keep this one open for a bit longer? I am currently monitoring the storage usage over several days to study how it changes over time with the new expiry settings (https://docs.google.com/spreadsheets/d/1LjvKQReMXDKN_2PJ3kaXEhU8o--T9UhSrGpoKeqhKrI/edit?usp=sharing) |
💯 |
@jb55, @alltheseas, good news, the new cache expiry values seem to be bringing my storage usage down significantly! I imagine this value will keep going down up until a certain point and then stabilize. I am curious as to what that value will be. I think it depends on how active the user is on the app, so it might vary depending on the user.
I will keep this running to see where it goes |
Good news. For folks with less disk space I like the idea of a mechanism where you can set max storage. See example #1554 |
On Wed, Nov 15, 2023 at 10:06:11AM -0800, Daniel D’Aquino wrote:
@jb55, @alltheseas, good news, the new cache expiry values seem to be bringing my storage usage down significantly!
I imagine this value will keep going down up until a certain point and then stabilize. I am curious as to what that value will be. I think it depends on how active the user is on the app, so it might vary depending on the user.
![Storage usage vs Date](https://github.com/damus-io/damus/assets/24692108/5861526e-6375-4a81-a79b-ea2876f97e4d)
(Full data [here](https://docs.google.com/spreadsheets/d/1LjvKQReMXDKN_2PJ3kaXEhU8o--T9UhSrGpoKeqhKrI/edit?usp=sharing))
awesome analysis. thank you!
|
Special case for future consideration: for folks with under 1 GB free space perpetual crash occurs #1619 |
Long-term test quick update: It looks like I might have reached a storage usage plateau at around 5GB – 6GB.
I will keep monitoring |
I would set a 1GB max size on my limited phone. Thanks! |
Yeah, it will be awesome if we can control the max storage size |
@alltheseas, @jb55, I believe my phone has settled at around 4GB — 6GB of storage use. This experiment will probably start bringing diminishing returns in terms of valuable insights/data. Here are a couple of possible follow-up actions we can take from here:
Any preferences or thoughts on what to do next with this ticket? |
Do you think performance will be affected, and if so how, if the value is set to a more aggressive 1 GB? |
@danieldaquino overall I think this is a successful test & implementation. Yegor had high 10s GB of cache, and was on track towards 100 GB if he was not low on disk space if I remember correctly. We can fine tune later, and close for now. Well done 💪 |
Thank you!
The problem is that we do not have a mechanism for setting a max storage size yet, unfortunately (as far as I know). We currently control cache size via expiry dates, and those expiry values indirectly cause storage usage to be higher or lower. But the exact storage size is never guaranteed We can create this "max storage" mechanism though. If I understand correctly, we are planning to do that as part of #1554, is my understanding accurate? If we are planning to address this there, maybe we can close this ticket and schedule work on #1554 for one of the upcoming sprints? |
Agreed with @danieldaquino |
Damus: 1.6 (26) cc385d3
The current cache expiry values do not seem to be enough to keep storage usage low. I am opening this ticket to:
The text was updated successfully, but these errors were encountered: