PDA

View Full Version : Ext4 Tuning? Disable access time specific FOLDERS?



synic
27th April 2011, 12:40 AM
Can anyone shed some light in this? Using Fedora 14-64, new install, 185 Opteron x 2 gig ram, sata hard drives formatted Ext4.

I have added noatime attribute to my fstab, which I use to specify system wide filesystem operation, like such:

UUID=a777e7fd-dd43-4dd0-86f6-33d893ab003d / ext4 defaults 1 1
UUID=82a1d08e-486a-4be1-a07a-ac21ed09fd0f /home ext4 defaults 1 2
UUID=fb01fab4-7247-41a4-a154-bba98106d32c swap swap defaults 0 0
UUID=ebfc0936-9383-4f62-a7ca-1d3c420415a8 /mnt/1 ext4 defaults,noatime 2 2
UUID=3ccd0846-19f5-4b00-859b-784968ee4bc2 /mnt/2 ext4 defaults,noatime 2 2
UUID=128C5BDF8C5BBC43 /mnt/files ntfs-3g defaults,noatime 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0


However, in my home directory I have a folder for all my digital photos of which I have more than 20,000, and in another folder I have images and clipart of which I have almost 8,000. That is a lot of read only access to a significant number of files in my home directory.

How can I tell Fedora to not update the LAST ACCESS TIME of those files (specifically images) that will never actually be changed other than just being read. I want to leave that feature enabled for the rest of my home directory.

I am trying t; improve my disk performance in Nautilus because whenever I access the folders with my images the system literally slows to a crawl and sometimes even the mouse stops working for several minutes until Nautilus has finished having its heart attack.

This is a significant issue for me.

Please help. :(

DBelton
27th April 2011, 04:03 AM
you can set the noatime attribute for specific files by using chattr

for example... to change all files in /home/user1 you use:



chattr -R +A /home/user1


the -R tells it to recursively change all files and folders beneath the folder specified.

you can also change it for just 1 file as well



chattr +A /home/user1/file.txt


your problem may be more that nautilus is building the thumbnails for your photos rather than the access time, though.

marko
27th April 2011, 04:28 AM
Why not just set the entire /home partition to mount with noatime ?

The main reason not to use noatime is it breaks a very small number of apps like
mutt, otherwise it should be ok

stevea
27th April 2011, 05:06 AM
Why not just set the entire /home partition to mount with noatime ?

The main reason not to use noatime is it breaks a very small number of apps like
mutt, otherwise it should be ok

I would use 'noatmee" on "/" and "/home", It's rather foolish not to UNLESS you have a special requirement.


There is other "tricks" wrt 'ext*' file systems.

By default the mkfs allocate 5% of the drive as 'reserve' blocks. These are blocks available only to 'root' after the rest of the disk is filled. IMO 5% is WAY excessive fornearly any system andespecially a non-server system. The idea arose in an era of 100MB drives wher e5MB f fatal logs might be useful.

This sort of command reduces it to 1k 4KB (=4MB) reserved blocks.
tune2fs -r 1024 /dev/sda2
---

synic
27th April 2011, 12:45 PM
I would use 'noatmee" on "/" and "/home", It's rather foolish not to UNLESS you have a special requirement.
...
---

Use noatime On root and home? Isn't this risky? No?

I am pretty sure that Nautilus is freaking out because it is having to analyse and build thumbnails for at least a thousand images at a time. I was actually trying to make the process easier for it.

Is there anything else I can do to help Nautilus when I am accessing my images folders?

Thanks.

DBelton
27th April 2011, 07:58 PM
using noatime on /home folder really isn't too risky.

About the only things that have problems now are if you are using mutt (as marko pointed out above).

Also there are a few issues if you use noatime on your /tmp filesystems and run tmpwatch since it uses the last accessed time to determine when to delete tmp files.

Other than those 2 issues, you can pretty safely run with noatime on just about all of your filesystems.

synic
29th April 2011, 04:45 AM
Thanks for all your help.

I have update my fstab with these settings and I think there is an increase in performance of Nautilus.

Have yet to update it on my home folder but will do so shortly.