SlideShare uma empresa Scribd logo
1 de 7
Baixar para ler offline
 
MERGE 2013 THE PERFORCE CONFERENCE SAN FRANCISCO • APRIL 24−26
Perforce Merge Conference, April 2013
To facilitate transporting large amounts of data
between global sites, a Perforce proxy with an alternate
transport can be used to work around latency or
bandwidth limitations inherent with TCP/IP networks.
Using a Perforce Proxy with
Alternate Transports
Overcoming High-Latency or Low-Bandwidth Networks
Matthew Janulewicz, Lucasfilm Ltd.
2 Using a Perforce Proxy with Alternate Transports
This is text for annotations in footer. Similar to footnotes treatment.
What is a Perforce Proxy?
A Perforce proxy is a server that collects and maintains a copy of archive files to be used by
remote teams that are geographically separated from the Perforce server. The purpose of a
Perforce proxy is to “cache” frequently used data on a server local to the remote users to
prevent repeated transfer of commonly used data over long distances.
A Perforce proxy is stateless in that it does not track the state or presence of archive files
through a database. Sync requests are passed through a proxy to the associated Perforce
server. Once the server calculates the file revisions required for the sync request, they are
delivered from the Perforce proxy if they are available. If they are not available, files are
delivered from the Perforce server and a copy is deposited on the Perforce proxy to be used in
subsequent requests for that file revision. A Perforce proxy starts empty and the file revisions
available from it are built over time based on sync requests.
When new file revisions are submitted through a Perforce proxy, a copy is deposited in the
proxy and does not have to be resynced to the proxy.
Some sites use an automated, scheduled “pre-cache” script to sync updated files to the
Perforce proxy at set intervals. This way they can update the proxy with new revisions before
local users need them. Using ‘p4 –Zproxyload’ will load files into the Perforce proxy without
having to physically sync them to a workspace.
Older file revisions in the Perforce proxy can be removed without penalty because the proxy
merely checks for the presence of the file when it is requested. If someone specifically
requests a removed file, the proxy will simply download it from the Perforce server again. The
archive file layout on the Perforce proxy mirrors the layout on the Perforce server.
Why Not Use a Replica?
Perforce replicas do have some advantages over proxies. In the case of a forwarding replica,
the replica holds a copy of the database so certain queries (sync calculations, fstat calls, etc.)
return results faster because the request does not have to go all the way to the originating
server. The burden on the master server is greatly reduced by using a forwarding replica
instead of a Perforce proxy.
The drawback to any replica is that it replicates an entire server, including all archive file
revisions (up to p4d 2012.2). In Lucasfilm’s case, the server we wanted to share data from has
more than 6 TB of archive data in it (and is growing). The files we need to collaborate on in
remote offices take up about 1.5 TB of that. The cost of building out a system to handle that
much storage, storage that will mostly not be used, was not something we were willing to
commit to.
A replica basically serves the same purpose of an “actual” server, in that it has to handle all the
same requests to the database that a regular server might. You essentially have to build out a
new server with specs to match. A proxy, on the other hand, is primarily a file cache and will
use fewer resources than a full Perforce server or replica.
The size of the stored data on a Perforce proxy is also easier to manage. As mentioned earlier,
you do not manage archive storage on a replica as much as you simply provide it with an
equal amount of storage as the master server it replicates. You can, however, remove old
revisions of files from a proxy with no penalty. A basic tactic in managing the required size of
storage in a proxy might be to remove any files that have not been accessed within a certain
3 Using a Perforce Proxy with Alternate Transports
This is text for annotations in footer. Similar to footnotes treatment.
number of days. You could also be more aggressive, depending on need, by writing a short
script to find files that have more than one revision and removing any that are not the current
#head or perhaps, additionally, #head-1. Most administrators will likely want to strike a balance
between the two approaches.
Lastly, as this white paper will outline, you are not limited to a TCP/IP transport when working
with a Perforce proxy. A Perforce proxy has no knowledge about how or why an archive file is
present; it only checks that it is there.
The Enemy: Network Latency
Communication between Perforce clients and servers is handled through TCP/IP. TCP/IP is a
fine protocol but it is “chatty” and is adversely affected by high-latency networks. Our ping
latency between California and the Pacific Rim is typically 200-300 ms. Ping results from
Perforce itself (p4 ping) were even slower (see Figure 1).
Figure 1: Response time from ‘p4 ping’: local average = 0.000s, remote average = 1.953s
Although we have high bandwidth (1 GB), the high latency can wreak havoc on large data
transfers over the Pacific Ocean. More latency means slower response times and more delays
for each packet going through. For short bursts it is unnoticeable, but with file transfers of even
a few GB, you can see a significant drop in expected transfer speeds, especially during times
4 Using a Perforce Proxy with Alternate Transports
This is text for annotations in footer. Similar to footnotes treatment.
of high network usage. On our network there was a practical cap of well under .5 MB/s when
transporting large datasets between remote offices. Our initial test and production servers ran
on CentOS with a Linux 2.6.24 kernel (see Figure 2).
Figure 2: Initial transfer throughput (in MB/s) for Centos 5.4 and default TCP/IP settings using a P4 proxy
Significant improvements in throughput where achieved by upgrading the OS (CentOS) and
tweaking the TCP/IP stack on the server and associated Perforce proxy. These results are
from CentOS 5.5 with a Linux 2.6.32 kernel (see Figure 3). Additional TCP/IP tweaks were
applied as outlined in the Appendix.
5 Using a Perforce Proxy with Alternate Transports
This is text for annotations in footer. Similar to footnotes treatment.
Figure 3: Initial transfer throughput (in MB/s) for Centos 5.5 and optimized TCP/IP settings using a P4
proxy
This improvement was still not enough. Considering the size of datasets we might need to
share during game development, especially in the time leading up to a milestone, we were
seeing too much delay prior to all our data arriving in the remote office. The end of our day,
when most work is submitted, coincided with the beginning of their day. It would not be
unusual for the remote office to have to wait until the middle of their day, or even the next day,
to begin work on the items we had updated the day before.
As an example, sending a 1 GB file with our default OS and settings could take an entire day
or more to transfer. With the updated OS/kernel and optimized TCP/IP settings, this transfer
was cut to 4 hours. This was a great improvement but still nowhere near approaching real
time. For collaboration on large datasets, we needed to improve transfer times even more.
Solution: Dispense with TCP/IP
As mentioned earlier in this paper, the layout of the archive files in a Perforce proxy mirrors
that of the associated Perforce server. Because the proxy is not “smart” (stateless) and does
not know what files it houses at any given time, it also has no knowledge of how files were
delivered to it in the first place. It checks for the presence of files during each request. A
common way to seed a large Perforce proxy is to make a backup (tar, CD, tape) of significant
files from the server and restore it to the associated proxy server.
You can take advantage of this statelessness by using a different transport protocol, in our
case User Datagram Protocol (UDP). UDP is a lightweight transfer protocol that when
6 Using a Perforce Proxy with Alternate Transports
This is text for annotations in footer. Similar to footnotes treatment.
compared to TCP/IP has less (no) error checking, no concept of retransmitting dropped
packets, no ordering of packets, and no congestion control.
Open source and commercial UDP applications have added support for error checking,
security, and bandwidth control. Lucasfilm already had experience with the fasp technology
from Asperasoft and decided to use it to help overcome the increasing transfer speed
limitations we encountered over time while our Perforce proxy grew.
We already owned licenses for its point-to-point server product, which essentially provides scp-
like UDP transfers for single files at a time. We have been using this for several internal tools
for some years. However, the nature of those tools is that the files/packages being transferred
are known. We were not doing any type of “mirroring” of file systems but were simply
transferring files on a per-user basis.
To effectively mirror a file system, or parts thereof, we used Asperasoft’s Aspera Sync (async)
product, which provides a drop-in replacement for rsync. We were then able to set up a simple
one-way mirroring of relevant file paths between our Perforce server and associated proxy.
Because async allows you to throttle the utilized throughput, we could realize just about any
jump in throughput we chose. We found that between 20-25 MB/s was ideal because it gave
us a significant enough improvement without affecting the other transfers that might be
happening at any given time.
At these rates, the time to send a 1 GB file improved from 4 hours to a few minutes. When
needed, we can coordinate with other UDP users to utilize more bandwidth to send content to
remote offices even faster.
Conclusion
Under certain circumstances a Perforce proxy is preferable to a Perforce replica. The inherent
statelessness of a proxy lends itself to clever solutions for overcoming suboptimal bandwidth
or latency in your global network. You can effectively take TCP/IP out of the equation to realize
orders of magnitude improvements in transfer rates for Perforce proxy assets.
Appendix
The following settings were tweaked to realize modest improvements in TCP/IP transfer rates.
In CentOS 5, the settings are in /etc/sysctl.conf
### New 2.6.x TCP tuning:
net.ipv4.tcp_adv_win_scale=7
net.ipv4.tcp_window_scaling=1
net.ipv4.tcp_congestion_control=bic
net.ipv4.tcp_moderate_rcvbuf=1
### IPV4-TCP specific settings
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_rmem = 16777216 16777216 16777216
net.ipv4.tcp_wmem = 16777216 16777216 16777216
7 Using a Perforce Proxy with Alternate Transports
This is text for annotations in footer. Similar to footnotes treatment.
net.ipv4.tcp_mem = 16777216 16777216 16777216
net.ipv4.ipfrag_high_thresh = 83886080
net.ipv4.ipfrag_low_thresh = 41943040
net.ipv4.ipfrag_time = 10
net.ipv4.tcp_low_latency = 0
### CORE settings (mostly for socket and UDP effect)
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.rmem_default = 16777216
net.core.wmem_default = 16777216
net.core.optmem_max = 16777216
net.core.netdev_max_backlog = 3000000
# disable swapping if at all possible:
vm.swappiness = 0
# Initial 9.3 rev. Increase max shared memory segment size.
# Disable response to broadcasts.
# You don't want yourself becoming a Smurf amplifier.
net.ipv4.icmp_echo_ignore_broadcasts = 1
# enable route verification on all interfaces
net.ipv4.conf.all.rp_filter = 1
kernel.shmmax = 536870912
# modify overcommit settings to allow large zeno processes to fork.
vm.overcommit_memory = 2
vm.overcommit_ratio = 200
	
  

Mais conteúdo relacionado

Mais procurados

Alfresco scalability and performnce
Alfresco   scalability and performnceAlfresco   scalability and performnce
Alfresco scalability and performnce
Paul Hampton
 
ScalabilityAvailability
ScalabilityAvailabilityScalabilityAvailability
ScalabilityAvailability
webuploader
 
Unit VI Overlays
Unit VI OverlaysUnit VI Overlays
Unit VI Overlays
sangusajjan
 
C L113
C L113C L113
C L113
Novell
 

Mais procurados (20)

21 Www Web Services
21 Www Web Services21 Www Web Services
21 Www Web Services
 
Suggestion for an IPv6 Roll Out
Suggestion for an IPv6 Roll OutSuggestion for an IPv6 Roll Out
Suggestion for an IPv6 Roll Out
 
Session 23 - Kafka and Zookeeper
Session 23 - Kafka and ZookeeperSession 23 - Kafka and Zookeeper
Session 23 - Kafka and Zookeeper
 
06 coms 525 tcpip - dhcp and dns
06   coms 525 tcpip - dhcp and dns06   coms 525 tcpip - dhcp and dns
06 coms 525 tcpip - dhcp and dns
 
Alfresco scalability and performnce
Alfresco   scalability and performnceAlfresco   scalability and performnce
Alfresco scalability and performnce
 
Top 10 interview question and answers for mcsa
Top 10 interview question and answers for mcsaTop 10 interview question and answers for mcsa
Top 10 interview question and answers for mcsa
 
ScalabilityAvailability
ScalabilityAvailabilityScalabilityAvailability
ScalabilityAvailability
 
7 understanding DNS
7 understanding DNS7 understanding DNS
7 understanding DNS
 
Unit VI Overlays
Unit VI OverlaysUnit VI Overlays
Unit VI Overlays
 
C L113
C L113C L113
C L113
 
Apache flume - Twitter Streaming
Apache flume - Twitter Streaming Apache flume - Twitter Streaming
Apache flume - Twitter Streaming
 
Advance google file system
Advance google file systemAdvance google file system
Advance google file system
 
Thoughts about DNS for DDoS
Thoughts about DNS for DDoSThoughts about DNS for DDoS
Thoughts about DNS for DDoS
 
File Sever
File SeverFile Sever
File Sever
 
Apache Flume and its use case in Manufacturing
Apache Flume and its use case in ManufacturingApache Flume and its use case in Manufacturing
Apache Flume and its use case in Manufacturing
 
AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)
 
Configuration DHCP
Configuration DHCPConfiguration DHCP
Configuration DHCP
 
Building a Linux IPv6 DNS Server Project review PPT v3.0 First review
Building a Linux IPv6 DNS Server Project review PPT v3.0 First reviewBuilding a Linux IPv6 DNS Server Project review PPT v3.0 First review
Building a Linux IPv6 DNS Server Project review PPT v3.0 First review
 
Apache flume - an Introduction
Apache flume - an IntroductionApache flume - an Introduction
Apache flume - an Introduction
 
Texter blue - gdpr watchdog
Texter blue - gdpr watchdogTexter blue - gdpr watchdog
Texter blue - gdpr watchdog
 

Destaque

[AMD] Novel Use of Perforce for Software Auto-updates and File Transfer
[AMD] Novel Use of Perforce for Software Auto-updates and File Transfer[AMD] Novel Use of Perforce for Software Auto-updates and File Transfer
[AMD] Novel Use of Perforce for Software Auto-updates and File Transfer
Perforce
 
Infographic: Perforce vs ClearCase
Infographic: Perforce vs ClearCaseInfographic: Perforce vs ClearCase
Infographic: Perforce vs ClearCase
Perforce
 
[IC Manage] Workspace Acceleration & Network Storage Reduction
[IC Manage] Workspace Acceleration & Network Storage Reduction[IC Manage] Workspace Acceleration & Network Storage Reduction
[IC Manage] Workspace Acceleration & Network Storage Reduction
Perforce
 
[NetApp] Simplified HA:DR Using Storage Solutions
[NetApp] Simplified HA:DR Using Storage Solutions[NetApp] Simplified HA:DR Using Storage Solutions
[NetApp] Simplified HA:DR Using Storage Solutions
Perforce
 
[Nvidia] Extracting Depot Paths Into New Instances of Their Own
[Nvidia] Extracting Depot Paths Into New Instances of Their Own[Nvidia] Extracting Depot Paths Into New Instances of Their Own
[Nvidia] Extracting Depot Paths Into New Instances of Their Own
Perforce
 
Infographic: Perforce vs Subversion
Infographic: Perforce vs SubversionInfographic: Perforce vs Subversion
Infographic: Perforce vs Subversion
Perforce
 
[Citrix] Perforce Standardisation at Citrix
[Citrix] Perforce Standardisation at Citrix[Citrix] Perforce Standardisation at Citrix
[Citrix] Perforce Standardisation at Citrix
Perforce
 
[Mentor Graphics] A Perforce-based Automatic Document Generation System
[Mentor Graphics] A Perforce-based Automatic Document Generation System[Mentor Graphics] A Perforce-based Automatic Document Generation System
[Mentor Graphics] A Perforce-based Automatic Document Generation System
Perforce
 
[NetApp Managing Big Workspaces with Storage Magic
[NetApp Managing Big Workspaces with Storage Magic[NetApp Managing Big Workspaces with Storage Magic
[NetApp Managing Big Workspaces with Storage Magic
Perforce
 
[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure
Perforce
 
[SAP] Perforce Administrative Self Services at SAP
[SAP] Perforce Administrative Self Services at SAP[SAP] Perforce Administrative Self Services at SAP
[SAP] Perforce Administrative Self Services at SAP
Perforce
 
[NetherRealm Studios] Game Studio Perforce Architecture
[NetherRealm Studios] Game Studio Perforce Architecture[NetherRealm Studios] Game Studio Perforce Architecture
[NetherRealm Studios] Game Studio Perforce Architecture
Perforce
 
[Pixar] Templar Underminer
[Pixar] Templar Underminer[Pixar] Templar Underminer
[Pixar] Templar Underminer
Perforce
 

Destaque (20)

[AMD] Novel Use of Perforce for Software Auto-updates and File Transfer
[AMD] Novel Use of Perforce for Software Auto-updates and File Transfer[AMD] Novel Use of Perforce for Software Auto-updates and File Transfer
[AMD] Novel Use of Perforce for Software Auto-updates and File Transfer
 
Infographic: Perforce vs ClearCase
Infographic: Perforce vs ClearCaseInfographic: Perforce vs ClearCase
Infographic: Perforce vs ClearCase
 
[IC Manage] Workspace Acceleration & Network Storage Reduction
[IC Manage] Workspace Acceleration & Network Storage Reduction[IC Manage] Workspace Acceleration & Network Storage Reduction
[IC Manage] Workspace Acceleration & Network Storage Reduction
 
[NetApp] Simplified HA:DR Using Storage Solutions
[NetApp] Simplified HA:DR Using Storage Solutions[NetApp] Simplified HA:DR Using Storage Solutions
[NetApp] Simplified HA:DR Using Storage Solutions
 
[Nvidia] Extracting Depot Paths Into New Instances of Their Own
[Nvidia] Extracting Depot Paths Into New Instances of Their Own[Nvidia] Extracting Depot Paths Into New Instances of Their Own
[Nvidia] Extracting Depot Paths Into New Instances of Their Own
 
Continuous Validation
Continuous ValidationContinuous Validation
Continuous Validation
 
Infographic: Perforce vs Subversion
Infographic: Perforce vs SubversionInfographic: Perforce vs Subversion
Infographic: Perforce vs Subversion
 
Managing Microservices at Scale
Managing Microservices at ScaleManaging Microservices at Scale
Managing Microservices at Scale
 
[Citrix] Perforce Standardisation at Citrix
[Citrix] Perforce Standardisation at Citrix[Citrix] Perforce Standardisation at Citrix
[Citrix] Perforce Standardisation at Citrix
 
From ClearCase to Perforce Helix: Breakthroughs in Scalability at Intel
From ClearCase to Perforce Helix: Breakthroughs in Scalability at IntelFrom ClearCase to Perforce Helix: Breakthroughs in Scalability at Intel
From ClearCase to Perforce Helix: Breakthroughs in Scalability at Intel
 
[Mentor Graphics] A Perforce-based Automatic Document Generation System
[Mentor Graphics] A Perforce-based Automatic Document Generation System[Mentor Graphics] A Perforce-based Automatic Document Generation System
[Mentor Graphics] A Perforce-based Automatic Document Generation System
 
[NetApp Managing Big Workspaces with Storage Magic
[NetApp Managing Big Workspaces with Storage Magic[NetApp Managing Big Workspaces with Storage Magic
[NetApp Managing Big Workspaces with Storage Magic
 
[Webinar] The Changing Role of Release Engineering in a DevOps World with J. ...
[Webinar] The Changing Role of Release Engineering in a DevOps World with J. ...[Webinar] The Changing Role of Release Engineering in a DevOps World with J. ...
[Webinar] The Changing Role of Release Engineering in a DevOps World with J. ...
 
[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure
 
[SAP] Perforce Administrative Self Services at SAP
[SAP] Perforce Administrative Self Services at SAP[SAP] Perforce Administrative Self Services at SAP
[SAP] Perforce Administrative Self Services at SAP
 
Cheat Sheet
Cheat SheetCheat Sheet
Cheat Sheet
 
Granular Protections Management with Triggers
Granular Protections Management with TriggersGranular Protections Management with Triggers
Granular Protections Management with Triggers
 
How Continuous Delivery Helped McKesson Create Award Winning Applications
How Continuous Delivery Helped McKesson Create Award Winning ApplicationsHow Continuous Delivery Helped McKesson Create Award Winning Applications
How Continuous Delivery Helped McKesson Create Award Winning Applications
 
[NetherRealm Studios] Game Studio Perforce Architecture
[NetherRealm Studios] Game Studio Perforce Architecture[NetherRealm Studios] Game Studio Perforce Architecture
[NetherRealm Studios] Game Studio Perforce Architecture
 
[Pixar] Templar Underminer
[Pixar] Templar Underminer[Pixar] Templar Underminer
[Pixar] Templar Underminer
 

Semelhante a [Lucas Films] Using a Perforce Proxy with Alternate Transports

Dfs (Distributed computing)
Dfs (Distributed computing)Dfs (Distributed computing)
Dfs (Distributed computing)
Sri Prasanna
 
Datastage parallell jobs vs datastage server jobs
Datastage parallell jobs vs datastage server jobsDatastage parallell jobs vs datastage server jobs
Datastage parallell jobs vs datastage server jobs
shanker_uma
 
NETWORK FILE SYSTEM
NETWORK FILE SYSTEMNETWORK FILE SYSTEM
NETWORK FILE SYSTEM
Roshan Kumar
 
Implementing Advanced Caching and Replication Techniques in ...
Implementing Advanced Caching and Replication Techniques in ...Implementing Advanced Caching and Replication Techniques in ...
Implementing Advanced Caching and Replication Techniques in ...
webhostingguy
 
Ch16 OS
Ch16 OSCh16 OS
Ch16 OS
C.U
 
Fast and secure protocol (fasp)
Fast and secure protocol (fasp)Fast and secure protocol (fasp)
Fast and secure protocol (fasp)
Vikrant Arya
 

Semelhante a [Lucas Films] Using a Perforce Proxy with Alternate Transports (20)

White Paper: Still All on One Server: Perforce at Scale
White Paper: Still All on One Server: Perforce at ScaleWhite Paper: Still All on One Server: Perforce at Scale
White Paper: Still All on One Server: Perforce at Scale
 
Class.aspera.chapter.1.intro
Class.aspera.chapter.1.introClass.aspera.chapter.1.intro
Class.aspera.chapter.1.intro
 
Dfs (Distributed computing)
Dfs (Distributed computing)Dfs (Distributed computing)
Dfs (Distributed computing)
 
A lightweight and cooperative multi factor considered file
A lightweight and cooperative multi factor considered fileA lightweight and cooperative multi factor considered file
A lightweight and cooperative multi factor considered file
 
An Efficient approach of Integrated file Replication and Consistency Maintena...
An Efficient approach of Integrated file Replication and Consistency Maintena...An Efficient approach of Integrated file Replication and Consistency Maintena...
An Efficient approach of Integrated file Replication and Consistency Maintena...
 
An Efficient approach of Integrated file Replication and Consistency Maintena...
An Efficient approach of Integrated file Replication and Consistency Maintena...An Efficient approach of Integrated file Replication and Consistency Maintena...
An Efficient approach of Integrated file Replication and Consistency Maintena...
 
pNFS Introduction
pNFS IntroductionpNFS Introduction
pNFS Introduction
 
Datastage parallell jobs vs datastage server jobs
Datastage parallell jobs vs datastage server jobsDatastage parallell jobs vs datastage server jobs
Datastage parallell jobs vs datastage server jobs
 
NETWORK FILE SYSTEM
NETWORK FILE SYSTEMNETWORK FILE SYSTEM
NETWORK FILE SYSTEM
 
Implementing Advanced Caching and Replication Techniques in ...
Implementing Advanced Caching and Replication Techniques in ...Implementing Advanced Caching and Replication Techniques in ...
Implementing Advanced Caching and Replication Techniques in ...
 
OSCh16
OSCh16OSCh16
OSCh16
 
Ch16 OS
Ch16 OSCh16 OS
Ch16 OS
 
OS_Ch16
OS_Ch16OS_Ch16
OS_Ch16
 
Understanding Apache Kafka P99 Latency at Scale
Understanding Apache Kafka P99 Latency at ScaleUnderstanding Apache Kafka P99 Latency at Scale
Understanding Apache Kafka P99 Latency at Scale
 
Chapter 17 - Distributed File Systems
Chapter 17 - Distributed File SystemsChapter 17 - Distributed File Systems
Chapter 17 - Distributed File Systems
 
File Transfer Protocol (FTP)
File Transfer Protocol (FTP)File Transfer Protocol (FTP)
File Transfer Protocol (FTP)
 
Lamp Stack Optimization
Lamp Stack OptimizationLamp Stack Optimization
Lamp Stack Optimization
 
Lesson 2
Lesson 2Lesson 2
Lesson 2
 
Fast and secure protocol (fasp)
Fast and secure protocol (fasp)Fast and secure protocol (fasp)
Fast and secure protocol (fasp)
 
Nf Sp4
Nf Sp4Nf Sp4
Nf Sp4
 

Mais de Perforce

Mais de Perforce (20)

How to Organize Game Developers With Different Planning Needs
How to Organize Game Developers With Different Planning NeedsHow to Organize Game Developers With Different Planning Needs
How to Organize Game Developers With Different Planning Needs
 
Regulatory Traceability: How to Maintain Compliance, Quality, and Cost Effic...
Regulatory Traceability:  How to Maintain Compliance, Quality, and Cost Effic...Regulatory Traceability:  How to Maintain Compliance, Quality, and Cost Effic...
Regulatory Traceability: How to Maintain Compliance, Quality, and Cost Effic...
 
Efficient Security Development and Testing Using Dynamic and Static Code Anal...
Efficient Security Development and Testing Using Dynamic and Static Code Anal...Efficient Security Development and Testing Using Dynamic and Static Code Anal...
Efficient Security Development and Testing Using Dynamic and Static Code Anal...
 
Understanding Compliant Workflow Enforcement SOPs
Understanding Compliant Workflow Enforcement SOPsUnderstanding Compliant Workflow Enforcement SOPs
Understanding Compliant Workflow Enforcement SOPs
 
Branching Out: How To Automate Your Development Process
Branching Out: How To Automate Your Development ProcessBranching Out: How To Automate Your Development Process
Branching Out: How To Automate Your Development Process
 
How to Do Code Reviews at Massive Scale For DevOps
How to Do Code Reviews at Massive Scale For DevOpsHow to Do Code Reviews at Massive Scale For DevOps
How to Do Code Reviews at Massive Scale For DevOps
 
How to Spark Joy In Your Product Backlog
How to Spark Joy In Your Product Backlog How to Spark Joy In Your Product Backlog
How to Spark Joy In Your Product Backlog
 
Going Remote: Build Up Your Game Dev Team
Going Remote: Build Up Your Game Dev Team Going Remote: Build Up Your Game Dev Team
Going Remote: Build Up Your Game Dev Team
 
Shift to Remote: How to Manage Your New Workflow
Shift to Remote: How to Manage Your New WorkflowShift to Remote: How to Manage Your New Workflow
Shift to Remote: How to Manage Your New Workflow
 
Hybrid Development Methodology in a Regulated World
Hybrid Development Methodology in a Regulated WorldHybrid Development Methodology in a Regulated World
Hybrid Development Methodology in a Regulated World
 
Better, Faster, Easier: How to Make Git Really Work in the Enterprise
Better, Faster, Easier: How to Make Git Really Work in the EnterpriseBetter, Faster, Easier: How to Make Git Really Work in the Enterprise
Better, Faster, Easier: How to Make Git Really Work in the Enterprise
 
Easier Requirements Management Using Diagrams In Helix ALM
Easier Requirements Management Using Diagrams In Helix ALMEasier Requirements Management Using Diagrams In Helix ALM
Easier Requirements Management Using Diagrams In Helix ALM
 
How To Master Your Mega Backlog
How To Master Your Mega Backlog How To Master Your Mega Backlog
How To Master Your Mega Backlog
 
Achieving Software Safety, Security, and Reliability Part 3: What Does the Fu...
Achieving Software Safety, Security, and Reliability Part 3: What Does the Fu...Achieving Software Safety, Security, and Reliability Part 3: What Does the Fu...
Achieving Software Safety, Security, and Reliability Part 3: What Does the Fu...
 
How to Scale With Helix Core and Microsoft Azure
How to Scale With Helix Core and Microsoft Azure How to Scale With Helix Core and Microsoft Azure
How to Scale With Helix Core and Microsoft Azure
 
Achieving Software Safety, Security, and Reliability Part 2
Achieving Software Safety, Security, and Reliability Part 2Achieving Software Safety, Security, and Reliability Part 2
Achieving Software Safety, Security, and Reliability Part 2
 
Should You Break Up With Your Monolith?
Should You Break Up With Your Monolith?Should You Break Up With Your Monolith?
Should You Break Up With Your Monolith?
 
Achieving Software Safety, Security, and Reliability Part 1: Common Industry ...
Achieving Software Safety, Security, and Reliability Part 1: Common Industry ...Achieving Software Safety, Security, and Reliability Part 1: Common Industry ...
Achieving Software Safety, Security, and Reliability Part 1: Common Industry ...
 
What's New in Helix ALM 2019.4
What's New in Helix ALM 2019.4What's New in Helix ALM 2019.4
What's New in Helix ALM 2019.4
 
Free Yourself From the MS Office Prison
Free Yourself From the MS Office Prison Free Yourself From the MS Office Prison
Free Yourself From the MS Office Prison
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

[Lucas Films] Using a Perforce Proxy with Alternate Transports

  • 1.   MERGE 2013 THE PERFORCE CONFERENCE SAN FRANCISCO • APRIL 24−26 Perforce Merge Conference, April 2013 To facilitate transporting large amounts of data between global sites, a Perforce proxy with an alternate transport can be used to work around latency or bandwidth limitations inherent with TCP/IP networks. Using a Perforce Proxy with Alternate Transports Overcoming High-Latency or Low-Bandwidth Networks Matthew Janulewicz, Lucasfilm Ltd.
  • 2. 2 Using a Perforce Proxy with Alternate Transports This is text for annotations in footer. Similar to footnotes treatment. What is a Perforce Proxy? A Perforce proxy is a server that collects and maintains a copy of archive files to be used by remote teams that are geographically separated from the Perforce server. The purpose of a Perforce proxy is to “cache” frequently used data on a server local to the remote users to prevent repeated transfer of commonly used data over long distances. A Perforce proxy is stateless in that it does not track the state or presence of archive files through a database. Sync requests are passed through a proxy to the associated Perforce server. Once the server calculates the file revisions required for the sync request, they are delivered from the Perforce proxy if they are available. If they are not available, files are delivered from the Perforce server and a copy is deposited on the Perforce proxy to be used in subsequent requests for that file revision. A Perforce proxy starts empty and the file revisions available from it are built over time based on sync requests. When new file revisions are submitted through a Perforce proxy, a copy is deposited in the proxy and does not have to be resynced to the proxy. Some sites use an automated, scheduled “pre-cache” script to sync updated files to the Perforce proxy at set intervals. This way they can update the proxy with new revisions before local users need them. Using ‘p4 –Zproxyload’ will load files into the Perforce proxy without having to physically sync them to a workspace. Older file revisions in the Perforce proxy can be removed without penalty because the proxy merely checks for the presence of the file when it is requested. If someone specifically requests a removed file, the proxy will simply download it from the Perforce server again. The archive file layout on the Perforce proxy mirrors the layout on the Perforce server. Why Not Use a Replica? Perforce replicas do have some advantages over proxies. In the case of a forwarding replica, the replica holds a copy of the database so certain queries (sync calculations, fstat calls, etc.) return results faster because the request does not have to go all the way to the originating server. The burden on the master server is greatly reduced by using a forwarding replica instead of a Perforce proxy. The drawback to any replica is that it replicates an entire server, including all archive file revisions (up to p4d 2012.2). In Lucasfilm’s case, the server we wanted to share data from has more than 6 TB of archive data in it (and is growing). The files we need to collaborate on in remote offices take up about 1.5 TB of that. The cost of building out a system to handle that much storage, storage that will mostly not be used, was not something we were willing to commit to. A replica basically serves the same purpose of an “actual” server, in that it has to handle all the same requests to the database that a regular server might. You essentially have to build out a new server with specs to match. A proxy, on the other hand, is primarily a file cache and will use fewer resources than a full Perforce server or replica. The size of the stored data on a Perforce proxy is also easier to manage. As mentioned earlier, you do not manage archive storage on a replica as much as you simply provide it with an equal amount of storage as the master server it replicates. You can, however, remove old revisions of files from a proxy with no penalty. A basic tactic in managing the required size of storage in a proxy might be to remove any files that have not been accessed within a certain
  • 3. 3 Using a Perforce Proxy with Alternate Transports This is text for annotations in footer. Similar to footnotes treatment. number of days. You could also be more aggressive, depending on need, by writing a short script to find files that have more than one revision and removing any that are not the current #head or perhaps, additionally, #head-1. Most administrators will likely want to strike a balance between the two approaches. Lastly, as this white paper will outline, you are not limited to a TCP/IP transport when working with a Perforce proxy. A Perforce proxy has no knowledge about how or why an archive file is present; it only checks that it is there. The Enemy: Network Latency Communication between Perforce clients and servers is handled through TCP/IP. TCP/IP is a fine protocol but it is “chatty” and is adversely affected by high-latency networks. Our ping latency between California and the Pacific Rim is typically 200-300 ms. Ping results from Perforce itself (p4 ping) were even slower (see Figure 1). Figure 1: Response time from ‘p4 ping’: local average = 0.000s, remote average = 1.953s Although we have high bandwidth (1 GB), the high latency can wreak havoc on large data transfers over the Pacific Ocean. More latency means slower response times and more delays for each packet going through. For short bursts it is unnoticeable, but with file transfers of even a few GB, you can see a significant drop in expected transfer speeds, especially during times
  • 4. 4 Using a Perforce Proxy with Alternate Transports This is text for annotations in footer. Similar to footnotes treatment. of high network usage. On our network there was a practical cap of well under .5 MB/s when transporting large datasets between remote offices. Our initial test and production servers ran on CentOS with a Linux 2.6.24 kernel (see Figure 2). Figure 2: Initial transfer throughput (in MB/s) for Centos 5.4 and default TCP/IP settings using a P4 proxy Significant improvements in throughput where achieved by upgrading the OS (CentOS) and tweaking the TCP/IP stack on the server and associated Perforce proxy. These results are from CentOS 5.5 with a Linux 2.6.32 kernel (see Figure 3). Additional TCP/IP tweaks were applied as outlined in the Appendix.
  • 5. 5 Using a Perforce Proxy with Alternate Transports This is text for annotations in footer. Similar to footnotes treatment. Figure 3: Initial transfer throughput (in MB/s) for Centos 5.5 and optimized TCP/IP settings using a P4 proxy This improvement was still not enough. Considering the size of datasets we might need to share during game development, especially in the time leading up to a milestone, we were seeing too much delay prior to all our data arriving in the remote office. The end of our day, when most work is submitted, coincided with the beginning of their day. It would not be unusual for the remote office to have to wait until the middle of their day, or even the next day, to begin work on the items we had updated the day before. As an example, sending a 1 GB file with our default OS and settings could take an entire day or more to transfer. With the updated OS/kernel and optimized TCP/IP settings, this transfer was cut to 4 hours. This was a great improvement but still nowhere near approaching real time. For collaboration on large datasets, we needed to improve transfer times even more. Solution: Dispense with TCP/IP As mentioned earlier in this paper, the layout of the archive files in a Perforce proxy mirrors that of the associated Perforce server. Because the proxy is not “smart” (stateless) and does not know what files it houses at any given time, it also has no knowledge of how files were delivered to it in the first place. It checks for the presence of files during each request. A common way to seed a large Perforce proxy is to make a backup (tar, CD, tape) of significant files from the server and restore it to the associated proxy server. You can take advantage of this statelessness by using a different transport protocol, in our case User Datagram Protocol (UDP). UDP is a lightweight transfer protocol that when
  • 6. 6 Using a Perforce Proxy with Alternate Transports This is text for annotations in footer. Similar to footnotes treatment. compared to TCP/IP has less (no) error checking, no concept of retransmitting dropped packets, no ordering of packets, and no congestion control. Open source and commercial UDP applications have added support for error checking, security, and bandwidth control. Lucasfilm already had experience with the fasp technology from Asperasoft and decided to use it to help overcome the increasing transfer speed limitations we encountered over time while our Perforce proxy grew. We already owned licenses for its point-to-point server product, which essentially provides scp- like UDP transfers for single files at a time. We have been using this for several internal tools for some years. However, the nature of those tools is that the files/packages being transferred are known. We were not doing any type of “mirroring” of file systems but were simply transferring files on a per-user basis. To effectively mirror a file system, or parts thereof, we used Asperasoft’s Aspera Sync (async) product, which provides a drop-in replacement for rsync. We were then able to set up a simple one-way mirroring of relevant file paths between our Perforce server and associated proxy. Because async allows you to throttle the utilized throughput, we could realize just about any jump in throughput we chose. We found that between 20-25 MB/s was ideal because it gave us a significant enough improvement without affecting the other transfers that might be happening at any given time. At these rates, the time to send a 1 GB file improved from 4 hours to a few minutes. When needed, we can coordinate with other UDP users to utilize more bandwidth to send content to remote offices even faster. Conclusion Under certain circumstances a Perforce proxy is preferable to a Perforce replica. The inherent statelessness of a proxy lends itself to clever solutions for overcoming suboptimal bandwidth or latency in your global network. You can effectively take TCP/IP out of the equation to realize orders of magnitude improvements in transfer rates for Perforce proxy assets. Appendix The following settings were tweaked to realize modest improvements in TCP/IP transfer rates. In CentOS 5, the settings are in /etc/sysctl.conf ### New 2.6.x TCP tuning: net.ipv4.tcp_adv_win_scale=7 net.ipv4.tcp_window_scaling=1 net.ipv4.tcp_congestion_control=bic net.ipv4.tcp_moderate_rcvbuf=1 ### IPV4-TCP specific settings net.ipv4.tcp_timestamps = 1 net.ipv4.tcp_sack = 1 net.ipv4.tcp_rmem = 16777216 16777216 16777216 net.ipv4.tcp_wmem = 16777216 16777216 16777216
  • 7. 7 Using a Perforce Proxy with Alternate Transports This is text for annotations in footer. Similar to footnotes treatment. net.ipv4.tcp_mem = 16777216 16777216 16777216 net.ipv4.ipfrag_high_thresh = 83886080 net.ipv4.ipfrag_low_thresh = 41943040 net.ipv4.ipfrag_time = 10 net.ipv4.tcp_low_latency = 0 ### CORE settings (mostly for socket and UDP effect) net.core.rmem_max = 16777216 net.core.wmem_max = 16777216 net.core.rmem_default = 16777216 net.core.wmem_default = 16777216 net.core.optmem_max = 16777216 net.core.netdev_max_backlog = 3000000 # disable swapping if at all possible: vm.swappiness = 0 # Initial 9.3 rev. Increase max shared memory segment size. # Disable response to broadcasts. # You don't want yourself becoming a Smurf amplifier. net.ipv4.icmp_echo_ignore_broadcasts = 1 # enable route verification on all interfaces net.ipv4.conf.all.rp_filter = 1 kernel.shmmax = 536870912 # modify overcommit settings to allow large zeno processes to fork. vm.overcommit_memory = 2 vm.overcommit_ratio = 200