FastNetMon

Wednesday 20 January 2010

Отключение atime для ext3 разделов с интенсивным доступом

Отключение поддержки atime (время последнего доступа) позволяет увеличить производительность дисковой подсистемы.

Вот описание, как и почему стоит это делать:

Here is how atime works: for every instance that the operating system accesses a file, atime logs the time when that file was last accessed (writes this info onto the Linux ext3 partition). As you can imagine, all this writing takes its toll in terms of performance, which is a drag (no pun intended) considering that only mail-monitoring and defragmenting applications use atime to function properly.


Вкратце - при каждом доступе к файлу (хоть на чтение, хоть на запись) файловая система изменяет время последнего доступа к файлу (atime) на текущее и записывает его в файловую систему, что влияет не лучшим образом на производительность (теоретически, практически я ничего сказать не могу - не тестил).

Открываем конфиг:
vi /etc/fstab


Ищем строку с требуемой файловой системой:
/dev/md2 / ext3 defaults,grpquota,usrquota 0 0


И добавляем через запятую после default notatime,nodiratime чтобы получить следующее:

/dev/md2 / ext3 defaults,noatime,nodiratime,grpquota,usrquota 0 0


Перемонтируем файловую систему:

mount -o remount /


Возможные противопоказания: http://phpsuxx.blogspot.com/2010/01/atime-postfix.html

источники:
http://www.findmysoft.com/news/Disable-Atime-for-a-Faster-Running-Linux-OS/
http://en.opensuse.org/Speeding_up_Ext3
http://www.redhat.com/support/wpapers/redhat/ext3/tuning.html

No comments :

Post a Comment

Note: only a member of this blog may post a comment.