All of lore.kernel.org
 help / color / mirror / Atom feed
* Temporary hangs when using locking with apache+nfsv4
@ 2014-03-03  5:47 Dennis Jacobfeuerborn
  2014-03-03 15:43 ` Jeff Layton
  0 siblings, 1 reply; 12+ messages in thread
From: Dennis Jacobfeuerborn @ 2014-03-03  5:47 UTC (permalink / raw)
  To: linux-nfs

Hi,
I'm experimenting with using NFSv4 as storage for web servers and while 
regular file access seems to work fine as soon as I bring flock() into 
play things become more problematic.
I've create a tiny test php script that basically opens a file, locks it 
using flock(), writes that fact into a log file (on a local filesystem), 
performs a usleep(1000), writes into the log that it is about to unlock 
the file and finally unlocks it.
I invoke that script using ab with a concurrency of 20 for a few 
thousand requests.

The result is that while 99% of the request respond quickly a few 
request seem to hang for up to 30 seconds. According to the log file 
they must eventually succeed since I see all expected entries and the 
locking seems to work as well since all entries are in the expected order.

Is it expected that these long delays happen? When I comment the locking 
function out these hangs disappear.
Are there some knobs to tune NFS and make it behave better in these 
situations?

Regards,
   Dennis

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-03-03 23:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-03  5:47 Temporary hangs when using locking with apache+nfsv4 Dennis Jacobfeuerborn
2014-03-03 15:43 ` Jeff Layton
2014-03-03 15:46   ` Trond Myklebust
2014-03-03 16:41     ` Jeff Layton
2014-03-03 18:22       ` Trond Myklebust
2014-03-03 18:34         ` Jeff Layton
2014-03-03 19:02           ` Trond Myklebust
2014-03-03 22:41             ` Jeff Layton
2014-03-03 20:41       ` J. Bruce Fields
2014-03-03 22:29         ` Jeff Layton
2014-03-03 22:35           ` J. Bruce Fields
2014-03-03 23:03   ` Dennis Jacobfeuerborn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.