Re: [PATCH] Teach "git add" and friends to be paranoid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dmitry Potapov <dpotapov@xxxxxxxxx> writes:

> file size = 1Kb; Hashing 100000 files
> Before:
> 0.63user 0.86system 0:01.49elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (0major+100428minor)pagefaults 0swaps
> After:
> 0.54user 0.53system 0:01.07elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (0major+421minor)pagefaults 0swaps
>
> As you can see, in all tests the read() version performed better than
> mmap() though the difference decreases with increase of the file size.
> While for 1Kb files, the speed up is 39% (based on the elapsed time),
> it is mere 1% for 1Mb file size.

Sounds good.  Summarizing your numbers,

       1Kb 39.25%
       2Kb 27.27%
       4Kb 17.06%
       8Kb 11.21%
      16Kb 7.00%
      32Kb 4.81%
      64Kb 3.31%
     128Kb 2.29%
     256Kb 3.51%
     512Kb 2.92%
    1024Kb 1.14%

32*1024 sounds like a better cut-off to me.  After that, doubling the size
does not get comparable gain, and numbers get unstable (notice the glitch
around 256kB).
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]