1	
  
Replication; read only installs
to fully filtered forwarding
Timothy O’Mahony
Technical Support
2	
  
Agenda
§  Replication, what do we mean?
§  A brief history of Replication
§  What’s New in 2013.1
§  What does this mean?
3	
  
Replication, what do we mean?
Some generalities on Replication
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.
5	
  
Replication, what do we mean?
§  Versioning Service
§  Proxy Service
§  Replication Service
§  Distributed Global Reach
6	
  
A Brief History of Replication
Long ago in a Versioning Service far far away…
7	
  
A Brief History of Replication
§  Proxy Service
§  Low Overhead
§  Shared Service Load
§  Really just a caching
Service
§  No Metadata, just archives
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.
9	
  
A Brief History of Replication
§  p4 pull
§  2010.2
§  Incorporated into the communication protocol
§  “p4 configure”
§  Both Meta-data and Archive files!
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
11	
  
What’s New in 2013.1
“Where Are We Now?”
12	
  
What’s New in 2013.1
§  Replica Chaining
§  On-Demand Replication
§  Replication Filtering
§  Proxy Process Monitoring
§  p4 pull extensions
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?
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
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?
16	
  
Replication Filtering
§  Subset of the Target
§  p4 pull, p4d -jd and p4 export supported
§  p4 server spec changes
§  ClientDataFilter:
§  RevisionDataFilter:
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
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
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/...
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
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
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
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.
24	
  
What does this mean?
Examples of Replication and Fully Distributed setup
25	
  
What does this mean?
§  Replicas setup for network utilization
§  Selective content transfer
§  Load distribution
§  Local Meta-Data speeds for remote users
26	
  
Selective Content Transfer
Contractor
Perforce
Service
Main
Perforce
Service
RevisionDataFilter
Filtered Replica Full Perforce Service
RevisionDataFilter:
-//...
//3rdParty/ProjectX/...
27	
  
Network Utilization Layout Example
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
29	
  
P4IdeaX	
   Forums	
  
Questions?
See us in the Demo Lounge
Try Commons Today
Commons 13.2 Available For Download
Timothy O’Mahony: tomahony@perforce.com

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

  • 1.
    1   Replication; readonly installs to fully filtered forwarding Timothy O’Mahony Technical Support
  • 2.
    2   Agenda §  Replication,what do we mean? §  A brief history of Replication §  What’s New in 2013.1 §  What does this mean?
  • 3.
    3   Replication, whatdo we mean? Some generalities on Replication
  • 4.
    4   Replication, whatdo 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.
  • 5.
    5   Replication, whatdo we mean? §  Versioning Service §  Proxy Service §  Replication Service §  Distributed Global Reach
  • 6.
    6   A BriefHistory of Replication Long ago in a Versioning Service far far away…
  • 7.
    7   A BriefHistory of Replication §  Proxy Service §  Low Overhead §  Shared Service Load §  Really just a caching Service §  No Metadata, just archives
  • 8.
    8   A BriefHistory 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.
  • 9.
    9   A BriefHistory of Replication §  p4 pull §  2010.2 §  Incorporated into the communication protocol §  “p4 configure” §  Both Meta-data and Archive files!
  • 10.
    10   A BriefHistory 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
  • 11.
    11   What’s Newin 2013.1 “Where Are We Now?”
  • 12.
    12   What’s Newin 2013.1 §  Replica Chaining §  On-Demand Replication §  Replication Filtering §  Proxy Process Monitoring §  p4 pull extensions
  • 13.
    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?
  • 14.
    14   Replica Chaining Buildfarm Replicas R/O Replicas Build farm Replicas R/O Replicas Build farm Replicas R/O Replicas Main Perforce Service Forwarding Replica Forwarding Replica
  • 15.
    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?
  • 16.
    16   Replication Filtering § Subset of the Target §  p4 pull, p4d -jd and p4 export supported §  p4 server spec changes §  ClientDataFilter: §  RevisionDataFilter:
  • 17.
    17   Replication Filteringcontinued… 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
  • 18.
    18   Replication Filteringcontinued… 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
  • 19.
    19   Replication Filteringcontinued… 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/...
  • 20.
    20   Replication Filteringcontinued… §  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
  • 21.
    21   Proxy ProcessMonitoring §  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
  • 22.
    22   Proxy ProcessMonitoring 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
  • 23.
    23   p4 pullextensions §  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.
  • 24.
    24   What doesthis mean? Examples of Replication and Fully Distributed setup
  • 25.
    25   What doesthis mean? §  Replicas setup for network utilization §  Selective content transfer §  Load distribution §  Local Meta-Data speeds for remote users
  • 26.
    26   Selective ContentTransfer Contractor Perforce Service Main Perforce Service RevisionDataFilter Filtered Replica Full Perforce Service RevisionDataFilter: -//... //3rdParty/ProjectX/...
  • 27.
  • 28.
    28   Load distributionExample §  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
  • 29.
    29   P4IdeaX  Forums   Questions? See us in the Demo Lounge Try Commons Today Commons 13.2 Available For Download Timothy O’Mahony: tomahony@perforce.com