On Mon, Nov 03, 2025 at 02:02:18PM +0100, Walter Alejandro Iglesias wrote:
> On Mon, Nov 03, 2025 at 12:34:59PM +0100, Jan Stary wrote:
> > Hibernation saves the memory content to disk.
> > In your case, that means writing 32GB.
> > One minute is not too long for that.
>
> I've been using linux in this machine recently, it hibernated in a few
> seconds.  I will try to convince myself that OpenBSD makes it slow but
> in a safer way. ;-)
>

Nothing in our hibernate code has changed appreciably in over 10 years.

The time it takes to write the image depends entirely on:

1. How big the image is that gets written out (most important). This contains
   whatever is active at the time of ZZZ (what processes/etc are running).
   A large amount of physical memory *can* cause longer write times but only
   if you've used a bunch of memory at the time of ZZZ (eg, even with massive
   RAM machines, we only write out what is actually *used*).
2. If you are using softraid crypto or not
3. How fast the cpu is running during that time since zlib is used to compress
   the data being written. Sometimes people ZZZ on battery when the CPU is/was
   in a low setperf state. SR crypto exacerbates this problem as you're doing
   compression then encryption which is done 100% on the cpu
4. What storage device you have (not an issue here, nvme is fine)

When you resume, it prints the size of the image that it's reading. How big was
it?

Saying "Linux was faster" means nothing since you're going to be running
different sets of processes/workloads/etc.

As a test, do this:

1. boot
2. ZZZ immediately after boot
3. see how long it takes

...then try again on battery/off battery/etc. Try setperf 100 before suspending.

Also... who cares? Does it really matter if it takes 10 seconds, 20 seconds,
or a minute? Generally people ZZZ, toss the machine in their backpack, and
that's it. If you told me it took 20 or 30 minutes or something completely
unreasonable, then sure, that's broken. But i don't see that here, I just
am reading "a minute is too long" and wondering "ok, why is that too long?"

> After sending this message I tried hibernation in my old machine, an
> Intel Core 2 Duo with 4GB of RAM, where I have also OpenBSD installed.
> And it also takes a long time to hibernate there, with the added problem
> that when I turned it back on, I got a kernel panic.  I'm not entirely

what panic?

> sure, because I don't use hibernation often, but this old machine use to
> hibernate perfectly and I don't remember it taking so long to save the
> image to the swap, even when then it had a mechanic SATA drive and now a
> SSD.  But well, I am being subjective. :-)
>

If you really think this is the case then please help us out. Go back and
install an old version of openbsd from when it was fast and bisect the releases
until you find the one that made it slow. Then tell us and we can go look at
what changed. Maybe something unrelated broke your two machines. dunno.

>
> Thank you for responding.
>
>
> --
> Walter
>

Reply via email to