LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy
User Name
Password
Puppy This forum is for the discussion of Puppy Linux.

Notices


Reply
  Search this Thread
Old 12-14-2014, 06:29 PM   #1
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Rep: Reputation: 169Reputation: 169
Enabling relatime


Did I do this correctly ?

f
Code:
stab file

none          /proc        proc     defaults               0 0
none          /sys         sysfs    defaults               0 0
none          /dev/pts     devpts   gid=2,mode=620         0 0
/dev/fd0      /mnt/floppy  auto     noauto,rw              0 0
/dev/sda2     /mnt/sda2    auto
/dev/sda5     /            ext3     defaults,relatime,data=writeback   0 0
#47: No more disk thrashing

We've said this time and time again, but people really never seem to take it seriously: if you want your disks to run at their full potential, make sure and enable the relatime option in /etc/fstab.

You see, every time your disk does a read (eg reading a file), it also does a write, to store the information pertaining to when the file was last read. This process is incredibly slow, and you can get a sizeable speed boost - usually around 10 per cent - with just one simple tweak.

Switch to root, then open up /etc/fstab in your favourite text editor. Look for where you root filesystem is, and make sure that it uses defaults,relatime,data=writeback for its settings, then save, reboot and let your poor overworked PC perform to its full potential... At last!
 
Old 12-15-2014, 12:28 PM   #2
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,367

Rep: Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258
I use, and suggest to friend newer to Linux (on home PCs) they use, noatime. What're the benefits of relatime over noatime?
 
Old 12-15-2014, 12:41 PM   #3
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Quote:
Originally Posted by 273 View Post
I use, and suggest to friend newer to Linux (on home PCs) they use, noatime. What're the benefits of relatime over noatime?
As I understand it, some programs need at least relatime entries to function correctly.

It's a pretty rare requirement though -- the only one I can think of is mutt...
 
1 members found this post helpful.
Old 12-15-2014, 12:59 PM   #4
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,367

Rep: Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258
Quote:
Originally Posted by Head_on_a_Stick View Post
As I understand it, some programs need at least relatime entries to function correctly.

It's a pretty rare requirement though -- the only one I can think of is mutt...
So am I right in my understanding that noatime saves writes over relatime but relatime updates the modification time in a much more sensible manner?
In which case I shall probably continue as above but bear relatime in mind for servers.
 
Old 12-15-2014, 01:33 PM   #5
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Quote:
Originally Posted by 273 View Post
So am I right in my understanding that noatime saves writes over relatime but relatime updates the modification time in a much more sensible manner?
In which case I shall probably continue as above but bear relatime in mind for servers.
I'm no expert; here is my source:
https://wiki.archlinux.org/index.php...#atime_options
https://wiki.archlinux.org/index.php...e_mount_option

Last edited by Head_on_a_Stick; 12-15-2014 at 01:34 PM.
 
Old 12-15-2014, 01:40 PM   #6
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,367

Rep: Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258Reputation: 2258
I did hope for an expert since you started the thread about these thiings...
 
Old 12-15-2014, 05:13 PM   #7
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,298

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
With the "noatime" option, read operations never update the atime. With "relatime", only the first read operation on a newly written file will update the atime. Using "relatime" allows programs to answer the question, "Has this file been read since the last time it was updated?" without needing to have atime updated for every read operation.

Like Head_on_a_Stick, the only program I know of that needs the answer to that question is mutt, but on occasion I find it useful to know whether some file I keep updating is ever actually used. (And, my backup scripts do temporarily remount filesystems with "noatime" to avoid atime updates caused by the backup procedure.)

BTW, the only time you need the "defaults" option in an fstab entry is when you have nothing else to put in that field. It's just a syntactic placeholder that does nothing.

Last edited by rknichols; 12-15-2014 at 05:19 PM. Reason: Add comment about backups and the "BTW ..."
 
2 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ext4 FS / relatime / different treatment on access time after permission changes popi Linux - Newbie 2 04-27-2013 04:18 AM
jfs volume now mounts with (rw,relatime) after upgrade ? fogpipe Slackware 1 07-15-2012 02:17 PM
[SOLVED] root partition mounted:/dev/root on / type ext4 (rw,relatime,barrier=1,data=ordered) costasdk Slackware 2 06-30-2011 02:09 PM
Intresting article about noatime/relatime centosfan Linux - General 5 10-18-2009 11:42 AM
Enabling routing how ? samnetic Linux - Networking 1 05-02-2006 07:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy

All times are GMT -5. The time now is 08:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration