Wednesday, August 25, 2010

tmpfs and PostgreSQL

I've been dreaming to have an SSD for quite a long time. In order to reduce disk operations when I actually have an SSD, I practiced to
  • point browser.cache.disk.parent_directory of Firefox to /dev/shm
  • remove swap partition
  • move several temporary folders to tmpfs.
tmpfs /var/log/apt tmpfs noatime,defaults 0 0
tmpfs /var/log tmpfs noatime,defaults 0 0
tmpfs /tmp tmpfs noatime,defaults 0 0
tmpfs /var/tmp tmpfs noatime,defaults 0 0

It works beautifully until I installed PostgreSQL for a project on my laptop, because it needs one more folder for logs. Here is the workaround.

sudo mkdir /var/log/postgresql
sudo service postgresql-8.4 start

Enjoy taking the advantage of my 4GB memory.

No comments:

Post a Comment