[p4] p4 sync
Marc Lewert
marc at tivo.com
Thu Jan 4 08:32:09 PST 2007
The time required for a sync using a proxy is made up of two parts (well
three if the data needs to be fetched from the server).
1. The time to send the command to the main server and get the
response. The proxy server does not help here.
2. The time for the synced data to be moved from the main server to
the proxy server. This is only done when the version you need
is not stored on the proxy. Since this is on a WAN it can take
a while if you have a long distance and/or a lowbandwidth link
(as compared to a LAN able to handle 10 Mbs or 100 Mbs or
faster)
3. The time to sync from the proxy to the computer. Hopefully this
is on a LAN which has good bandwidth.
The only time you can really improve is #2. But then that is the goal
of a proxy server.
The only way to get data to the proxy is to have a client use the proxy
for a p4 sync (yes, I know this is probably obvious, but I also write
things for our junior CMs here, and they may not know it, so...)
The trick we use is to have a job (in our case using cron) with a client
which does a regular sync from the proxy of data needed by users of the
proxy. This job keeps the proxy relatively up to date and thus syncs
fast for the site using the proxy.
When the site starts using a new branch, they just add it to the synced
client. When they no longer need a branch they remove it from the client.
As for the original question on time (not an exact flow). The timing
consists of:
- Time to send the command via the proxy to the main perforce server
- Time for the main server to process the command
- Time for the synced data to be transferred from the main server to
the proxy. Note: If the proxy already has the data, this time
almost disappears)
- Time for the proxy to send the data to the client.
We did some in-house testing when we set up our first proxy.
- Direct sync from the server was = N minutes
- With no data on the proxy, sync time was 2*N minutes.
- With the proxy already holding the data, sync time was ~N/2
This was with a very loaded server. So I would not depend on the last
number, and the second value is highly dependent on the bandwidth and
latency of the network between the main perforce server and the proxy
server.
I hope that helps.
marc
Jamison, Shawn wrote:
> For my part I know why my proxy syncs take a long time. My proxies are
> literally half way around the world from where my Perforce servers are
> located.
>
> I wish the Perforce Proxies were a little more autonomous and faster
> when handling long distance and high latency network relationships...I
> mean syncs.
>
> -Shawn J>
> Perforce Admin
> Ciena Corp.
>
> -----Original Message-----
> From: perforce-user-bounces at perforce.com
> [mailto:perforce-user-bounces at perforce.com] On Behalf Of Subramanian
> Olagappan
> Sent: Thursday, January 04, 2007 5:54 AM
> To: perforce-user at perforce.com
> Subject: [p4] p4 sync
>
> Hi,
>
> Greetings.
>
> I am intrested to know why my "p4 sync" command takes long time using a
> proxy. I am using label to sync the files.
>
> I am looking for some tools or steps to find where the bottleneck is.
> - network
> - proxy load
> - tcp/ip settings in proxy server [ win 2k3 ]
>
> If anyone has done this exercise , can you share with me.
>
> Thanks,
> Subbu.
>
More information about the perforce-user
mailing list