Choose style:

Author Topic: Check fstab, swappiness and vm.vfs_cache_pressure  (Read 2078 times)

0 Members and 1 Guest are viewing this topic.

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4808
  • Karma: 1013
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 8 Respin-2 (64-bit)
Check fstab, swappiness and vm.vfs_cache_pressure
« on: May 18, 2015, 08:39:57 am »
Hi I've made a few tweaks to my Acer Aspire One ZG5.  I'm trying to get the best performance out of it, while reducing the writing to the little 8 GB fixed SSD by keeping as much as possible in RAM.  I've made some changes to fstab.  Playing with SSDs is really new to me, so experimentation is called for  ;D.  Could someone have a look over them to see if they are okay.  Naturally I've made a backup of the original file and the original line for the SSD is also commented out in the active fstab file.
Spoiler (click here to view / hide)
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
# use these flags to reduce SSD writes: noatime,nodiratime,discard
# noatime and nodiratime flags turns off writing "last access time"
# discard enables TRIM as long as kernel >= 2.6.33
#UUID=1469e248-9a5d-4505-ad8f-24434be18a2b /               ext4    errors=remount-ro 0       1
UUID=1469e248-9a5d-4505-ad8f-24434be18a2b /               ext4    noatime,nodiratime,discard,errors=remount-ro 0       1
# /home was on /dev/mmcblk0p1 during installation
UUID=8db74c4a-fa77-4cff-b444-bdceac41defd /home           ext4    defaults        0       2
# swap was on /dev/sda2 during installation
UUID=beaeb758-6a4c-43f1-9588-91604413421f none            swap    sw              0       0
#32 GB Extra storage
UUID=9764-D165 /media/andy/32GB-SD vfat rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2 0 0
###################################################################
# Added 4 lines to use RAM instead of SSD for temp and log files
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0
tmpfs /var/spool tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
[close]
I have already set the swappiness value to 1.  That helped a lot.   I have now reduced the vm.vfs_cache_pressure to 50 in an attempt to squeeze a bit speed more out of it.  The little AAO certainly feels a lot snappier.  Hopefully I have reduced the wear on the little SSD.  The CPU doesn't seem to be noticeably working any harder.  Many thanks  ;).
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Online VinDSL

  • Global Moderator
  • Hero
  • *****
  • Posts: 5449
  • Karma: 957
  • Peppermint Mod
    • View Profile
  • Peppermint version(s): Developmental Builds
Re: Check fstab, swappiness and vm.vfs_cache_pressure
« Reply #1 on: May 18, 2015, 08:54:15 am »
You might find this article helpful, Andy:  https://sites.google.com/site/easylinuxtipsproject/ssd

I've tried all sorts of 'tweaks' on my SSD - conventional and experimental - but, the link above contains the best-of-the-best, IMO.

Nowadays, when I do a fresh install, I just go to this article (which is updated occasionally) and use it as a checklist.  I methodically go through everything step-by-step, and employ most of their suggestions.

Anyway, you might want to give it a look-see, if you haven't already seen it already.   ;)

Oh, and BTW, if anyone reading this is tempted to set the swappiness to '0', don't do it...  LoL
« Last Edit: May 18, 2015, 08:56:19 am by VinDSL, Reason: Addendum »

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4808
  • Karma: 1013
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 8 Respin-2 (64-bit)
Re: Check fstab, swappiness and vm.vfs_cache_pressure
« Reply #2 on: May 18, 2015, 09:13:19 am »
You might find this article helpful, Andy:  https://sites.google.com/site/easylinuxtipsproject/ssd

I've tried all sorts of 'tweaks' on my SSD - conventional and experimental - but, the link above contains the best-of-the-best, IMO.

Nowadays, when I do a fresh install, I just go to this article (which is updated occasionally) and use it as a checklist.  I methodically go through everything step-by-step, and employ most of their suggestions.

Anyway, you might want to give it a look-see, if you haven't already seen it already.   ;)

Oh, and BTW, if anyone reading this is tempted to set the swappiness to '0', don't do it...  LoL

Cheer, VinDSL, that's a really useful link that's now nicely bookmarked  It looks like I've pretty much got everything covered.  The little beast certainly feels a lot snappier.  It's not exactly breathing fire.  However, I can safely say it's blowing a few smoke rings now   ;D.
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26305
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Check fstab, swappiness and vm.vfs_cache_pressure
« Reply #3 on: May 18, 2015, 09:37:57 am »
The standard AA1 SSD doesn't support TRIM .. so you might want to remove the "discard" option from your fstab

you can check for TRIM support with:
Code: [Select]
sudo hdparm -I /dev/sda | grep -i TRIM
but if you're using a standard AA1 SSD you'll get nothing returned.

and if you try to run a manual TRIM it'll tell you it's not supported:
Code: [Select]
sudo fstrim -v /
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec