git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re:

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
May 9, 2009, 16:44 UTC
Message-ID
<alpine.LFD.2.01.0905090926300.3586@localhost.localdomain>
In-Reply-To
<twBG1KnSrgPNk7NoVey4mgig1BeAk7e1GHOT90PSV9ZGTs-zCWYdtA@cipher.nrlssc.navy.mil>
On Fri, 8 May 2009, Brandon Casey wrote:
> 
> btw, I've since done some more testing on some centos5.3 boxes we have.
> I get similar results (less ancient kernel 2.6.18).
Yes, 2.6.18 is still much too old to matter from a locking standpoint. 

When people initially worried about scalability, the issues were more about server side stuff and the cached cases. NFS (as a client) is certainly used on the server side too, but it tends to be a somewhat secondary worry where only specific parts really matter. So people worked a lot more on the core kernel, and on local high-performance filesystem scaling.

Only lately have we been pretty aggressive about finally really getting rid of the old "single big lock" (BKL) model entirely, or moving outwards from the core.

And while we removed the BKL from the normal NFS read/write paths long long ago, all the name lookup and directory handling code still had it until a year ago.

That, btw, is directly explained by perceived scalability issues: NFS is fairly often used as the backing store for a database and scaling thus matters there. But databases tend to keep their few big files open and use pread/pwrite - so pathname lookup is not nearly as significant for server ops as plain read/write.

(Pathname lookup is important for things like web servers etc, but they rely heavily on caching for that, and the cached case scales fine).

> I've also scanned through the errata announcements that RedHat has 
> released for their kernel updates.  A few of them involve NFS.  
> Possibly, whatever RedHat modified in the 5.X kernel was also backported 
> to the 4.X kernel.

That is very possibly the case. Expanding the BKL usage in some case could easily trigger the lock getting contention - and the way lock contention works, once you get a just even a small _hint_ of contention, things often fall off a cliff. The contention slows locking down, which in turn causes more CPU usage, which in turn causes _more_ contention.

So even a small amount of extra locking - or even just slowing down some code that was inside the lock - can have catastrophic behavioural changes when the lock is close to being a problem. You do not get a nice gradual slowdown at all - you just hit a hard wall.

I guess I should really try to set up some fileserver here at home to improve my test coverage. And to do better backups (or the little private data I have that I can't just mirror out to the world by turning it into an open-source project ;^)

				Linus
Previous: Brandon CaseyNext: Linus Torvalds
Message 31 of 34 in “(unknown)”
  1. Bevan WatkissMay 7, 2009
  2. Alex RiesenMay 7, 2009
  3. Bevan WatkissMay 7, 2009
  4. Alex RiesenMay 7, 2009
  5. Bevan WatkissMay 7, 2009
  6. Björn SteinbrinkMay 7, 2009
  7. Linus TorvaldsMay 7, 2009
  8. Bevan WatkissMay 7, 2009
  9. Linus TorvaldsMay 7, 2009
  10. Linus TorvaldsMay 7, 2009
  11. Junio C HamanoMay 7, 2009
  12. Linus TorvaldsMay 7, 2009
  13. Linus TorvaldsMay 7, 2009
  14. david@lang.hmMay 7, 2009
  15. Linus TorvaldsMay 7, 2009
  16. david@lang.hmMay 7, 2009
  17. Linus TorvaldsMay 7, 2009
  18. david@lang.hmMay 7, 2009
  19. Linus TorvaldsMay 7, 2009
  20. david@lang.hmMay 7, 2009
  21. Johan HerlandMay 7, 2009
  22. Bevan WatkissMay 8, 2009
  23. Alex RiesenMay 8, 2009
  24. Linus TorvaldsMay 8, 2009
  25. Brandon CaseyMay 8, 2009
  26. Linus TorvaldsMay 8, 2009
  27. Brandon CaseyMay 8, 2009
  28. Brandon CaseyMay 8, 2009
  29. Linus TorvaldsMay 8, 2009
  30. Brandon CaseyMay 8, 2009
  31. Linus TorvaldsMay 9, 2009
  32. Linus TorvaldsMay 8, 2009
  33. 'git checkout' and unlink() calls (was: Re: )Kjetil Barvik, May 8, 2009
  34. Linus TorvaldsMay 8, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.