Monday, December 24, 2012

Speed improvement

Here's some tips which I  applied recently on one busy ded server and the result was a significant reduce in disk I/O load and so faster speed, lesser load avg.

- mount /tmp in ramdisk : Here's the /etc/fstab file line related to tmp :
none /tmp tmpfs nr_inodes=200k,mode=01777,nosuid,nodev 0 0

Check if php uses /tmp as session.save_path , mysql also uses /tmp as tmpdir (mysqladmin variables | grep tmpdir). I've notices on websites with high join queries, mysql has a lot of I/O in /tmp so it's recommended to mount this to ram instead of hdd.


- Mysql datadir : /var/lib/mysql  , recommended to mount in a SSD disk which will give you much greater performance.

- nginx + php-fpm  : There're lots of resources on web suggesting that nginx+php-fpm have much more performance rather than php via apache2 handler.

- ... I'll update this post if I found/remember new tricks ...

- More ?

No comments:

Post a Comment

How to export Apple Health / Google Fit training activity to TCX format

  I own a Xiaomi Smart Band 7, and recently, my Mi Fitness app stopped syncing running activities to Strava. Mi Fitness supports syncing dat...