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

Re: git performance

From
Jeff King <peff@peff.net>
Date
Oct 24, 2008, 18:20 UTC
Message-ID
<20081024182031.GA11287@coredump.intra.peff.net>
In-Reply-To
<alpine.LFD.2.00.0810241050310.3287@nehalem.linux-foundation.org>
On Fri, Oct 24, 2008 at 10:53:20AM -0700, Linus Torvalds wrote:
Show 13 quoted lines
> >   echo 1 >/proc/sys/vm/drop_caches
> 
> Use "echo 3" instead of "1".
> 
> It's actually a bitmask, with bit 0 being "data" (pagecache) and bit 1 
> being "metadata" (inodes and directory caches).
> 
> And since git (or any SCM) is very metadata-intensive, you really should 
> make sure to drop metadata too, otherwise your caches won't be really very 
> cold at all.
> 
> (But it obviously depends on the operation you're testing - some are more 
> about the inodes and directories, others are about file data access).

Ah, thanks. In this case, he was interested in walking the directory tree, so the metadata caching was indeed very important.

-Peff
Previous: Linus Torvalds
Message 22 of 22 in “git performance”
  1. Edward Ned HarveyOct 22, 2008
  2. Jeff KingOct 22, 2008
  3. Peter HarrisOct 22, 2008
  4. Edward Ned HarveyOct 22, 2008
  5. Andreas EricssonOct 23, 2008
  6. Andreas EricssonOct 23, 2008
  7. Andreas EricssonOct 23, 2008
  8. Matthieu MoyOct 23, 2008
  9. Jeff KingOct 23, 2008
  10. Daniel BarkalowOct 23, 2008
  11. Nanako ShiraishiOct 23, 2008
  12. Daniel BarkalowOct 24, 2008
  13. Pete HarlanOct 24, 2008
  14. Pete HarlanOct 24, 2008
  15. Jakub NarebskiOct 22, 2008
  16. Andreas EricssonOct 23, 2008
  17. Nguyen Thai Ngoc DuyOct 23, 2008
  18. Jeff KingOct 24, 2008
  19. George ShammasOct 24, 2008
  20. Jakub NarebskiOct 24, 2008
  21. Linus TorvaldsOct 24, 2008
  22. Jeff KingOct 24, 2008

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.