Академический Документы
Профессиональный Документы
Культура Документы
C E P H S S D JO UR NA L S
P R E S E NT A T IO NS
SYS VRAK
A R C HIV E S
pdfcrowd.com
pdfcrowd.com
A couple of days ago, I had some issues with NFS consistency, not every servers were up to
date. Some servers had the good version of the file some hadnt. However performing a ls -l
seemed to fixed tempory the problem after each update (where a simple ls didnt). Indeed
issuing ls with the -l option triggers stat() where ls doesnt, just because file attributes are
called from the stats() function. I needed to investigate
I. Story
We determined that some web virtual didnt delivered the same content, some page werent
updated properly. We quickly figured out that the issue was located of the NFS attribute caching,
by default too long, at least in our setup. The first change we made was to enable the noac
option on the client mount. However while trying to enhance the consistency of the NFS data, the
performance impact was pretty high. The impact was easy to detect and reproduce. Basically
open in browser PRO version
pdfcrowd.com
everytime a page was request from the webser, the client had to request the NFS server to be
sure to deliver the latest version. As I said, its quite easy to notice it, espacially the impact on the
Time To First Bite value. You will mainly notice that the website takes a lot of time to load and all
of sudden the content is quickly delivered.
Quick definition of the TTFB, stolen from Wikipedia, Time To First Byte or TTFB is a
measurement that is often used as an indication of the responsiveness of a webserver or other
network resources.
A bad TTFB can be related to a lot of things:
HTTP KeepAlive
Slow storage backend
Limited webserver connection
To mesure the Time To First Bite, I always use the following command (see example for my
Website):
Quite fast :)
open in browser PRO version
pdfcrowd.com
II. Tests
Now see the performance impact by using different options/behavior to cache file attribute on a
NFS mount (client side).
pdfcrowd.com
II.2. lookupcache=none
Stolen from the NFS man page.
If the client ignores its cache and validates every application lookup request with the server, that
client can immediately detect when a new directory entry has been either created or removed by
another client. You can specify this behavior using lookupcache=none. The extra NFS requests
needed if the client does not cache directory entries can exact a performance penalty. Disabling
lookup caching should result in less of a performance penalty than using noac, and has no effect
on how the NFS client caches the attributes of files.
pdfcrowd.com
II.3. actimeo=3
Stolen from the NFS man page.
Using actimeo sets all of acregmin, acregmax, acdirmin, and acdirmax to the same value.
acregmin=n, The minimum time (in seconds) that the NFS client caches attributes of a
regular file before it requests fresh attribute information from a server. If this option is not
specified, the NFS client uses a 3-second minimum.
acregmax=n, The maximum time (in seconds) that the NFS client caches attributes of a
regular file before it requests fresh attribute information from a server. If this option is not
specified, the NFS client uses a 60-second maximum.
acdirmin=n, The minimum time (in seconds) that the NFS client caches attributes of a
directory before it requests fresh attribute information from a server. If this option is not
specified, the NFS client uses a 30-second minimum.
acdirmax=n, The maximum time (in seconds) that the NFS client caches attributes of a
directory before it requests fresh attribute information from a server. If this option is not
specified, the NFS client uses a 60-second maximum.
open in browser PRO version
pdfcrowd.com
II.4. actimeo=1
Use this mount option only if you have really good reason From my
experience, the noactimeo option did the job pretty well.
open in browser PRO version
pdfcrowd.com
Comments
0 Comments
Recommend
Sebastien Han
Share
pdfcrowd.com
Subscribe
Privacy
pdfcrowd.com