Hi, I have a repository that seems to exhibit some pathology in the hashed
repository format. There, some stats about the repository (maybe we should have
a darcs show stats that gives the vital stats of a repo? show repo only gives
number of patches...)
01:15:39 | [EMAIL PROTECTED]:~/dev/divine/branch-1.3 -> ll
_darcs/pristine.hashed | wc -l
2242
01:15:47 | [EMAIL PROTECTED]:~/dev/divine/branch-1.3 -> ll _darcs/patches | wc
-l
3168
Timings
=======
Hashed pristine
---------------
(caches are reasonably cold here...)
00:55:58 | [EMAIL PROTECTED]:~/dev/divine/branch-1.3 -> time darcs wh
No changes!
darcs wh 9,20s user 1,22s system 27% cpu 37,559 total
00:57:00 | [EMAIL PROTECTED]:~/dev/divine/branch-1.3 -> time darcs wh
No changes!
darcs wh 5,00s user 0,25s system 94% cpu 5,559 total
darcs wh 4,92s user 0,33s system 98% cpu 5,325 total
darcs wh 5,08s user 0,19s system 97% cpu 5,401 total
Old-fashioned pristine
----------------------
(again, reasonably cold cache)
00:54:03 | [EMAIL PROTECTED]:~/dev/divine/branch-1.3_oldfashioned -> time darcs
wh
No changes!
darcs wh 4,20s user 0,64s system 17% cpu 27,334 total
00:55:24 | [EMAIL PROTECTED]:~/dev/divine/branch-1.3_oldfashioned -> time darcs
wh
No changes!
darcs wh 2,56s user 0,20s system 98% cpu 2,808 total
darcs wh 2,62s user 0,18s system 97% cpu 2,864 total
darcs wh 2,61s user 0,18s system 97% cpu 2,860 total
The difference is fairly significant, both on cold and hot cache.
Strace
======
Hashed pristine
---------------
00:57:40 | [EMAIL PROTECTED]:~/dev/divine/branch-1.3 -> strace -c darcs wh
No changes!
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
73.65 0.014990 1 14629 read
19.63 0.003996 4 916 futex
1.67 0.000339 0 4894 23 stat64
1.27 0.000258 0 6730 open
1.07 0.000218 0 6730 close
0.85 0.000174 0 8801 fcntl64
0.50 0.000102 0 4368 lstat64
0.49 0.000100 0 2303 munmap
0.42 0.000086 0 6897 _llseek
0.18 0.000036 0 2299 2299 link
0.16 0.000032 0 4402 4399 ioctl
0.10 0.000021 0 8826 fstat64
0.00 0.000000 0 3 write
0.00 0.000000 0 1 execve
0.00 0.000000 0 12 chdir
0.00 0.000000 0 31 30 access
0.00 0.000000 0 1 pipe
0.00 0.000000 0 203 brk
0.00 0.000000 0 3 getrusage
0.00 0.000000 0 7 gettimeofday
0.00 0.000000 0 292 2 sigreturn
0.00 0.000000 0 1 clone
0.00 0.000000 0 1 uname
0.00 0.000000 0 2 mprotect
0.00 0.000000 0 11 rt_sigaction
0.00 0.000000 0 685 rt_sigprocmask
0.00 0.000000 0 14 getcwd
0.00 0.000000 0 1 getrlimit
0.00 0.000000 0 2388 mmap2
0.00 0.000000 0 1 set_thread_area
0.00 0.000000 0 1 set_tid_address
0.00 0.000000 0 1 timer_create
0.00 0.000000 0 2 timer_settime
0.00 0.000000 0 1 timer_delete
0.00 0.000000 0 3 clock_gettime
0.00 0.000000 0 1 set_robust_list
------ ----------- ----------- --------- --------- ----------------
100.00 0.020352 75461 6753 total
Old-fashioned pristine
----------------------
00:58:24 | [EMAIL PROTECTED]:~/dev/divine/branch-1.3_oldfashioned -> strace -c
darcs wh
No changes!
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
59.04 0.017627 5 3728 read
38.32 0.011442 23 502 futex
1.04 0.000311 0 4142 4 open
0.75 0.000225 0 4598 lstat64
0.27 0.000081 0 8012 fstat64
0.22 0.000067 0 268 mmap2
0.22 0.000065 0 7758 fcntl64
0.07 0.000022 0 2470 mprotect
0.06 0.000018 0 466 getdents64
0.00 0.000000 0 2 write
0.00 0.000000 0 4138 close
0.00 0.000000 0 4 2 unlink
0.00 0.000000 0 1 execve
0.00 0.000000 0 19 chdir
0.00 0.000000 0 31 30 access
0.00 0.000000 0 1 mkdir
0.00 0.000000 0 2 1 rmdir
0.00 0.000000 0 1 pipe
0.00 0.000000 0 219 brk
0.00 0.000000 0 3879 3876 ioctl
0.00 0.000000 0 3 getrusage
0.00 0.000000 0 7 gettimeofday
0.00 0.000000 0 28 munmap
0.00 0.000000 0 146 1 sigreturn
0.00 0.000000 0 1 clone
0.00 0.000000 0 1 uname
0.00 0.000000 0 11 rt_sigaction
0.00 0.000000 0 415 rt_sigprocmask
0.00 0.000000 0 19 getcwd
0.00 0.000000 0 1 getrlimit
0.00 0.000000 0 67 27 stat64
0.00 0.000000 0 3 madvise
0.00 0.000000 0 1 set_thread_area
0.00 0.000000 0 1 set_tid_address
0.00 0.000000 0 1 timer_create
0.00 0.000000 0 2 timer_settime
0.00 0.000000 0 1 timer_delete
0.00 0.000000 0 3 clock_gettime
0.00 0.000000 0 1 set_robust_list
------ ----------- ----------- --------- --------- ----------------
100.00 0.029858 40953 3941 total
The difference
--------------
Although the strace for hashed repository shows many more syscalls, the total
time spent there is *lower*. So that's probably not the issue. The time output
shows that the difference goes into user time -- I guess at this point, I need
to get a profiling build rolling. I'll report back when I have some profiles.
(Note that for the cold cache case, the reads seem to hurt much more though. So
there might be a case for trying to reduce that -- how do we actually map
working-copy paths to pristine files and vice versa? Gotta look that up.)
Yours,
Petr.
--
Peter Rockai | me()mornfall!net | prockai()redhat!com
http://blog.mornfall.net | http://web.mornfall.net
"In My Egotistical Opinion, most people's C programs should be
indented six feet downward and covered with dirt."
-- Blair P. Houghton on the subject of C program indentation
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users