File cache and soscmd.exe

If you are having a problem using SourceOffSite, post a message here.

Moderator: SourceGear

Post Reply
Vladimir
Posts: 3
Joined: Sun Mar 02, 2008 10:38 pm

File cache and soscmd.exe

Post by Vladimir » Sun Mar 02, 2008 11:13 pm

I'm using "SOURCEOFFSITE COMMAND LINE CLIENT 3.5" to retrieve latest version of a project. The command line looks like this:

soscmd.exe -command GetProject -server sos.companyname.com:8890 -name xxx -password yyy -database \\server\vss\folder\srcsafe.ini -project $/ProjectName -soshome "C:\Program Files\SourceOffsite" -recursive -verbose

No SOSHOME environment variable is set.

I'd expect the tool to use the file cache located in "C:\Program Files\SourceOffsite\servers\sos" and get a speed-up in the downloading process. But this is not what I observe: I see that every file in the project is touched even though last version already exists on the client. Retrieving of one file this way takes cca 1 second.
On the contrary, if I use the -nocache parameter, every file is still touched, but I retrieve cca 10 files per second.

Is there something I'm missing regarding the cache setting that can explain such behaviour?

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Mon Mar 03, 2008 10:56 am

The -soshome switch doesn't function well in SOS 3.5.x. There's a note on that in the SOS command line client documentation.
- IMPORTANT NOTE ON USING THE SOURCEOFFISTE HOME DIRECTORY -

In order for the –soshome parameter to function properly, version 4.0 or
later of the SourceOffSite GUI Client must be installed. Also, since both
the GUI Client and the Command Line Client will be writing to the
same SourceOffSite home directory, both Clients should not be run
simultaneously.
I would expect it to work best if you have that set in the GUI client and not use that switch in the command line.

Vladimir
Posts: 3
Joined: Sun Mar 02, 2008 10:38 pm

Post by Vladimir » Wed Mar 05, 2008 2:02 am

Thank you for pointing out the -soshome switch problem, Beth. I started to use the environment variable instead and I'm quite sure I use the cache now:

When I download file for the first time, I get a message like this:

> Got file: w:\folder\ANIVISI.C

If the file has not been changed and I try to download it next time, I get a message like this:

> File already up to date: w:\folder\ANIVISI.C

However, the main problem is still present: If I force the command to not to use cache (-nocache parameter), the retrieving of latest version files is approximately ten times faster than in case I use the cache.

Perhaps I don't understand the purpose of the cache well? In our situation we've got big number of small files - downloading of one file is cheap relatively to time spend in communication with the server. Maybe the cache serves well when downloading small number of big files?

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Thu Mar 06, 2008 5:46 pm

I'm going to need to dig into this a bit further. I'm not sure if that was something fixed in a later version or not, or if your machine configuration has something to do with it, or if it's a missed bug.

Vladimir
Posts: 3
Joined: Sun Mar 02, 2008 10:38 pm

Post by Vladimir » Sun Mar 09, 2008 4:15 pm

Thank you, Beth. Please, note our case may be not typical: The SOS server is quite far away (the ping takes around 700ms). Still, I believe there is not a reason the cache version to be slower than the not-cached version.

I'll be glad to provide further informations upon your request, as this issue is significantly slowing down our automated building process.

Post Reply