Is it worth to tune Ext4 with noatime?

1

On Ubuntu 10.04, relatime is part of the default mount options, unless overridden in /etc/fstab. The previous few releases had relatime explicitly in /etc/fstab. relatime gives the same speed (and flash write cycle conservation) benefits as noatime, without causing trouble to old-fashioned mail notifiers.

The article you cite recommends data=writeback. Ubuntu defaults to data=ordered. Ubuntu's setting is slower in case of heavy disk load, but carries significantly less risk of data loss in case of a crash or power failure. So I would not recommend changing from the Ubuntu default.

Changing commit=5 to commit=100 increases the time window during which data will be lost in case of a crash, for little benefit in most circumstances.

Summary: leave the settings as they are, they were chosen for a reason.

ADDED: There are other things beyond mount options than can make a difference. Switching from ext3 to ext4 is itself often a visible improvement. Here are a...

0 0
2

With previous versions of Ubuntu (using Ext3 filesystem) I used to tune it for better performance with noticeable results by setting the noatime parameter in /etc/fstab.

Is it still worth it to do that with the Ext4 filesystem, which is now default in Ubuntu? If so, does the procedure changed in some way?

An example of this tuning can be found here.

On Ubuntu 10.04, relatime is part of the default mount options, unless overridden in /etc/fstab. The previous few releases had relatime explicitly in /etc/fstab. relatime gives the same speed (and flash write cycle conservation) benefits as noatime, without causing trouble to old-fashioned mail notifiers.

The article you cite recommends data=writeback. Ubuntu defaults to data=ordered. Ubuntu's setting is slower in case of heavy disk load, but carries significantly less risk of data loss in case of a crash or power failure. So I would not recommend changing from the Ubuntu default.

Changing commit=5 to...

0 0
3
Hi, according the process which is wake ups my external usb HDD - i measured it, when mybook start spinning it is 15 minutes ON then it goes to sleep and then in another 15mins it is spinning again.

This unknown process that is causing start/stop behavior of my external usb hdd is sheduled for every 30 minutes - i removed samba and ftp server and disabled anything in crontab then restarted - nothing helped!

Any idea what it can be or how can i find whitch process or application is accessing my hdd? What else can i disable or remove to solve this problem?


/var/log? Some network status file, e.g., /var/lib/dhcp? Are you file systems mounted noatime? You also might want to install noflushd: http://askubuntu.com/questions/2099/is-it-worth-to-tune-ext4-with-noatime

Thank you for answer - my disks are mounted with noatime to /shared/1TB and /shared/4TB

My configuration are two external usb hdds connected to powered USB hub, which is connected to...

0 0
4

Hi,

Those are good questions that should maybe be addressed by default in the wiki. In any case, I would recomend to:

noatime in all your mountpoints.

dirsync in all your mountpoints except your "/" and swap.

Boy...those are a lot of mount points you have in there! :) I have deployments for several thousands of users and don't use even half of those mount point. If that's necessary, ok. If it is not, maybe you are complicating things.

defaults should stay in there and lines look like this:

/dev/mapper/Z_ZIMBRA /opt/zimbra ext4 defaults, noatime, dirsync 0 2

Just in case is a good idea for you, what I usually do is:

sda - 30 GB - Thick lazy

sda1 - /boot - 200 MB - noatime & dirsync

sda2 - swap - 6 GB - noatime

sda3 - / - noatime

sdb - n GB - Thick eager

LVM - /opt/zimbra - noatime & dirsync

sdc - n GB - Thin

LVM - /opt/zimbra/backup - noatime & dirsync

sdd - n GB - thick...

0 0
5

Hi.

I've been using Linux on, and off, again for about two years now, and I never really bothered using anything outside of the extn file systems.

I had at one point only used ext2 only on usb installs, and usually on temporary installs of RIPLinux, Parted Magic, or Puppy Linux.

But... now we have the option to disable journaling with tune2fs, or at the very least mounting the partition with options 'noatime', 'barrier=0', or 'nobh', should we use ext4 for any of these devices?

Are there any ext4 improvements over ext2/3 that would actually apply to SSDs, or other flash devices?

Right now I'm currently running Arch from an USB. It's being used to stream media to a video game console, download files in the 200 - 500 MB range, and act as my media viewer for movie files. ie - mpeg, mp4, mkv, and flv. My original idea was to have a future proof system setup that I could eventually clone over to my replacement hard-drive when it comes in the...

0 0
6

The obligatory disclaimer: The more performance you gain, the more data integrity you loose! But if you want to tune something like a file system, I strongly assume that you know what you are doing :) These tips apply to all major Linux distributions like Fedora/Red Hat, OpenSUSE, and Ubuntu that are already using ext4 or are going to make ext4 their default file system.

As write operations on Solid State Disks (SSD) are expensive the tips below are focused on SSD usage but also apply to HDD usage as well.

My Ubuntu 9.04 Jaunty /etc/fstab after a fresh installation:

[...]
UUID=d818ddf9-ff01-e21a-a67d-3ceab43a9e2b / ext4 relatime,errors=remount-ro 0 1
UUID=0d339122-74e0-e0ea-805a-7879b1fa3172 /home ext4 relatime 0 2
[...]

My

tuned

Ubuntu 9.04 Jaunty

/etc/fstab

:


[...]
UUID=d818ddf9-ff01-e21a-a67d-3ceab43a9e2b / ext4 noatime,barrier=0,nobh,commit=100,nouser_xattr 0 1
UUID=0d339122-74e0-e0ea-805a-7879b1fa3172...
0 0
7
WARNING: This procedure is risky and may result in loss of data
MANUAL TUTORIAL TO DISABLE JOURNALING

credits

hardcore

1. Make a backup of your data using cwm.

2. Download the

tune2fs zipattached

to this post, extract it and copy the extracted

tune2fs

to /data using root explorer or adb.

3. Go to adb shell and type


Code:

$su #mount | grep ext4

This will give something like this

/dev/stl14 on /cache type ext4 (rw,nosuid,nodev,noatime,nodiratime,barrier=0,nobh ,data=ordered,noauto_da_alloc)
/dev/stl13 on /data type ext4 (rw,nosuid,nodev,noatime,nodiratime,barrier=0,nobh ,data=ordered,noauto_da_alloc)
/dev/stl12 on /system type ext4 (ro,relatime,barrier=0,nobh,data=ordered,noauto_da _alloc)
/dev/block/mmcblk0p2 on /system/sd type ext4 (rw,noatime,nodiratime,barrier=1,data=ordered,noau to_da_alloc)

4. We have to remove journal from the above partitions,i.e., /cache , /system and /data
...

0 0
8

As Linux 3.4 was just released and it includes a number of btrfs filesystem changes, I felt it was worth retesting to see if btrfs had better performance.

$ /usr/sbin/bonnie++ -s 8g -n 512

ext4

mkfs -t ext4 /dev/sda9 mount -o noatime /dev/sda9 /mnt Version 1.96 ------Sequential Output------ --Sequential Input- --Random- Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP colo7 8G 582 98 59268 6 30754 3 3515 99 104817 4 306.1 1 Latency 15867us 1456ms 340ms 8997us 50112us 323ms Version 1.96 ------Sequential Create------ --------Random Create-------- colo7 -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 512 35092 55 520637 91 1054 1 35182 54 791080 100 1664 2 Latency 1232ms 541us 14112ms 1189ms 41us 11701ms...
0 0
9

This is post #8 in my December 2013 series about Linux Virtual Machine Performance Tuning. For more, please see the tag “Linux VM Performance Tuning.”

According to Red Hat’s Enterprise Linux 6 Power Management guide, the POSIX family of standards for operating systems “requires that operating systems maintain file system metadata that records when each file was last accessed.” This is called “atime” (a is for access) and is one of three timestamps Linux filesystems keep for their files (the other two are mtime and ctime, modify and change times). You can see these with the ‘stat’ command:

$ stat /bin/ls File: `/bin/ls' Size: 109208 Blocks: 216 IO Block: 4096 regular file Device: fd00h/64768d Inode: 519 Links: 1 Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2013-12-07 21:29:08.068475219 -0600 Modify: 2013-05-23 08:10:31.000000000 -0500 Change: 2013-06-11 19:12:14.577018287 -0500

On the surface this sounds like a good thing to track, but like many...

0 0
10

I'm making an Ubuntu derivative, and I want to make noatime the default mount option for all filesystems (instead of relatime which is default in Ubuntu).

There seems to be a boolean default_relatime kernel parameter for switching between defaulting to atime or relatime (also available by writing to /proc/sys/kernel/default_relatime), but I can't find an equivalent for noatime and I don't know how to enable that in a distro by default.

How to configure to record data to pendrive instantly? suggests that there's a way to add noatime mount parameter via udev, but I have no idea if that will work for internal media and how to do it.

What's the least invasive way to make the kernel default to noatime?

Current default can be viewed using "cat /proc/mounts" because it shows even implicit mount parameters; don't trust "mount".

Yes, I've read Is it worth to tune Ext4 with noatime? and I still want to do it.

The kernel used to have a config option...

0 0
11

On Tue, May 11, 2010 at 10:39 AM, Todd Lipcon

[hidden email]

> wrote:


> On Tue, May 11, 2010 at 7:33 AM, stephen mulcahy

>

[hidden email]

>wrote:

>

> > On 23/04/10 15:43, Todd Lipcon wrote:

> >

> >> Hi Stephen,

> >>

> >> Can you try mounting ext4 with the nodelalloc option? I've seen the same

> >> improvement due to delayed allocation butbeen a little nervous about

> that

> >> option (especially in the NN where we currently follow what the kernel

> >> people call an antipattern for image rotation).

> >>

> >

> > Hi Todd,

> >

> > Sorry for the delayed response - I had to wait for another test window

> > before trying this out.

> >

> > To clarify, my namename and secondary namenode have been using ext4 in

> all

> > tests - reconfiguring the datanodes is a fast operation, the nn and 2nn

> less

> > so....

0 0
12
...
0 0