Leap 42.1 on an SSD - any optimization really needed?

I’ve just purchased my first SSD machine - HP Spectre X360 Windows 8.1 - a really nice convertible laptop with a 256GB Samsung SSD

I’ve tried the 3 main UEFI enabled distros - Fedora, Ubuntu and Opensuse - each on their live media and without doubt Opensuse was the best out of the box.

I have choosen Gnome as the DE as I feel it is the best option for tablet mode.

Having gone with Opensuse I decided to install Leap 42.1 DVD on usb. and opted to go ahead with the installers choice of partitioning - ie / as btrfs /home as xfs swap 2Gb and dual booting with Windows

I’d appreciate opinion/thoughts re Leap 42.1 on an SSD and any tweaks/changes I should carry out.

I am starting to drive myself crazy reading various articles (a number with conflicting advice) re Linux (and of course specifically Opensuse) on an SSD

  • to TRIM or not to TRIM and setting up Cron jobs to do this.

  • Not to use BTRFS but Ext4 instead.

  • Reduce swapiness.

  • Edit /etc/fstab with additions such as noatime

Another suggestion is to not worry about the above and focus on over provisioning and activation of a Host Protected Area (HPA)

To say I’m confused is an understatement!

I’m wondering whether I need to go through a re-install and start all over again - especially if I should ditch btrfs and move to Ext4

In fact do I need to do anything? - looking at other forums some folk suggest that the wearing out of SSDs is an unlikely event in the life of your average laptop as the new drives can handle so many writes - as per the post by bassmadrigal in this thread on Linux Questions

http://www.linuxquestions.org/questions/slackware-14/recommend-file-system-for-ssd-4175526275/page2.html

Would greatly appreciate your thoughts/advice.

I’d like to know the same thing. I’ve got Leap on a LUKS/LVM volume which is on an SSD, and I’ve configured everything just as I did under 13.2. There’s one difference, though – this time I used BTRFS for root. And unfortunately, the TRIM command seems to do nothing.

On an EXT4 partition under 13.2, running TRIM once would report a large amount of drive space being TRIMmed, and running it again would show almost nothing being TRIMmed. That is as it should be.

On BTRFS under Leap, I can run TRIM 10 times and it always reports it’s TRIMming the same amount, which seems to indicate it’s actually not doing anything. My EXT2 or EXT3 boot partition, and my EXT4 /home partition, TRIM just fine. So it’s either a BTRFS problem in general, or a BTRFS problem caused by Leap.

(EDIT: By “TRIM command”, I of course mean “fstrim”).

BTRFS does trim auto-magically you don’t have to invoke it like in ext4

Wow that’s interesting! I’m a total noob when it comes to SSDs and Btrfs - if what you say is true then it would seem Btrfs and Opensuse are ideal for SSDs.

I did read this in the Btrfs Wiki about using fstrim which is confusing if its meant to do it automatically

https://btrfs.wiki.kernel.org/index.php/FAQ#Does_Btrfs_support_TRIM.2Fdiscard.3F

Any source for that? The Wiki cited above says it works just like ext4.

On 11/08/2015 07:46 AM, shelmed wrote:

>
> - Not to use BTRFS but Ext4 instead.

Just curious, what article said this?

Also, the arch wiki[1] has a bunch of useful instructions for SSD +
btrfs. There is also some documentation in the article on how to use it,
which you should also find on the opensuse wiki.

[1] https://wiki.archlinux.org/index.php/Btrfs#Mount_options


openSUSE Leap (42.1) 64 bit
Plasma 5

You don’t need the discard statement in the mount which is the “trim” setting for mount in ext4

look up discard not trim

And yes that is not exactly obvious :stuck_out_tongue:

Hi
If you run the command mount and look at the mount options used in between the brackets.

The only other thing I do is wind down the swappiness and set the elevator to noop in the kernel boot options if just running an SSD (A little different if have both an SSD and HDD).

My swappiness settings in /etc/sysctl.conf are;


vm.swappiness=1
vm.vfs_cache_pressure=50

The btrfsmaintenance package should be installed and btrfs balance and trim are taken care of via cronjobs in /etc/cron.weekly.

To be honest I think there’s a lot of garbage contained within this article - there’s a bit of scaremongering re how SSDs where out so quickly - I read the reverse in a number of articles

On 11/08/2015 11:16 PM, malcolmlewis wrote:
>
> Hi
> If you run the command mount and look at the mount options used in
> between the brackets.
>
> The only other thing I do is wind down the swappiness and set the
> elevator to noop in the kernel boot options if just running an SSD (A
> little different if have both an SSD and HDD).
>
> My swappiness settings in /etc/sysctl.conf are;
>
> Code:
> --------------------
>
> vm.swappiness=1
> vm.vfs_cache_pressure=50
>
> --------------------
>
>
> The btrfsmaintenance package should be installed and btrfs balance and
> trim are taken care of via cronjobs in /etc/cron.weekly.
>
>

The wiki has udev rules that I like to use:
https://en.opensuse.org/SDB:SSD_performance#Other_changes


openSUSE Leap (42.1) 64 bit
Plasma 5

I did meant to say wear out of course! ;0)

In this article from Phoronix OpenSUSE 42.1 Tweaked For Better Out-Of-The-Box Performance - Phoronix Richard Brown, the openSUSE Board Chairman, is quoted as saying they have set the default to Deadline rather than NOOP - stating that some SSDs are negatively impacted by NOOP.

The btrfsmaintenance package should be installed and btrfs balance and trim are taken care of via cronjobs in /etc/cron.weekly.

So is this automatically set up in new Leap installs?

Hi
It is on my current system running Leap… :wink:

Hi Malcom, thanks for that. Have just checked the cronjobs directory you mentioned - as you said all set up! - openSUSE Leap with Btrfs is an awesome distro -lol!running so well on this new machine of mine.

Thinking of writing a new guide for noobs for installing Linux on SSD laptops - its as follows:

Install openSUSE Leap 42.1 and enjoy. THE END! :wink:

Seriously think the only thing I may do is alter the swapiness as per your advice. Appreciate any further comments/advice re using NOOP or Deadline.

Hi
You can check what the scheduler is set to via the following command, for example sda;


cat /sys/block/sda/queue/scheduler

Based on the information, it should have detected your SSD and set to deadline, based on others comments I would leave all alone :wink:

Hi Malcom this is my output for the above command:

  ~> cat /sys/block/sda/queue/scheduler
noop [deadline] cfq

Does the [deadline] in square brackets mean that its set to deadline rather than NOOP?

On Tue 17 Nov 2015 11:56:01 AM CST, shelmed wrote:
>snip>
Hi Malcom this is my output for the above command:

~> cat /sys/block/sda/queue/scheduler
noop [deadline] cfq

Does the [deadline] in square brackets mean that its set to deadline
rather than NOOP?

Hi
Yes, that’s correct :slight_smile:


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 | GNOME 3.10.1 | 3.12.48-52.27-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

what do you think about swap partition ? should I remove it ?

Do not remove swap unless you at least have a huge pool of memory and even then you should have some. If the OS uses all available memory and the is no swap it will simply crash. If you still have a spinning rust drive use that for swap.

I’m upgrading to SSD, and I think using SSD as swap isn’t good idea

Hi
Get a good brand SSD, shouldn’t be an issue if you do use swap, else make sure you have lots of ram.

I don’t see any use or maybe a few Kbytes at times, but it’s still allocated in case something acts up.

If you do use suspend or hibernate, then you will need swap…