RE: Performance Decrease After Moving Working Copy to Another Machine
From: Brandon Eusebio <beusebio_at_ghs.com>
Date: Fri, 17 Jun 2016 01:08:52 +0000
Hello Johan,
Thank you so much for your response! It was incredibly helpful and clear.
You were correct in the fact that my "tar" command was not preserving the correct modified timestamps. It turns out that the default tar format is GNU, which only supports timestamp up to a granularity of seconds (https://bugs.launchpad.net/duplicity/+bug/696614). I added a flag "--format=posix" to get the necessary nanosecond timestamp needed for Subversion.
If it is helpful for your future reference, the linux command to get precise access + modify + change timestamps is the "stat" command.
You have been an awesome help. Thanks again!
All the best,
-----Original Message-----
On Wed, Jun 15, 2016 at 11:36 PM, Brandon Eusebio <beusebio_at_ghs.com> wrote:
Yes, for the working copy to work optimally, the mtimes (last modification time) of the files need to correspond exactly to the corresponding values in the svn metadata (stored in .svn/wc.db, an sqlite database). Running 'svn cleanup' will fix this, because it corrects the metadata in wc.db to note the correct mtimes.
I'm not sure if your tar commands precisely preserve the mtimes of the files (googling around for tar and mtime brings up several discussions where "it should, but sometimes it doesn't"). And with precisely, I mean "up to the nanosecond, exactly the same timestamp as on the original file". Also: what sometimes happens is that there is a difference in filesystems between source and target of the copy, so they might have different timestamp granularity on the filesystem level, leading to slightly different timestamps.
I would suggest you try to verify the timestamps for some files in the source and target working copies, and their corresponding values in
1) Run "ls" with some option to display precise timestamps (on Solaris you get "full-iso" time-style by running "ls -E", don't know the exact equivalent for linux). Check this on source and target. If they are different then there is your problem.
2) To double check, you can also see what the value in wc.db is, by running a query with sqlite3 like this:
sqlite3 -header -column wc.db "select local_relpath, last_mod_time from nodes where local_relpath='path/to/file'"
You'll probably have to convert the value you get there (it will be in milliseconds or microseconds "since epoch"), for instance use this:
HTH,
-- JohanReceived on 2016-06-17 03:09:11 CEST |
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.