Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Swap takse very long time to load with binhost
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
paddlaren
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2005
Posts: 125
Location: Hörby, Sweden

PostPosted: Mon Feb 05, 2024 7:25 am    Post subject: [Solved] Swap takse very long time to load with binhost Reply with quote

I recently made a fresh installation of Gentoo on my new laptop using Binhost, it is my first try.
Problem is that opening and loading the swap partion takes very long time (like 2 minutes) (not restoring from hibernate).

The swap is on 128GB (64GB ram times 2).

Before I reinstalled gentoo I hade a ordinary gentoo (non binhost) on the device and swap with the same size to just seconds to load (sadly gone now https://forums.gentoo.org/viewtopic-t-1167160-highlight-.html ) . I have dual boot with Debian as and Debian also just takes seconds to load the swap.

I use encrypted root and swap using btrfs in LUKS for root and swap in LUKS for swap. I use dracut to generate the initrd.

I have never experienced something like this before and have no clue on what it can be. I have recreated the swap from within Gentoo and tested without ever booting Debian on it but no success.


Last edited by paddlaren on Tue Feb 06, 2024 12:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
freke
l33t
l33t


Joined: 23 Jan 2003
Posts: 977
Location: Somewhere in Denmark

PostPosted: Mon Feb 05, 2024 4:19 pm    Post subject: Reply with quote

Is it timing out - or is the swap activated (try swapon and see if it's listed)
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 222
Location: Pennsylvania, USA

PostPosted: Mon Feb 05, 2024 11:50 pm    Post subject: Reply with quote

Is it slow running cryptsetup, or is it slow running swapon ? swapon doesn't "load" anything as far as I know, it just enables swapping.

Hmm, wait, are you on nvme ? Try tweaking the swapon options:
Code:
       -d, --discard[=policy]
           Enable swap discards, if the swap backing device supports the
           discard or trim operation. This may improve performance on some
           Solid State Devices, but often it does not. The option allows one
           to select between two available swap discard policies:

           --discard=once
               to perform a single-time discard operation for the whole swap
               area at swapon; or

           --discard=pages
               to asynchronously discard freed swap pages before they are
               available for reuse.

           If no policy is selected, the default behavior is to enable both
           discard types. The /etc/fstab mount options discard, discard=once,
           or discard=pages may also be used to enable discard flags.
Back to top
View user's profile Send private message
paddlaren
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2005
Posts: 125
Location: Hörby, Sweden

PostPosted: Tue Feb 06, 2024 12:59 pm    Post subject: Reply with quote

While investigating to answer your questions I identified the problem; the resume parameter was wrong. It was resume=<Actual disk UUID> but should be resume=UUID=<Actual disk UUID>. The delay was resume from hibernation that timed out.


Thanx for helping me out, I'd never stumbled on it unless working with your questions.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum