經過一陣子 google 之後,知道問題是出在 crash recovery 的紀錄,竟然預設每 15 秒會回寫一次。再加上我習慣同時開的 tab 數量很大,每次都有幾 MB 的紀錄。如果有使用 session-saver 這個 addon,使用的也是同一個參數:browser.sessionstore.interval。個人可以視自己對瀏覽記錄損失的容忍度來調整這個參數,甚至不需要的話可以完全關閉。
Since the hard drive of my small form-factor desktop crashed, I'm using a flash USB drive as the storage. The is similar to people using SSD nowadays, but with a slower performance and lower price.
The same issues arise, the disk writes are lethal as the flash blocks have limited lifetime. One should move all disk caches to ram drives. Under linux, you can easily done with tmpfs:
tmpfs 1.6G 197M 1.4G 13% /tmp
tmpfs 316M 364K 315M 1% /run
tmpfs 1.6G 676K 1.6G 1% /var/log
tmpfs 2.0G 36K 2.0G 1% /var/tmp
One can move the cache directory to tmpfs:
key | value |
browser.cache.memory.enable | false |
browser.cache.offline.enable | false |
browser.cache.disk.enable | true |
browser.cache.disk.capacity | 262144 |
browser.cache.disk.parent_directory | /dev/shm/firefox |
Another one is the browser that I would use heavily on this machine. People notice that Firefox could cause huge writes due to the crash recovery:
http://superuser.com/questions/399473/firefox-writes-megabytes-of-data-per-minute-to-disk-why
The frequency of backing up session can be tuned:
key | value |
browser.sessionstore.interval | 30000 |
For people do not want to use crash recovery at all, he or she can set:
key | value |
browser.sessionstore.enabled | false |
No comments:
Post a Comment