Skip to content

Create configuration parameter for disk-buffering exporting frequency #947

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

Open
bencehornak opened this issue Apr 15, 2025 · 1 comment · May be fixed by #958
Open

Create configuration parameter for disk-buffering exporting frequency #947

bencehornak opened this issue Apr 15, 2025 · 1 comment · May be fixed by #958
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@bencehornak
Copy link
Contributor

Background

Currently the disk buffering exporter attempts to export every 10 seconds - the WorkDelegator has a loop of 10 second to check, if the PeriodicRunnable isReadyToRun():

... and the DefaultExportScheduler uses the same 10 seconds waiting period to show its readiness:

private val DELAY_BEFORE_NEXT_EXPORT_IN_MILLIS = TimeUnit.SECONDS.toMillis(10)

Problem

Since my internal enterprise apps are used by colleagues 8 hours a day it is critical to not put too much strain on their phone's batteries. The 10 second exporting frequency means that the phone has to do IO 2880 times during an 8 hour workday, if my Maths is correct, which feels like a lot both for the devices and for the backend to handle as well, if the number of devices is high.

Proposed solution

I would increase the default exporting frequency to 1 minute. Additionally, I would create a new config parameter in DiskBufferingConfig, which allows setting the exporting frequency catering for various preferences on the tradoff between real-time-ness and battery consumption.

Alternatively or additionally, the WorkManager API could be used (#882), which raises the minimum frequency to 1x in 15 minutes and optimizes the battery life even better.

@breedx-splk breedx-splk added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Apr 17, 2025
@Yadavanurag13
Copy link

@breedx-splk assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
3 participants