2013年12月10日 星期二

Raspberri-Pi Debian Tuning

Speedup CPU:
we can easily modify the cpu work frequency modifying the config.txt file. Just edit /boot/config.txt
arm_freq=900
i always use this hack and my rpi run without problem
Change scheduler/elevator at boot time:
we use more responsive/less disk io usage scheduler:
modify the /boot/cmdline.txt 
dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootflags=commit=120,data=writeback elevator=deadline rootwait quiet
Tuning sysctl.conf:
as manual say, sysctl.conf is the “Configuration file for setting system variables”... well there are lot of variables you can put inside this file and for everyone we can write a book.
Our goal is to gain more speed and tell our system to use less io/ram. Let’s put in the /etc/sysctl.conf:
vm.dirty_background_ratio = 20
vm.dirty_expire_centisecs = 0
vm.dirty_ratio = 80
vm.dirty_writeback_centisecs = 1200
vm.overcommit_ratio = 2
vm.laptop_mode = 5
vm.swappiness = 10
Removing unused services:
Removing services is a must to do for every system or computer, i have see some linux server with 256Mb of RAM with bluetooth, pcmcia etc etc service enabled... or pc with 100% cpu busy to run some 3d tube screensaver installed by default... also in Debian RaspberryPi official distro...
Automatically startx on boot:
I didn't use session/desktop manager like gdm, xdm or slim, it’s take ram and slow down starting up. Simply way is to use inittab:
vi /etc/inittab
1:2345:respawn:/bin/login -f root tty1

/dev/tty1 2>&1 (default is 1:23:respawn:/sbin/getty 38400 tty1)
and add this to .bash_profile on root home:
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
  exec startx >/dev/null 2>&1
fi 

沒有留言:

張貼留言

How to repair and clone disk with ddrescue

  ddrescue  is a tool that can be used to repair and clone disks on a  Linux system . This includes hard drives, partitions, DVD discs, flas...