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

Re: irc usage..

From
Linus Torvalds <torvalds@osdl.org>
Date
May 22, 2006, 20:11 UTC
Message-ID
<Pine.LNX.4.64.0605221256090.3697@g5.osdl.org>
In-Reply-To
<46a038f90605221241x58ffa2a4o26159d38d86a8092@mail.gmail.com>
On Tue, 23 May 2006, Martin Langhoff wrote:
> 
> The dev machine where I am running the import is a slug! It's still
> working on it, only gotten to 7700 commits, with the cvsimport process
> stable at 28MB RAM and cvs stable at 4MB.

I have to say, that cvsimport script really does do horrible things. It's basically a fork/exec/exit benchmark, as far as I can tell. Running oprofile on the thing, the top offenders are (ignore the 45% idle thing: it's just because this was run on a dual-cpu system, so since it's almost completely single-threaded you get ~50% idle by default).

	3117654  45.8708  vmlinux                  vmlinux                  .power4_idle
	802313   11.8046  vmlinux                  vmlinux                  .unmap_vmas
	632913    9.3122  vmlinux                  vmlinux                  .copy_page_range
	150359    2.2123  vmlinux                  vmlinux                  .release_pages
	131330    1.9323  vmlinux                  vmlinux                  .vm_normal_page
	117836    1.7337  libperl.so               libperl.so               (no symbols)
	74098     1.0902  libgklayout.so           libgklayout.so           (no symbols)
	54680     0.8045  vmlinux                  vmlinux                  .free_pages_and_swap_cache
	54300     0.7989  libfb.so                 libfb.so                 (no symbols)
	49052     0.7217  vmlinux                  vmlinux                  .copy_4K_page
	46559     0.6850  libc-2.4.so              libc-2.4.so              getc
	42677     0.6279  vmlinux                  vmlinux                  .page_remove_rmap
	41133     0.6052  libc-2.4.so              libc-2.4.so              ferror
	..

those kernel functions are all about process create/exit, and COW faulting after the fork.

Now, this is on ppc, so process creation is likely slower (idiotic PPC VM page table hashes), but Linux is actually very good at doing this, and the fact that process create/exit is so high is a very big sign that the script just ends up executing a _ton_ of small simple processes that do almost nothing.

I wonder why those "git-update-index" calls seem to be (assuming I read the perl correctly) done only a few files at a time. We can do a hundreds in one go, but it seems to want to do just ten files or something at the same time. Although since most commits should hopefully just modify a couple of files, that probably isn't a big deal.

That thing would probably be an order of magnitude faster if written to use the git library interfaces directly. Of course, the CVS part is probably a big overhead, so it might not help much (I would not be surprised at all if a number of the fork/exec/exit things are due to the CVS server starting RCS or something, not due to git-cvsimport itself)

		Linus
Previous: Martin LanghoffNext: Linus Torvalds
Message 51 of 82 in “irc usage..”
  1. Linus TorvaldsMay 20, 2006
  2. Junio C HamanoMay 20, 2006
  3. Jakub NarebskiMay 20, 2006
  4. Yann DirsonMay 20, 2006
  5. Donnie BerkholzMay 20, 2006
  6. Linus TorvaldsMay 20, 2006
  7. Donnie BerkholzMay 20, 2006
  8. Linus TorvaldsMay 21, 2006
  9. Linus TorvaldsMay 22, 2006
  10. Donnie BerkholzMay 22, 2006
  11. Linus TorvaldsMay 22, 2006
  12. Martin LanghoffMay 22, 2006
  13. Donnie BerkholzMay 22, 2006
  14. Martin LanghoffMay 22, 2006
  15. Linus TorvaldsMay 22, 2006
  16. Martin LanghoffMay 22, 2006
  17. Linus TorvaldsMay 22, 2006
  18. Jakub NarebskiMay 22, 2006
  19. Linus TorvaldsMay 22, 2006
  20. Matthias LederhoferMay 22, 2006
  21. Junio C HamanoMay 22, 2006
  22. Jakub NarebskiMay 23, 2006
  23. Martin LanghoffMay 22, 2006
  24. Donnie BerkholzMay 22, 2006
  25. Linus TorvaldsMay 22, 2006
  26. Donnie BerkholzMay 22, 2006
  27. Linus TorvaldsMay 22, 2006
  28. Donnie BerkholzMay 22, 2006
  29. Donnie BerkholzMay 29, 2006
  30. Martin LanghoffMay 29, 2006
  31. Donnie BerkholzMay 29, 2006
  32. Martin LanghoffMay 30, 2006
  33. Donnie BerkholzMay 30, 2006
  34. Martin LanghoffMay 30, 2006
  35. Linus TorvaldsMay 30, 2006
  36. Martin LanghoffMay 30, 2006
  37. Linus TorvaldsMay 30, 2006
  38. Martin LanghoffMay 31, 2006
  39. Donnie BerkholzMay 31, 2006
  40. Martin LanghoffMay 31, 2006
  41. Alec WarnerMay 31, 2006
  42. Martin LanghoffMay 31, 2006
  43. Alec WarnerJun 1, 2006
  44. Martin LanghoffJun 1, 2006
  45. Alec WarnerJun 5, 2006
  46. Martin LanghoffJun 5, 2006
  47. Alec WarnerJun 5, 2006
  48. Martin LanghoffJun 5, 2006
  49. SeanJun 5, 2006
  50. Martin LanghoffMay 22, 2006
  51. Linus TorvaldsMay 22, 2006
  52. Linus TorvaldsMay 22, 2006
  53. Matthias UrlichsMay 22, 2006
  54. Linus TorvaldsMay 22, 2006
  55. Martin LanghoffMay 22, 2006
  56. Martin LanghoffMay 22, 2006
  57. Linus TorvaldsMay 22, 2006
  58. Junio C HamanoMay 22, 2006
  59. Martin LanghoffMay 22, 2006
  60. Jeff KingMay 23, 2006
  61. Jeff KingMay 23, 2006
  62. 1/2 cvsimport: use git-update-index --index-infoJeff King, May 23, 2006
  63. 2/2 cvsimport: cleanup commit functionJeff King, May 23, 2006
  64. 1/2 cvsimport: use git-update-index --index-infoJeff King, May 23, 2006
  65. Martin LanghoffMay 23, 2006
  66. Junio C HamanoMay 23, 2006
  67. Martin LanghoffMay 23, 2006
  68. Linus TorvaldsMay 23, 2006
  69. Linus TorvaldsMay 23, 2006
  70. Junio C HamanoMay 23, 2006
  71. Martin LanghoffMay 23, 2006
  72. Jeff KingMay 23, 2006
  73. Martin LanghoffMay 23, 2006
  74. Morten WelinderMay 23, 2006
  75. Jeff KingMay 23, 2006
  76. Junio C HamanoMay 23, 2006
  77. Jeff KingMay 24, 2006
  78. Donnie BerkholzMay 22, 2006
  79. Thomas GlanzmannMay 21, 2006
  80. Donnie BerkholzMay 21, 2006
  81. Linus TorvaldsMay 22, 2006
  82. Jeff KingMay 23, 2006

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.