Author Topic: Optimizing Ubuntu swap performance  (Read 2547 times)

Offline NGC7789

  • PixInsight Old Hand
  • ****
  • Posts: 391
Optimizing Ubuntu swap performance
« on: 2014 July 23 13:59:49 »
I settled on Ubuntu after struggling too long to get Fedora to dual boot on my hackintosh. Fedora showed much superior benchmark for swap and I wondered if Ubuntu could do the same. A quick google turned up this http://www.namhuy.net/1563/how-to-tweak-and-optimize-ssd-for-ubuntu-linux-mint.html. My swap benchmarks went from 8386 to 21625! See benchmarks http://pixinsight.com/benchmark/benchmark-report.php?sn=E9O2QAVPYP66Y8CU27M1H0599637S76H and http://pixinsight.com/benchmark/benchmark-report.php?sn=4Q3952DS4I19HQOFV7QM6258RE39Q9US

Offline NGC7789

  • PixInsight Old Hand
  • ****
  • Posts: 391
Re: Optimizing Ubuntu swap performance
« Reply #1 on: 2014 July 24 20:03:59 »
After more thought and analysis it turns out some advice on this link is not so good.

Enabling trim using discard in fstab turns out to harm performance since it trims after every delete and is unnecessary as trim is performed by a cron job weekly in Ubuntu 14.04 if you have and Intel or Samsung SSD (and can be enabled for other SSDs too). If weekly is not often enough for you then make it daily or on boot.

Moving /tmp to RAM if /tmp is your swap (the PI default) is the same as using a ram disk for swap: you trade speed for swap space. Most of us do not have enough RAM to make this a good trade. If I remember correctly you want 40-60 GB of swap.