[perforce] replication - read only installs to fully filtered forwarding

29
1 Replication; read only installs to fully filtered forwarding Timothy O’Mahony Technical Support

Upload: perforce

Post on 05-Dec-2014

481 views

Category:

Technology


0 download

DESCRIPTION

Using replication, you can offload services like build farms to a local build replica server and reduce the load on the master server. In this video, see how to use read-only, forwarding, and filtered Perforce replicas to improve the Perforce user experience in remote locations.

TRANSCRIPT

Page 1: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

1  

Replication; read only installs to fully filtered forwarding

Timothy O’Mahony Technical Support

Page 2: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

2  

Agenda

§  Replication, what do we mean? §  A brief history of Replication §  What’s New in 2013.1 §  What does this mean?

Page 3: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

3  

Replication, what do we mean? Some generalities on Replication

Page 4: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

4  

Replication, what do we mean?

replication rep·li·ca·tion (rěp'lĭ-kā'shəәn) n. §  The act or process of duplicating or reproducing

something §  sharing information so as to ensure consistency

between redundant resources, such as software or hardware to improve reliability, fault-tolerance, or accessibility.

Page 5: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

5  

Replication, what do we mean?

§  Versioning Service §  Proxy Service §  Replication Service §  Distributed Global Reach

Page 6: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

6  

A Brief History of Replication Long ago in a Versioning Service far far away…

Page 7: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

7  

A Brief History of Replication

§  Proxy Service §  Low Overhead §  Shared Service Load §  Really just a caching

Service §  No Metadata, just archives

Page 8: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

8  

A Brief History of Replication

§  p4 export and p4 replicate §  2010.1 §  Read-only purposes §  Reduce load and downtime on the primary server §  Provide warm standby servers §  No archive files.

Page 9: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

9  

A Brief History of Replication

§  p4 pull §  2010.2 §  Incorporated into the communication protocol §  “p4 configure” §  Both Meta-data and Archive files!

Page 10: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

10  

A Brief History of Replication

§  2012.1 Features §  Build Farm Service

§  Local Workspaces §  Separate load from the Master

§  Forwarding Replica Service §  Process commands locally §  Metadata and Archive files

Page 11: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

11  

What’s New in 2013.1 “Where Are We Now?”

Page 12: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

12  

What’s New in 2013.1

§  Replica Chaining §  On-Demand Replication §  Replication Filtering §  Proxy Process Monitoring §  p4 pull extensions

Page 13: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

13  

Replica Chaining

§  Master – Replica – Replica1 … ReplicaN §  Same Setup, just change P4TARGET §  Limitations

§  Read-Only from anything §  Forwarding only to Forwarding §  Build Farm from only Read-Only or Forwarding

§  Why?

Page 14: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

14  

Replica Chaining

Build farm Replicas

R/O Replicas

Build farm Replicas

R/O Replicas

Build farm Replicas

R/O Replicas

Main Perforce Service

Forwarding Replica

Forwarding Replica

Page 15: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

15  

On-Demand Replication

§  Metadata pulled as all other replicas §  Archive file behavior like a Proxy

§  lbr.replication=ondemand §  Otherwise the same setup §  Limitations

§  p4 verify -t and p4 pull -u not supported

§  Why?

Page 16: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

16  

Replication Filtering

§  Subset of the Target §  p4 pull, p4d -jd and p4 export supported

§  p4 server spec changes §  ClientDataFilter: §  RevisionDataFilter:

Page 17: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

17  

Replication Filtering continued…

ClientDataFilter: §  Optional field §  Includes have lists, working records and pending

resolves. §  Advantages with standard naming convention §  Pattern in client syntax with optional wildcards

§  //client-pattern/... -- client data to include §  -//client-pattern/... -- client data to exclude

Page 18: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

18  

Replication Filtering continued…

RevisionDataFilter: §  Optional field §  Includes revision records, integration records, label

contents and files in submitted changelists. §  Pattern in depot syntax with optional wildcards

§  //depot/pattern/... -- depot data to include §  -//depot/pattern/... -- depot data to exclude

Page 19: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

19  

Replication Filtering continued…

ServerID: Replica1 Type: server Name: Replica1 Services: replica Description:

Example use of ClientDataFilter and RevisionDataFilter ClientDataFilter:

-//... //sydney-australia-client/...

RevisionDataFilter: -//depot/Offices/...

//depot/Offices/Australia/Sydney/Protected/...

Page 20: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

20  

Replication Filtering continued…

§  Performance Considerations §  Requires master to interpret journal columns §  -T options just works on unparsed data §  Master will be doing more processing

§  Complexity of mappings will matter – monitor CPU

Page 21: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

21  

Proxy Process Monitoring

§  Proxy monitor table, pdb.monitor §  proxy.monitor.level

§  Set the proxy monitoring level, 0 - 3 §  proxy.monitor.interval

§  Monitoring interval in seconds

§  View with “-m N” switch §  $ p4p -r $P4PCACHE –m 1

Page 22: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

22  

Proxy Process Monitoring continued…

$ p4p -r $P4PCACHE -m1 pid/thd start_tm func

3153 16:03:12 sync

$ p4p –r $P4PCACHE -m2

pid/thd client_addr start_tm func snd2clnt rcvfrmc snd2svr rcvfrms

3153 10.103.0.180 16:03:12 sync 18 4 912 5

Page 23: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

23  

p4 pull extensions

§  p4 pull -d §  Remove file from transfer list

p4 pull -d -f file -r revision

The -d flag specifies that the pending file content transfer should be cancelled. You must also specify the filename and revision using the -f and -r flags. The filename and revision information can be viewed using 'pull -l'. The

'pull -d' command can be useful when a file transfer is

failing due to unrecoverable errors on the master.

Page 24: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

24  

What does this mean? Examples of Replication and Fully Distributed setup

Page 25: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

25  

What does this mean?

§  Replicas setup for network utilization §  Selective content transfer §  Load distribution §  Local Meta-Data speeds for remote users

Page 26: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

26  

Selective Content Transfer

Contractor Perforce Service

Main Perforce Service

RevisionDataFilter

Filtered Replica Full Perforce Service

RevisionDataFilter: -//... //3rdParty/ProjectX/...

Page 27: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

27  

Network Utilization Layout Example

Page 28: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

28  

Load distribution Example

§  Sydney Perforce Forwarding Replica Example §  Small support office §  Replica handling commands locally rather than Master

§  200K commands offloaded to replica so far this year §  Since October 2011, 22.5 Million commands offloaded in total

§  P4Web, Commons and Chained Replica connected

Page 29: [Perforce] Replication - Read Only Installs to Fully Filtered Forwarding

29  

P4IdeaX   Forums  

Questions? See us in the Demo Lounge Try Commons Today Commons 13.2 Available For Download Timothy O’Mahony: [email protected]