[FEATURE] Disable Defer-Write when on low battery

Suggestions around PrimoCache
Post Reply
ptrkhh
Level 1
Level 1
Posts: 1
Joined: Wed Mar 22, 2023 3:04 pm

[FEATURE] Disable Defer-Write when on low battery

Post by ptrkhh »

Typically a laptop would be able to automatically go to sleep, hibernate, or shutdown when the battery has reached a certain threshold, so PrimoCache could gracefully flush all the cache before the battery runs out.

HOWEVER, as the battery ages, a laptop would often die prematurely

Therefore, I think it would be great if PrimoCache could disable Defer-Write when the battery is below 10%. Even better if the percentage level is user-configurable. For example, the user could set it to 100% so Defer-Write is ALWAYS disabled when on battery, which would be useful on laptops with a severely worn battery
tverweij
Level 7
Level 7
Posts: 92
Joined: Thu May 10, 2018 9:27 am

Re: [FEATURE] Disable Defer-Write when on low battery

Post by tverweij »

I think this would be a good feature.
User avatar
Support
Support Team
Support Team
Posts: 3731
Joined: Sun Dec 21, 2008 2:42 am

Re: [FEATURE] Disable Defer-Write when on low battery

Post by Support »

Thank you for your suggestion! We do have the plan to add this feature.
Extremity
Level 1
Level 1
Posts: 4
Joined: Wed Oct 26, 2022 5:16 am

Re: [FEATURE] Disable Defer-Write when on low battery

Post by Extremity »

Two years later - any updates? Being able to trigger different settings based on battery status would be great. Even better - and easier for you to do - you could simply allow us to enter the info for a NUT server and utilize that. That's, like. stupid easy to do.

I use defer write on a server with a UPS. but would like to immediately flush and disable future defers whenever the system is on backup power.

Even if you don't do this, literally any way to push a command saying "change this setting to this" would be helpful to allow us to do this on our end.
tverweij
Level 7
Level 7
Posts: 92
Joined: Thu May 10, 2018 9:27 am

Re: [FEATURE] Disable Defer-Write when on low battery

Post by tverweij »

You can create a batch script that does that using the cli of PrimoCache.
And then attach the script to the event that is written when the server goes to backup power.

No need for changes in PrimoCache to do this.
Post Reply