sablierapp / sablier

Start your containers on demand, shut them down automatically when there's no activity. Docker, Docker Swarm Mode and Kubernetes compatible.
https://sablierapp.dev/
GNU Affero General Public License v3.0
1.36k stars 46 forks source link

Feature Request: Ability to halt the container #212

Open Svenum opened 1 year ago

Svenum commented 1 year ago

I want just halt the container for faster wake up times. Maybe with a setting in sablier.yaml? This should save CPU + its fast up and running.

acouvreur commented 1 year ago

The underlying action for docker is the equivalent of docker start and docker stop.

By halting containers, do you mean using the docker pause command ?

https://docs.docker.com/engine/reference/commandline/pause/

Do you have more details on how you'd it manually ? This would be helpful understanding this process.

For now, this is not an available option, but can be added to.

Svenum commented 1 year ago

Right I want to use docker pause and docker unpause instead of docker stop and docker start

acouvreur commented 1 year ago

Can you give me more details on the use case ? Out of curiosity.

Because the memory is not discarded and the process are frozen.

What's the use case that you need to unpause containers to boot very fast ?

Svenum commented 1 year ago

In my mind are services like jellyfin or Nextcloud witch clients dont wait that long. After the timeout they force you to reenter the server name.

valexz commented 1 year ago

It appears that the command docker checkpoint should be taken into consideration https://docs.docker.com/engine/reference/commandline/checkpoint/

Svenum commented 1 year ago

I do not want to do a snapshot I want to stop the container without the need to start everything on need. I want to reduce CPU Usage and a fast startup. So I do not think that docker checkpoint is what we need here.

Svenum commented 1 year ago

Some news on this?

acouvreur commented 1 year ago

I don't have the time to work on this, feel free to open a pull request if you want :)

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.