Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-4450

Windows checkouts much slower than Unix



    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • all
    • ---
    • libsvn_wc
    • None
    • Windows 7


      'svn checkout' more then 10x slower under Windows than under Unix.
      The root cause (see below) seems to be that we copy and rename
      files even during an initial checkout.  Those operations are much
      more expensive than simply creating a file.
      Future SVN releases should directly write to the final file location
      and use the wc.db to mark those files as "not final, yet" to ensure
      interruptibility etc.  Larger SQL operation granularity (e.g. batch
      inserts) should also help to reduce the problem.
      Here's how to reproduce:
        1. download the benchmark-binaries.zip file from
      https://ctf.open.collab.net/sf/go/rel2819 .
        2. create a repo and load it via the .dump file in the .zip file.
        3. check out the repo.
        Checkout with 1.8.3 using svn:// over 1GbE takes ~3:20 on Win7
        vs. ~0:13 on Linux.  Most time on Windows is spent in "System",
        under Linux 1/3 is sys time.
      Initial analysis:
        (a) Disabling Virus Scanner brought it down to 2:40.
            Disabling TSvnCache and Windows Search had
            almost no effect (~5s).
        (b) Profiling shows that we run a gazillion INSERT
            transactions in the wc.db. Running with
            --config-option config:working-copy:exclusive-locking-clients=svn
            brought times down to 1:20 and 0:10 respectively.
        (c) On Windows, those 80s are dominated by
            37% apr_file_rename / MoveFileExW
            12% apr_file_open / CreateFileW
            7% apr_file_close / CloseHandle
            SqLite is ~15% (svn_sqlite__step).
            Those apr_file_* functions are called approx. once
            (rename) or twice (open/close) per item in the working
            copy which is the lower limit.




            Unassigned Unassigned
            stefan2 Stefan Fuhrmann
            2 Vote for this issue
            2 Start watching this issue