Skip to content

Instantly share code, notes, and snippets.

@DmitryKorlas
Last active June 22, 2016 14:28
Show Gist options
  • Select an option

  • Save DmitryKorlas/027e7336d501a027d82b to your computer and use it in GitHub Desktop.

Select an option

Save DmitryKorlas/027e7336d501a027d82b to your computer and use it in GitHub Desktop.
ubuntu few tweaks

Setup remote desktop access

sudo apt-get install xfce4
echo xfce4-session >~/.xsession

Then make new remote desktop connection, choose "sesman-Xvnc" in options

============================================================

Improve performance for SSD drive

The main trick here is switch IO scheduler for ssd device. So, let's begin

  1. find ssd drive (sda in this case)
$ for f in /sys/block/sd?/queue/rotational; do printf "$f is "; cat $f; done
/sys/block/sda/queue/rotational is 0 # this is SSD
/sys/block/sdb/queue/rotational is 1
/sys/block/sdc/queue/rotational is 1   
  1. check current scheduler for ssd drive (deadline in this example)
$ cat /sys/block/sda/queue/scheduler
noop [deadline] cfq 
  1. switch scheduler to 'noop' You don't need to edit this file via text editor, just exec a command
echo noop > /sys/block/sda/queue/scheduler

now check scheduler (via 2) - it should be changed to 'noop' 4. make it persistent you have to add command sh "echo noop > /sys/block/sda/queue/scheduler" into /etc/rc.local 5. reboot

Thanks for this articles and notices:

https://wiki.ubuntuusers.de/SSD/Scheduler http://askubuntu.com/questions/78682/how-do-i-change-to-the-noop-scheduler http://www.cyberciti.biz/faq/linux-change-io-scheduler-for-harddisk/

============================================================

Be carefull before executing sudo swapoff -a - your system should have enough free memory to accumulate swap.

$ cat /proc/sys/vm/swappiness
60
$ sudo sysctl vm.swappiness=10
$ cat /proc/sys/vm/swappiness
10
$ free -m
             total       used       free     shared    buffers     cached
Mem:          7675       7362        312        759          3        920
-/+ buffers/cache:       6438       1236
Swap:         8552        307       8245
$
$ sudo swapoff -a
$
$ free -m                                                                                                                                                                                                          
             total       used       free     shared    buffers     cached
Mem:          7675       7503        172        801          1        827
-/+ buffers/cache:       6674       1000
Swap:            0          0          0
$ sudo swapon -a

See artical for further information about swappiness. It's recommended to set it into 10 for desktop systems, but feel free to experiment. https://help.ubuntu.com/community/SwapFaq#What_is_swappiness_and_how_do_I_change_it.3F

============================================================

Few well organized themes for ubuntu 14.10 (unity/xfce/gnome) taken from http://numixproject.github.io/

1. Install numix themes

sudo apt-add-repository ppa:numix/ppa

sudo apt-get update
sudo apt-get install numix-gtk-theme
sudo apt-get install numix-icon-theme-circle
sudo apt-get install numix-plymouth-theme
sudo apt-get install numix-icon-theme
sudo apt-get install numix-wallpaper-aurora

2. Set appropriate theme

2.1 Unity

sudo apt-get install unity-tweak-tool
switch texture quality to increase performance

Open unity-tweak-tool and change Window Manager > General > Hardware acceleration > Texture quality - set value Fast

2.2 XFCE

sudo apt-get install xfce-theme-manager
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment