-
Notifications
You must be signed in to change notification settings - Fork 187
Usage Examples
NOTE: Must be run as root.
###Cache Monitoring Technology (CMT) and Memory B/W Monitoring (MBM) usage:###
-
####Monitor all events on cores 0 to 11:####
pqos -m all:0-11
pqos -m :0-11 -
####Monitor LLC on cores 0, 2 and 6:####
pqos -m llc:0,2,6 -
####Monitor local memory B/W on cores 0-2 and remote memory B/W on cores 3, 4 and 5:####
pqos -m "mbl:0-2;mbr:3,4,5" -
####Monitor events on groups of cores (aggregate statistics):####
pqos -m "all:[0-11];llc:[12,13,14];mbl:[15-17,20]" -
####Monitor all events for PID's 43523, 43589 and 3245 to 3252:####
pqos -p all:43523,43589,3245-3252 -
####Reset Monitoring:#### Reclaims in-use RMID's.
pqos -r
####Example CMT/MBM usage scenario#### A user has a host machine running 3 guest VM's with 3 cores assigned to each guest.
- VM0 - cores 0-2
- VM1 - cores 3-5
- VM2 - cores 6-8
To monitor all events (LLC occupancy, local and remote memory B/W) run:
pqos -m "all:[0-2],[3-5],[6-8];"
The output will look like:
CORE IPC MISSES LLC[KB] MBL[MB/s] MBR[MB/s]
0-2 0.28 7893k 383.2 901.2 430.8
3-5 0.28 45k 25.3 361282.6 22.4
6-8 0.26 89468k 6778.8 43904.3 4.3
###Cache Allocation Technology (CAT) usage:###
-
####Set COS 1 to the first 4 cache ways and COS 2 to the next 8 cache ways:####
pqos -e "llc:1=0x000f;llc:2=0x0ff0;" -
####Associate cores 0, 2, and 6 to 10 with COS 1 and core 1 to COS 2:####
pqos -a "llc:1=0,2,6-10;llc:2=1;" -
####Enable, disable CDP:####
pqos -S cdp-on
pqos -S cdp-off -
####Use current CDP settings and set COS 1 code and data bitmasks:####
pqos -S cdp-any -e "llc:1d=0xfff;llc:1c=0xfff00;" -
####Show current CAT settings:####
pqos -s -
####Reset CAT:#### Sets all COS to default (fill into all ways) and associates all cores with COS 0.
pqos -R
####Example CAT usage scenario#### A user has a host machine running 3 guest VM's. Each guest is assigned 3 cores and a priority.
- VM0 - cores 0-2 (P5)
- VM1 - cores 3-5 (P2)
- VM2 - cores 6-8 (P1)
As VM0 has the highest priority it will be assigned 8 exclusive LLC ways. VM1 and VM2 are relatively low priority so VM1 is assigned 6 ways and VM2 is assigned 4 ways, 2 of which will be shared.
-
First, set the 3 COS bitmasks for each VM:
pqos -e "llc:1=0x00ff;llc:2=0x3f00;llc:3=0xf000;" -
Next, associate each COS with the cores where each VM is running:
pqos -a "llc:1=0-2;llc:2=3-5;llc:3=6-8;"
VM 0 now has exclusive access to 8 LLC ways, VM1 has exclusive access to 4 ways and shared access to 2 ways and VM2 has exclusive access to 2 ways and shared access to another 2 ways. All other cores have access to all other ways.