Skip to content

Conversation

@vanzin
Copy link
Owner

@vanzin vanzin commented May 30, 2017

This change adds a new configuration option and support code that limits
how much disk space the SHS will use. The default value is pretty generous
so that applications will, hopefully, only rarely need to be replayed.

This works by keeping track of how much data each application is using;
because it's not possible to know, before replaying, how much space will
be needed, it's possible that usage will exceed the configured limit
temporarily. The code uses the concept of a "lease" to try to limit how
much the SHS will exceed the limit.

Active UIs are also tracked, so they're never deleted. This works in
tandem with the existing option of how many active UIs are loaded; because
unused UIs will be unloaded, their disk stores will also become candidates
for deletion. If the data is not deleted, though, re-loading the UI is
pretty quick.

@vanzin vanzin force-pushed the shs-ng/M6 branch 2 times, most recently from 75349eb to 4a297da Compare June 2, 2017 16:40
This change adds a new configuration option and support code that limits
how much disk space the SHS will use. The default value is pretty generous
so that applications will, hopefully, only rarely need to be replayed.

This works by keeping track of how much data each application is using;
because it's not possible to know, before replaying, how much space will
be needed, it's possible that usage will exceed the configured limit
temporarily. The code uses the concept of a "lease" to try to limit how
much the SHS will exceed the limit.

Active UIs are also tracked, so they're never deleted. This works in
tandem with the existing option of how many active UIs are loaded; because
unused UIs will be unloaded, their disk stores will also become candidates
for deletion. If the data is not deleted, though, re-loading the UI is
pretty quick.
@gengliangwang
Copy link

Hi Vanzin, I just come up with a idea. Instead of using two configurations EVENT_TO_STORE_SIZE_RATIO and MAX_LOCAL_DISK_USAGE to control the disk usage, how about allowing user to limit the max number of applications written to disk store?

It may be simpler and more user friendly.

@vanzin
Copy link
Owner Author

vanzin commented Dec 4, 2017

limit the max number of applications written to disk store

The size of the disk store can vary wildly from application to application, so that's not very user-friendly if the goal is to control how much disk space to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants