3. 3
Virtualization
• Performance should be acceptable if:
• Well managed / well planned
• Hardware recommendations are the same as bare
metal to get the best performance if the installation
demands it
• Fast CPU preferred over more cores
• Memory to fully cache db
• Fast storage for the db files
4. 4
Virtualization
• Use vSphere 5 with vmxnet3 1.0.36 or later for
best performance
• Performance varies with hardware and VM
configuration just like it does on bare metal
• http://www.vmware.com/files/pdf/vmw-Perforce-
Server-on-VMware-vSphere.pdf
5. 5
Virtualization
• Perforce is evolving with the market
• Perforce works well in a virtualized environment
right now for the majority of our customers
• The Commit/Edge server functionality coming in
the 2013.2 release will allow even our largest
customers to make better use of VM’s by
distributing the workload across multiple VM’s
• 2013.3 – lockless reads on the database
7. 7
Monitoring
• Turn monitoring on:
• p4 configure set monitor=1 (or 2)
• 1 = monitor active processes
• 2 = monitor both active and idle processes
• p4 monitor show –a –e
• -a = show command args
• -e = show command environment
8. 8
Monitoring
• Create a cron job to monitor your p4d process
count
• You will have to adjust the alert level as you
learn what the average load for your server is
9. 9
Monitoring
#!/bin/bash
count=$(ps -ef | grep -i p4d_1 | wc –l)
Load=100 # Set to 3 - 4 times your average load.
if [ "$count" -gt "$load" ]
then
echo "Load alert is set to: ${load}." > count.txt
mail -s "p4 count is ${count}.” you@company.com < count.txt
rm count.txt
fi
10. 10
Monitoring
• Log analysis
• Support can assist with a log analysis if you are
having performance issues
• Log file needs to include debug info.
• p4 configure set server=3
• Analyzing your own logs
• https://kb.perforce.com/psla
11. 11
Monitoring
• Structured logs
• Command delimited format, easier to parse
• p4 configure set serverlog.file.n=logname.csv
• p4 configure set serverlog.retain.n=#
• 1 = all
• 2 = commands
• 3 = errors
• 4 = audit
• 5 = track
• 6 = user
• 7 = events
13. 13
Replication
• Types of replicas today
• Read only
• Forwarding
• Build Farm
• 2013.1 New replication features
• On demand library setting
• Replica of a replica
14. 14
Replication
• 2013.2 - Commit and Edge Servers
• Commit server is a central repository for files
• Edge servers do the vast majority of the work
• Workspaces move to the edge servers
• Supports horizontal growth of your Perforce installation
• Checkpoints and backup required for both the commit
and the edge servers
15. 15
Replication
• High level steps to create a replica
• Create configure entries, service user and group and
update protect table on master
• Checkpoint the master
• Copy the checkpoint and version files to the replica
• Restore the checkpoint on the replica
• Start the server on the replica using the settings from
the configure table