Friday, July 17, 2009

create a ramdisk for fast read/write access

ramfs grows dynamically, tmpfs doesn't. tmpfs uses the swap if you exceed the size specified, while ramfs doesn't. For an application like varnish, you can set a fixed size of the cache, so it _should_ not be a problem.

# example of mount
mount -t ramfs none /tmp/varnish -o size=1024m

# for fstab
cache /tmp/varnish ramfs defaults 0 0

No comments:

Post a Comment