|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
================================================================================
|
|
Packit Service |
8a4b7a |
README for AppQoS
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
December 2019
|
|
Packit Service |
8a4b7a |
================================================================================
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
CONTENTS
|
|
Packit Service |
8a4b7a |
========
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- Introduction
|
|
Packit Service |
8a4b7a |
- Requirements and Installation
|
|
Packit Service |
8a4b7a |
- Configuration
|
|
Packit Service |
8a4b7a |
- Usage
|
|
Packit Service |
8a4b7a |
- REST API
|
|
Packit Service |
8a4b7a |
- Usage Scenario
|
|
Packit Service |
8a4b7a |
- How To Generate self-signed SSL certificate
|
|
Packit Service |
8a4b7a |
- Legal Disclaimer
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
INTRODUCTION
|
|
Packit Service |
8a4b7a |
============
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
AppQoS is a proof-of-concept software created to demonstrate the use of
|
|
Packit Service |
8a4b7a |
Intel(R) RDT technologies (CAT, MBA) and Intel(R) SST technologies
|
|
Packit Service |
8a4b7a |
Base Frequency (BF), Core Power (CP) to improve QoS for applications
|
|
Packit Service |
8a4b7a |
via partitioning system resources.
|
|
Packit Service |
8a4b7a |
AppQoS allows to assign Apps to Pools with different resources.
|
|
Packit Service |
8a4b7a |
In current version each of the Pools (group of cores) has fixed amount of
|
|
Packit Service |
8a4b7a |
cache and memory bandwidth allocated. Thanks to Intel(R) SST BF and CP support,
|
|
Packit Service |
8a4b7a |
AppQoS allows the CPU to be deployed with an asymmetric core frequency
|
|
Packit Service |
8a4b7a |
configuration. Amount of resources allocated and cores frequency
|
|
Packit Service |
8a4b7a |
configuration could depend on Pool’s priority.
|
|
Packit Service |
8a4b7a |
Intel(R) RDT CAT and MBA configuration is done via "libpqos" library and
|
|
Packit Service |
8a4b7a |
Intel(R) SST BF and CP configuration via external "Intel pwr" library.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
AppQoS provides simple, local, REST API management interface secured
|
|
Packit Service |
8a4b7a |
with HTTPS and "Basic HTTP Auth". REST API management interface allows
|
|
Packit Service |
8a4b7a |
user to manage Apps and Pools. An App controlled by AppQoS could be
|
|
Packit Service |
8a4b7a |
a process, a container or a VNF.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
AppQoS is reference code written in Python. It is fully configurable and
|
|
Packit Service |
8a4b7a |
can be easily modified to suit other use cases and allow remote management.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
REQUIREMENTS AND INSTALLATION
|
|
Packit Service |
8a4b7a |
=============================
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
AppQoS requires minimum Linux kernel v4.20 (for Intel(R) RDT L3 CAT and MBA)
|
|
Packit Service |
8a4b7a |
however, for support of Intel(R) SST BF and CP Linux kernel v5.2 is required.
|
|
Packit Service |
8a4b7a |
AppQoS is a part of Intel(R) RDT Software Package, it is located in "appqos"
|
|
Packit Service |
8a4b7a |
directory.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
AppQoS requires Python v3.x and depends on the following Python modules
|
|
Packit Service |
8a4b7a |
and external components:
|
|
Packit Service |
8a4b7a |
- pqos (libqos Python wrapper)
|
|
Packit Service |
8a4b7a |
- flask
|
|
Packit Service |
8a4b7a |
- flask_httpauth
|
|
Packit Service |
8a4b7a |
- flask_restful
|
|
Packit Service |
8a4b7a |
- jsonschema
|
|
Packit Service |
8a4b7a |
- Intel pwr library (github.com, CommsPowerManagement)
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE:
|
|
Packit Service |
8a4b7a |
All required dependencies are installed and AppQoS is executed in virtualenv
|
|
Packit Service |
8a4b7a |
when started via "make run" command.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
To install "pqos" module,
|
|
Packit Service |
8a4b7a |
clone "intel/intel-cmt-cat" repository or download source code from github
|
|
Packit Service |
8a4b7a |
(for more information about repository cloning or downloading source code,
|
|
Packit Service |
8a4b7a |
please see github.com help).
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
git clone https://github.com/intel/intel-cmt-cat.git
|
|
Packit Service |
8a4b7a |
cd ./intel-cmt-cat
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
or
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
wget https://github.com/intel/intel-cmt-cat/archive/master.zip
|
|
Packit Service |
8a4b7a |
unzip ./master.zip
|
|
Packit Service |
8a4b7a |
cd ./intel-cmt-cat-master
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
After getting the code, compile and install Intel(R) RDT Software Package
|
|
Packit Service |
8a4b7a |
(for more information, please see INSTALL file for Intel(R) Software Package).
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
make
|
|
Packit Service |
8a4b7a |
sudo make install
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Intel(R) RDT CAT and MBA configuration is done via libpqos using MSR interface,
|
|
Packit Service |
8a4b7a |
for more information please see "Software Compatibility" section of
|
|
Packit Service |
8a4b7a |
README for Intel(R) RDT Software Package.
|
|
Packit Service |
8a4b7a |
For hardware requirements please see "Hardware Support" section of
|
|
Packit Service |
8a4b7a |
mentioned README file.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
To get and install "Intel pwr" library required to configure
|
|
Packit Service |
8a4b7a |
Intel(R) SST BF and CP please follow instructions at:
|
|
Packit Service |
8a4b7a |
https://github.com/intel/CommsPowerManagement
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
CONFIGURATION
|
|
Packit Service |
8a4b7a |
=============
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
AppQoS supports Pools of Apps, each with defined cores, cache and memory
|
|
Packit Service |
8a4b7a |
bandwidth allocation. Each App describes a single app, with one or more PIDs.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Cache Allocation, Memory Bandwidth Allocation (via CAT and MBA), Base Frequency,
|
|
Packit Service |
8a4b7a |
Core Power (via SST BF and CP) and affinity are configured by AppQoS on per core
|
|
Packit Service |
8a4b7a |
basis.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: make sure that cores are isolated via "isolcpu=" kernel param.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
AppQoS config is stored in JSON format in file "./appqos.conf" for which
|
|
Packit Service |
8a4b7a |
JSON Schema file is available in "./schema" directory.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Configuration file is "Read-Only", no runtime changes are saved.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
If there is no "Default" pool (with "id" equal to 0) defined in config file,
|
|
Packit Service |
8a4b7a |
AppQoS will dynamically create one on start-up.
|
|
Packit Service |
8a4b7a |
All unassigned cores will be assigned to "Default" pool,
|
|
Packit Service |
8a4b7a |
MBA will be configured to 100% and CAT CBM to all cache ways.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
EXAMPLE CONFIG
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"apps": [{"id": 1, "name": "App1", "pids": [1979, 1980]},
|
|
Packit Service |
8a4b7a |
{"id": 2, "cores": [4], "name": "App2", "pids": [1592, 1593, 1594]},
|
|
Packit Service |
8a4b7a |
{"id": 3, "cores": [5], "name": "App3", "pids": [1576, 1577, 1578]}],
|
|
Packit Service |
8a4b7a |
"pools": [{"id": 1, "cores": [1, 2, 3], "name": "HP", "mba": 100, "cbm": "0xFF0", "apps": [1], "power_profile": 1},
|
|
Packit Service |
8a4b7a |
{"id": 2, "cores": [4, 5, 6], "name": "MP", "mba": 50, "cbm": "0xC", "apps": [2, 3]},
|
|
Packit Service |
8a4b7a |
{"id": 3, "cores": [7, 8, 9], "name": "LP", "mba": 10, "cbm": "0x3", "apps": []}],
|
|
Packit Service |
8a4b7a |
"power_profiles": [{"id": 1, "min_freq": 2500, "max_freq": 2500, "epp": "performance", "name": "HP"}],
|
|
Packit Service |
8a4b7a |
"auth": {"username": "admin", "password": "password"},
|
|
Packit Service |
8a4b7a |
"sstbf": {"configured": false},
|
|
Packit Service |
8a4b7a |
"power_profiles_expert_mode": false,
|
|
Packit Service |
8a4b7a |
"power_profiles_verify": true
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
"apps" section, Apps being managed by App QoS.
|
|
Packit Service |
8a4b7a |
- "id" - App’s ID
|
|
Packit Service |
8a4b7a |
- "name" - App's name (optional)
|
|
Packit Service |
8a4b7a |
- "cores" - cores being used by App (optional)
|
|
Packit Service |
8a4b7a |
- "pids" - list of App's PIDs
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
"pools" section, Pools of Apps.
|
|
Packit Service |
8a4b7a |
- "id" - Pool's ID
|
|
Packit Service |
8a4b7a |
- "name" - Pool's name
|
|
Packit Service |
8a4b7a |
- "apps" - list of Apps being part of the Pool
|
|
Packit Service |
8a4b7a |
- "cbm" - Intel RDT CAT CacheWayBitmask assigned to Pool
|
|
Packit Service |
8a4b7a |
- "mba" - Intel RDT MBA rate [%] assigned to Pool
|
|
Packit Service |
8a4b7a |
- "cores" - cores being assigned to Pool
|
|
Packit Service |
8a4b7a |
- "power_profile" - Power Profile ID to be applied on pool's cores
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
"power_profiles" section, Power Profiles/SST-CP.
|
|
Packit Service |
8a4b7a |
- "id" - Profile's ID
|
|
Packit Service |
8a4b7a |
- "name" - Profiles's name
|
|
Packit Service |
8a4b7a |
- "min_freq" - min. frequency [MHz]
|
|
Packit Service |
8a4b7a |
- "max_freq" - max. frequency [MHz]
|
|
Packit Service |
8a4b7a |
- "epp" - Energy Performance Preference
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
"auth" section, REST API username and password.
|
|
Packit Service |
8a4b7a |
- "username" - username
|
|
Packit Service |
8a4b7a |
- "password" - password
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
"sstbf" section, Intel(R) SST-BF configuration.
|
|
Packit Service |
8a4b7a |
- "configured" – SST-BF requested state
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE:
|
|
Packit Service |
8a4b7a |
"power profiles" are ignored when SST-BF is configured.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Global options:
|
|
Packit Service |
8a4b7a |
- "power_profiles_expert_mode" - make power profiles editable via REST API
|
|
Packit Service |
8a4b7a |
(Default: False)
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- "power_profiles_verify" - Admission Control feature for config file content,
|
|
Packit Service |
8a4b7a |
verifies Power Profiles and Pools configuration (Default: True)
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
USAGE
|
|
Packit Service |
8a4b7a |
=====
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
AppQoS is a Python script accepting the following, optional,
|
|
Packit Service |
8a4b7a |
command line options:
|
|
Packit Service |
8a4b7a |
- -h, --help, show this help message and exit
|
|
Packit Service |
8a4b7a |
- -c PATH, --config PATH, Configuration file path
|
|
Packit Service |
8a4b7a |
- --port PORT, REST API port (default: 5000)
|
|
Packit Service |
8a4b7a |
- -V, --verbose, Verbose mode
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: AppQoS requires root privileges.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
By default it will attempt to read from "appqos.config" file from current folder.
|
|
Packit Service |
8a4b7a |
Example command line to run AppQoS in verbose mode and config file in
|
|
Packit Service |
8a4b7a |
non-default location:
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
sudo ./appqos.py -c /tmp/appqos.conf -V
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE:
|
|
Packit Service |
8a4b7a |
All required dependencies are installed and AppQoS is executed in virtualenv
|
|
Packit Service |
8a4b7a |
when started via "make run" command.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
For more information about configuration file please see CONFIGURATION paragraph,
|
|
Packit Service |
8a4b7a |
for information about runtime configuration please see REST API paragraph.
|
|
Packit Service |
8a4b7a |
For more info please see Step-by-step.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
REST API
|
|
Packit Service |
8a4b7a |
========
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
The REST API is a local (but can be easily modified to allow remote access),
|
|
Packit Service |
8a4b7a |
secured interface that allows the user to control AppQoS.
|
|
Packit Service |
8a4b7a |
The REST API allows to:
|
|
Packit Service |
8a4b7a |
- add, remove or move App between Pools,
|
|
Packit Service |
8a4b7a |
- add, remove or modify Pools,
|
|
Packit Service |
8a4b7a |
- configure Intel(R) SST BF and CP technologies
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: None of configuration changes made via REST API are saved to configuration file.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
As REST API uses HTTPS, it requires SSL certificate,
|
|
Packit Service |
8a4b7a |
please see HOW TO GENERATE SELF-SIGNED SSL CERTIFICATE paragraph for more info.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
The REST API uses "Basic HTTP Auth", username and password are stored in appqos.conf.
|
|
Packit Service |
8a4b7a |
To set your own username and password please modify the following section of appqos.conf:
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
"auth": {"username": "admin", "password": "password"}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: If using curl to do REST API calls, add --user admin:password to command line
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
REST API URIs
|
|
Packit Service |
8a4b7a |
-------------
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
JSON Schema files for REST API commands and responses are available in "./schema" directory.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- GET /apps - get all/collection of apps
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- POST /apps - create new app
|
|
Packit Service |
8a4b7a |
Example request:
|
|
Packit Service |
8a4b7a |
{"pool_id": 2,
|
|
Packit Service |
8a4b7a |
"name": "hello",
|
|
Packit Service |
8a4b7a |
"cores": [1,2],
|
|
Packit Service |
8a4b7a |
"pids": [1]}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Result:
|
|
Packit Service |
8a4b7a |
{"id": 5}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- GET /apps/{id} - get app for given id
|
|
Packit Service |
8a4b7a |
Example response:
|
|
Packit Service |
8a4b7a |
{"id": 6,
|
|
Packit Service |
8a4b7a |
"cores": [2, 3, 11],
|
|
Packit Service |
8a4b7a |
"name": "App",
|
|
Packit Service |
8a4b7a |
"pids": [1748, 1749, 1750],
|
|
Packit Service |
8a4b7a |
"pool_id": 3
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- PUT /apps/{id} - update app (e.g.:move between pools) for given id
|
|
Packit Service |
8a4b7a |
Example request:
|
|
Packit Service |
8a4b7a |
{"pool_id": 2}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- DELETE /apps/{id} - delete app for given id
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- GET /pools - get all/collection of pools
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- POST /pools - create new pool
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- GET /pools/{id} - get pool for given id
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- PUT /pools/{id} - modify pool for given id
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- DELETE /pools/{id} - delete empty pool for given id
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- GET /power_profiles - get all/collection of power profiles
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- POST /power_profiles - create new power profile
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- GET /power_profiles/{id} - get power profile for given id
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- PUT /power_profiles/{id} - modify power profile for given id
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- DELETE /power_profiles/{id} - delete power profile for given id
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- GET /stats - get stats
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- GET /caps - get system capabilities
|
|
Packit Service |
8a4b7a |
Example response:
|
|
Packit Service |
8a4b7a |
{"capabilities": ["cat","mba","sstbf","power"]
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- GET /caps/sstbf - get Intel(R) SST-BF details
|
|
Packit Service |
8a4b7a |
Example response:
|
|
Packit Service |
8a4b7a |
{"configured": true,
|
|
Packit Service |
8a4b7a |
"hp_cores": [2,...,88],
|
|
Packit Service |
8a4b7a |
"std_cores": [0,...,95]
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
- PUT /caps/sstbf - configure Intel(R) SST-BF
|
|
Packit Service |
8a4b7a |
Example request:
|
|
Packit Service |
8a4b7a |
{"configured": true}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
USAGE SCENARIO
|
|
Packit Service |
8a4b7a |
==============
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
AppQoS, leveraging Intel(R) RDT (CAT, MBA) and SST (BF, CP) Technologies,
|
|
Packit Service |
8a4b7a |
is to be used prioritize and protect performance of high priority applications.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Please see below for complete step-by-step guide to configure AppQoS to
|
|
Packit Service |
8a4b7a |
leverage Intel(R) RDT (CAT, MBA) and SST-BF Technologies to prioritize and
|
|
Packit Service |
8a4b7a |
protect performance of high priority application.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
SETUP
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Get self-signed SSL certificate (for more info please see
|
|
Packit Service |
8a4b7a |
HOW TO GENERATE SELF-SIGNED SSL CERTIFICATE paragraph).
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Create appqos.conf file (for more info please see Configuration).
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
cat /tmp/appqos.conf
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"apps": [
|
|
Packit Service |
8a4b7a |
],
|
|
Packit Service |
8a4b7a |
"auth": {
|
|
Packit Service |
8a4b7a |
"password": "password",
|
|
Packit Service |
8a4b7a |
"username": "admin"
|
|
Packit Service |
8a4b7a |
},
|
|
Packit Service |
8a4b7a |
"sstbf": {
|
|
Packit Service |
8a4b7a |
"configured": true
|
|
Packit Service |
8a4b7a |
},
|
|
Packit Service |
8a4b7a |
"pools": [
|
|
Packit Service |
8a4b7a |
],
|
|
Packit Service |
8a4b7a |
"power_profiles_expert_mode": true
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Empty config file with essential configuration only:
|
|
Packit Service |
8a4b7a |
- REST API Authentication details,
|
|
Packit Service |
8a4b7a |
- SST-BF configuration
|
|
Packit Service |
8a4b7a |
- option to enable Power Profile "Expert Mode" to allow us to
|
|
Packit Service |
8a4b7a |
add power profiles via REST API
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
AppQoS command line parameters (for more info please see USAGE paragraph)
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
./appqos.py --help
|
|
Packit Service |
8a4b7a |
usage: appqos.py [-h] [-c PATH] [--port PORT] [-V]
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
optional arguments:
|
|
Packit Service |
8a4b7a |
-h, --help show this help message and exit
|
|
Packit Service |
8a4b7a |
-c PATH, --config PATH
|
|
Packit Service |
8a4b7a |
Configuration file path
|
|
Packit Service |
8a4b7a |
--port PORT REST API port
|
|
Packit Service |
8a4b7a |
-V, --verbose Verbose mode
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: REST API port (5000 by default) can be set via "--port"
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
START APPQOS
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
sudo make run
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
2019-12-04 17:49:48,403 INFO Supported capabilities:
|
|
Packit Service |
8a4b7a |
2019-12-04 17:49:48,403 INFO ['cat', 'mba', 'sstbf', 'power']
|
|
Packit Service |
8a4b7a |
* Serving Flask app "rest.rest_server" (lazy loading)
|
|
Packit Service |
8a4b7a |
* Environment: production
|
|
Packit Service |
8a4b7a |
WARNING: This is a development server. Do not use it in a production deployment.
|
|
Packit Service |
8a4b7a |
Use a production WSGI server instead.
|
|
Packit Service |
8a4b7a |
* Debug mode: off
|
|
Packit Service |
8a4b7a |
2019-12-04 17:49:48,436 INFO * Running on https://127.0.0.1:5000/ (Press CTRL+C to quit)
|
|
Packit Service |
8a4b7a |
2019-12-04 17:49:48,590 INFO Configuring SST-BF
|
|
Packit Service |
8a4b7a |
2019-12-04 17:49:48,889 INFO SST-BF enabled, configured.
|
|
Packit Service |
8a4b7a |
2019-12-04 17:49:48,889 INFO SST-BF HP cores: [2, 10, 11, 12, 13, 14, 15, 16, 25, 34, 35, 36, 37, 38, 39, 40]
|
|
Packit Service |
8a4b7a |
2019-12-04 17:49:48,889 INFO SST-BF STD cores: [0, 1, 3, 4, 5, 6, 7, 8, 9, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 41, 42, 43, 44, 45, 46, 47]
|
|
Packit Service |
8a4b7a |
2019-12-04 17:49:49,173 INFO Power Profiles/EPP enabled, not configured, SST-BF is configured
|
|
Packit Service |
8a4b7a |
2019-12-04 17:49:49,173 INFO Configuring RDT
|
|
Packit Service |
8a4b7a |
2019-12-04 17:49:49,180 INFO Configuration changed, processing new config...
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
VERIFY INITIAL CONFIGURATION
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
List all Pools
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/pools -X GET --user admin:password -k | jq
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"id": 0,
|
|
Packit Service |
8a4b7a |
"mba": 100,
|
|
Packit Service |
8a4b7a |
"cbm": 2047,
|
|
Packit Service |
8a4b7a |
"name": "Default",
|
|
Packit Service |
8a4b7a |
"cores": [
|
|
Packit Service |
8a4b7a |
0,
|
|
Packit Service |
8a4b7a |
1,
|
|
Packit Service |
8a4b7a |
2,
|
|
Packit Service |
8a4b7a |
3,
|
|
Packit Service |
8a4b7a |
...
|
|
Packit Service |
8a4b7a |
43,
|
|
Packit Service |
8a4b7a |
44,
|
|
Packit Service |
8a4b7a |
45,
|
|
Packit Service |
8a4b7a |
46,
|
|
Packit Service |
8a4b7a |
47
|
|
Packit Service |
8a4b7a |
]
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
]
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: "Default" pool automatically created (id=0).
|
|
Packit Service |
8a4b7a |
Pool takes all cores (48), 100% of MBA and full CAT CBM (all cache ways).
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
List all Apps
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/apps -X GET --user admin:password -k | jq
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"message": "No apps in config file"
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: No Apps defined.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
List capabilities
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/caps -X GET --user admin:password -k | jq
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"capabilities": [
|
|
Packit Service |
8a4b7a |
"cat",
|
|
Packit Service |
8a4b7a |
"mba",
|
|
Packit Service |
8a4b7a |
"sstbf",
|
|
Packit Service |
8a4b7a |
"power"
|
|
Packit Service |
8a4b7a |
]
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: Detected capabilities listed,
|
|
Packit Service |
8a4b7a |
Intel(R) RDT CAT, MBA and Intel(R) SST BF, CP technologies supported.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
List Intel(R) SST-BF details
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/caps/sstbf -X GET --user admin:password -k | jq -c
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{"configured":true
|
|
Packit Service |
8a4b7a |
"hp_cores": [2,10,11,12,13,14,15,16,25,34,35,36,37,38,39,40],
|
|
Packit Service |
8a4b7a |
"std_cores": [0,1,3,4,5,6,7,8,9,17,18,19,20,21,22,23,24,26,27,28,29,30,31,32,33,41,42,43,44,45,46,47]}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: SST-BF enabled (as per config file), list of HP and STD cores provided.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Verify frequencies settings
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
sudo python3 -c $'import pwr\nprint("\tFreq.\tFreq.\\nCore#\tMin\tMax\tEPP")\nfor c in pwr.get_cores(): c.refresh_stats(); print("{}\t{}\t{}\t{}".format(c.core_id, c.min_freq, c.max_freq, c.epp))'
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Freq. Freq.
|
|
Packit Service |
8a4b7a |
Core# Min Max EPP
|
|
Packit Service |
8a4b7a |
0 2100 2100 balance_performance
|
|
Packit Service |
8a4b7a |
1 2100 2100 balance_performance
|
|
Packit Service |
8a4b7a |
2 2800 2800 balance_performance
|
|
Packit Service |
8a4b7a |
3 2100 2100 balance_performance
|
|
Packit Service |
8a4b7a |
...
|
|
Packit Service |
8a4b7a |
45 2100 2100 balance_performance
|
|
Packit Service |
8a4b7a |
46 2100 2100 balance_performance
|
|
Packit Service |
8a4b7a |
47 2100 2100 balance_performance
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: HP cores' frequencies are set to 2800MHz, STD cores' to 2100MHz
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Unconfigure SST-BF
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/caps/sstbf -X PUT --user admin:password -k -H "Content-Type: application/json" -d '{"configured": false}'
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"message": "SST-BF caps modified"
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Verify frequencies settings
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
sudo python3 -c $'import pwr\nprint("\tFreq.\tFreq.\\nCore#\tMin\tMax\tEPP")\nfor c in pwr.get_cores(): c.refresh_stats(); print("{}\t{}\t{}\t{}".format(c.core_id, c.min_freq, c.max_freq, c.epp))'
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Freq. Freq.
|
|
Packit Service |
8a4b7a |
Core# Min Max EPP
|
|
Packit Service |
8a4b7a |
0 2300 2300 balance_performance
|
|
Packit Service |
8a4b7a |
1 2300 2300 balance_performance
|
|
Packit Service |
8a4b7a |
2 2300 2300 balance_performance
|
|
Packit Service |
8a4b7a |
3 2300 2300 balance_performance
|
|
Packit Service |
8a4b7a |
...
|
|
Packit Service |
8a4b7a |
45 2300 2300 balance_performance
|
|
Packit Service |
8a4b7a |
46 2300 2300 balance_performance
|
|
Packit Service |
8a4b7a |
47 2300 2300 balance_performance
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: HP and STD cores' frequencies are set to 2300MHz
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
CREATE APPS
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Create multiple processes, list their PIDs and core affinity
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
killall sleep
|
|
Packit Service |
8a4b7a |
for n in {1..5}; do bash -c "sleep 1d &"; done
|
|
Packit Service |
8a4b7a |
for i in `pidof sleep`; do taskset -p -c $i; done
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
pid 13894's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
pid 13892's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
pid 13890's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
pid 13888's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
pid 13886's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Create App, specify cores
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/apps -X POST --user admin:password -k -H "Content-Type: application/json" -d '{"name": "APP1", "cores": [0,1,2,3], "pids": [13894, 13892]}'
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"id": 1
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Verify App’s creation (list ALL apps)
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/apps -X GET --user admin:password -k
|
|
Packit Service |
8a4b7a |
[
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"name": " APP1",
|
|
Packit Service |
8a4b7a |
"cores": [
|
|
Packit Service |
8a4b7a |
0,
|
|
Packit Service |
8a4b7a |
1,
|
|
Packit Service |
8a4b7a |
2,
|
|
Packit Service |
8a4b7a |
3
|
|
Packit Service |
8a4b7a |
],
|
|
Packit Service |
8a4b7a |
"pids": [
|
|
Packit Service |
8a4b7a |
13894,
|
|
Packit Service |
8a4b7a |
13892
|
|
Packit Service |
8a4b7a |
],
|
|
Packit Service |
8a4b7a |
"id": 1,
|
|
Packit Service |
8a4b7a |
"pool_id": 0
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
]
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: App was assigned to Pool #0 as cores 0,1,2,3 are part of that Pool
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Verify PIDs’ core affinity
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
for i in `pidof sleep`; do taskset -p -c $i; done
|
|
Packit Service |
8a4b7a |
pid 13894's current affinity list: 0-3
|
|
Packit Service |
8a4b7a |
pid 13892's current affinity list: 0-3
|
|
Packit Service |
8a4b7a |
pid 13890's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
pid 13888's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
pid 13886's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Create App, specify destination Pool ID
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/apps -X POST --user admin:password -k -H "Content-Type: application/json" -d '{"name": "APP2", "pool_id": 0, "pids": [13890]}'
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"id": 2
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Verify App’s creation (get specific App)
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/apps/2 -X GET --user admin:password -k
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"name": "APP2",
|
|
Packit Service |
8a4b7a |
"pids": [
|
|
Packit Service |
8a4b7a |
13890
|
|
Packit Service |
8a4b7a |
],
|
|
Packit Service |
8a4b7a |
"id": 2,
|
|
Packit Service |
8a4b7a |
"pool_id": 0
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: App was assigned to Pool #0 as requested via "pool_id" param
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Verify PIDs’ core affinity
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
for i in `pidof sleep`; do taskset -p -c $i; done
|
|
Packit Service |
8a4b7a |
pid 13894's current affinity list: 0-3
|
|
Packit Service |
8a4b7a |
pid 13892's current affinity list: 0-3
|
|
Packit Service |
8a4b7a |
pid 13890's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
pid 13888's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
pid 13886's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: App2 PID’s core affinity is 0-47 as those are "Default" pool cores.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
MODIFY "DEFAULT" POOL
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
List SST-BF’s STD cores
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/caps/sstbf -X GET --user admin:password -k | jq .std_cores -c
|
|
Packit Service |
8a4b7a |
[0,1,3,4,5,6,7,8,9,17,18,19,20,21,22,23,24,26,27,28,29,30,31,32,33,41,42,43,44,45,46,47]
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Modify "Default" pool to exclude HP cores, assign 50% of MBA and 4 LLC CWs (CBM: 0xF/15)
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/pools/0 -X PUT --user admin:password -k -H "Content-Type: application/json" -d '{"cores": [0,1,3,4,5,6,7,8,9,17,18,19,20,21,22,23,24,26,27,28,29,30,31,32,33,41,42,43,44,45,46,47], "mba": 50, "cbm": "0xf"}'
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
"POOL 0 updated"
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Check new "Default" pool configuration
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/pools/0 -X GET --user admin:password -k | jq -c
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{"id":0,
|
|
Packit Service |
8a4b7a |
"mba":50,
|
|
Packit Service |
8a4b7a |
"cbm":15,
|
|
Packit Service |
8a4b7a |
"name":"Default",
|
|
Packit Service |
8a4b7a |
"cores":[0,1,3,4,5,6,7,8,9,17,18,19,20,21,22,23,24,26,27,28,29,30,31,32,33,41,42,43,44,45,46,47],
|
|
Packit Service |
8a4b7a |
"apps":[1,2]}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Check how does "Default" pool modification has affected Apps in that pool
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/apps -X GET --user admin:password -k
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
[
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"name": "APP1",
|
|
Packit Service |
8a4b7a |
"pids": [
|
|
Packit Service |
8a4b7a |
13894,
|
|
Packit Service |
8a4b7a |
13892
|
|
Packit Service |
8a4b7a |
],
|
|
Packit Service |
8a4b7a |
"id": 1,
|
|
Packit Service |
8a4b7a |
"pool_id": 0
|
|
Packit Service |
8a4b7a |
},
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"name": "APP2",
|
|
Packit Service |
8a4b7a |
"pids": [
|
|
Packit Service |
8a4b7a |
13890
|
|
Packit Service |
8a4b7a |
],
|
|
Packit Service |
8a4b7a |
"id": 2,
|
|
Packit Service |
8a4b7a |
"pool_id": 0
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
]
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
for i in `pidof sleep`; do taskset -p -c $i; done
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
pid 13894's current affinity list: 0,1,3-9,17-24,26-33,41-47
|
|
Packit Service |
8a4b7a |
pid 13892's current affinity list: 0,1,3-9,17-24,26-33,41-47
|
|
Packit Service |
8a4b7a |
pid 13890's current affinity list: 0,1,3-9,17-24,26-33,41-47
|
|
Packit Service |
8a4b7a |
pid 13888's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
pid 13886's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: As some of the cores that were specified for APP1 are not part of
|
|
Packit Service |
8a4b7a |
"Default" pool anymore, core affinity for APP1 PIDs’ was reset to
|
|
Packit Service |
8a4b7a |
new "Default" pool cores.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
CREATE HP POOL
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Get list of HP cores
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/caps/sstbf -X GET --user admin:password -k | jq .hp_cores –c
|
|
Packit Service |
8a4b7a |
[2,10,11,12,13,14,15,16,25,34,35,36,37,38,39,40]
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Create HP Pool, with 7 (isolated) LLC CWs allocated and 100% of MBA
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/pools -X POST --user admin:password -k -H "Content-Type: application/json" -d '{"name": "HP", "cores": [2,10,11,12,13,14,15,16,25,34,35,36,37,38,39,40], "cbm": "0x7F0", "mba": 100}'
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"id": 7
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: Pool with "id=7" was created.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Get All Pools to verify creation of new HP Pool(#7)
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/pools -X GET --user admin:password -k | jq –c
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
[{"id":0,
|
|
Packit Service |
8a4b7a |
"mba":50,
|
|
Packit Service |
8a4b7a |
"cbm":15,
|
|
Packit Service |
8a4b7a |
"name":"Default",
|
|
Packit Service |
8a4b7a |
"cores":[0,1,3,4,5,6,7,8,9,17,18,19,20,21,22,23,24,26,27,28,29,30,31,32,33,41,42,43,44,45,46,47],
|
|
Packit Service |
8a4b7a |
"apps":[1,2]},
|
|
Packit Service |
8a4b7a |
{"name":"HP",
|
|
Packit Service |
8a4b7a |
"cores":[2,10,11,12,13,14,15,16,25,34,35,36,37,38,39,40],
|
|
Packit Service |
8a4b7a |
"cbm":2032,
|
|
Packit Service |
8a4b7a |
"mba":100,
|
|
Packit Service |
8a4b7a |
"id":7}]
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
DEFINE AND APPLY POWER PROFILES
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Define HP power profile
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/power_profiles -X POST --user admin:password -k -H "Content-Type: application/json" -d '{"name": "PP HP", "min_freq": 3000, "max_freq": 3000, "epp": "performance"}'
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"id": 0,
|
|
Packit Service |
8a4b7a |
"message": "New POWER PROFILE 0 added"
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Define STD power profile
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/power_profiles -X POST --user admin:password -k -H "Content-Type: application/json" -d '{"name": "PP STD", "min_freq": 1500, "max_freq": 1500, "epp": "power"}'
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"id": 1,
|
|
Packit Service |
8a4b7a |
"message": "New POWER PROFILE 1 added"
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Get All Power Profiles to verify creation of new Power Profiles
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/power_profiles -X GET --user admin:password -k | jq
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
[
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"name": "PP HP",
|
|
Packit Service |
8a4b7a |
"min_freq": 3000,
|
|
Packit Service |
8a4b7a |
"max_freq": 3000,
|
|
Packit Service |
8a4b7a |
"epp": "performance",
|
|
Packit Service |
8a4b7a |
"id": 0
|
|
Packit Service |
8a4b7a |
},
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"name": "PP STD",
|
|
Packit Service |
8a4b7a |
"min_freq": 1500,
|
|
Packit Service |
8a4b7a |
"max_freq": 1500,
|
|
Packit Service |
8a4b7a |
"epp": "power",
|
|
Packit Service |
8a4b7a |
"id": 1
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
]
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Apply power profiles
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/pools/7 -X PUT --user admin:password -k -H "Content-Type: application/json" -d '{"power_profile": 0}'
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"message": "POOL 7 not updated, Power Profiles configuration would cause CPU to be oversubscribed."
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE:
|
|
Packit Service |
8a4b7a |
AppQoS supports Admission Control feature, which protects CPU from being oversubscribed,
|
|
Packit Service |
8a4b7a |
as a result of that, order in which power profile are applied is important.
|
|
Packit Service |
8a4b7a |
(Configuration change can be forced by setting "verify" flag to "false" for a request)
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Lets apply the STD power profile first.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/pools/0 -X PUT --user admin:password -k -H "Content-Type: application/json" -d '{"power_profile": 1}'
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"message": "POOL 0 updated"
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/pools/7 -X PUT --user admin:password -k -H "Content-Type: application/json" -d '{"power_profile": 0}'
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"message": "POOL 7 updated"
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Verify power profiles configuration in HW
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
sudo python3 -c $'import pwr\nprint("\tFreq.\tFreq.\\nCore#\tMin\tMax\tEPP")\nfor c in pwr.get_cores(): c.refresh_stats(); print("{}\t{}\t{}\t{}".format(c.core_id, c.min_freq, c.max_freq, c.epp))'
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Freq. Freq.
|
|
Packit Service |
8a4b7a |
Core# Min Max EPP
|
|
Packit Service |
8a4b7a |
0 1500 1500 power
|
|
Packit Service |
8a4b7a |
1 1500 1500 power
|
|
Packit Service |
8a4b7a |
2 3000 3000 performance
|
|
Packit Service |
8a4b7a |
3 1500 1500 power
|
|
Packit Service |
8a4b7a |
...
|
|
Packit Service |
8a4b7a |
45 1500 1500 power
|
|
Packit Service |
8a4b7a |
46 1500 1500 power
|
|
Packit Service |
8a4b7a |
47 1500 1500 power
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE:
|
|
Packit Service |
8a4b7a |
Cores from HP pool have frequency fixed to 3000MHz and EPP set to "performance",
|
|
Packit Service |
8a4b7a |
STD pool's cores have frequency fixed to 1500MHz and EPP set to "power".
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
MOVE APP#2
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Move App#2 to HP Pool(#7)
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/apps/2 -X PUT --user admin:password -k -H "Content-Type: application/json" -d '{"pool_id": 7}'
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
"APP 2 moved to new pool"
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Verify new configuration, list all apps
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/apps -X GET --user admin:password -k
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
[
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"name": "APP1",
|
|
Packit Service |
8a4b7a |
"pids": [
|
|
Packit Service |
8a4b7a |
13894,
|
|
Packit Service |
8a4b7a |
13892
|
|
Packit Service |
8a4b7a |
],
|
|
Packit Service |
8a4b7a |
"id": 1,
|
|
Packit Service |
8a4b7a |
"pool_id": 0
|
|
Packit Service |
8a4b7a |
},
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"name": "APP2",
|
|
Packit Service |
8a4b7a |
"pids": [
|
|
Packit Service |
8a4b7a |
13890
|
|
Packit Service |
8a4b7a |
],
|
|
Packit Service |
8a4b7a |
"id": 2,
|
|
Packit Service |
8a4b7a |
"pool_id": 7
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
]
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Verify new configuration, list pools
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/pools -X GET --user admin:password -k | jq -c
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
[{"id":0,
|
|
Packit Service |
8a4b7a |
"mba":50,
|
|
Packit Service |
8a4b7a |
"cbm":15,
|
|
Packit Service |
8a4b7a |
"name":"Default",
|
|
Packit Service |
8a4b7a |
"cores":[0,1,3,4,5,6,7,8,9,17,18,19,20,21,22,23,24,26,27,28,29,30,31,32,33,41,42,43,44,45,46,47],
|
|
Packit Service |
8a4b7a |
"apps":[1]},
|
|
Packit Service |
8a4b7a |
{"name":"HP",
|
|
Packit Service |
8a4b7a |
"cores":[2,10,11,12,13,14,15,16,25,34,35,36,37,38,39,40],
|
|
Packit Service |
8a4b7a |
"cbm":2032,
|
|
Packit Service |
8a4b7a |
"mba":100,
|
|
Packit Service |
8a4b7a |
"id":7,
|
|
Packit Service |
8a4b7a |
"apps":[2]}]
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Verify new configuration, check core affinity
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
for i in `pidof sleep`; do taskset -p -c $i; done
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
pid 13894's current affinity list: 0,1,3-9,17-24,26-33,41-47
|
|
Packit Service |
8a4b7a |
pid 13892's current affinity list: 0,1,3-9,17-24,26-33,41-47
|
|
Packit Service |
8a4b7a |
pid 13890's current affinity list: 2,10-16,25,34-40
|
|
Packit Service |
8a4b7a |
pid 13888's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
pid 13886's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
MODIFY APP#2
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Modify App core affinity and name
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/apps/2 -X PUT --user admin:password -k -H "Content-Type: application/json" -d '{"cores": [2,11,13], "name": "APP2 HP"}'
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
"APP 2 moved to new pool"
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Verify new configuration, get App#2 details
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/apps/2 -X GET --user admin:password -k
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"name": "APP2 HP",
|
|
Packit Service |
8a4b7a |
"pids": [
|
|
Packit Service |
8a4b7a |
13890
|
|
Packit Service |
8a4b7a |
],
|
|
Packit Service |
8a4b7a |
"id": 2,
|
|
Packit Service |
8a4b7a |
"cores": [
|
|
Packit Service |
8a4b7a |
2,
|
|
Packit Service |
8a4b7a |
11,
|
|
Packit Service |
8a4b7a |
13
|
|
Packit Service |
8a4b7a |
],
|
|
Packit Service |
8a4b7a |
"pool_id": 7
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Verify new configuration, check core affinity
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
for i in `pidof sleep`; do taskset -p -c $i; done
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
pid 13894's current affinity list: 0,1,3-9,17-24,26-33,41-47
|
|
Packit Service |
8a4b7a |
pid 13892's current affinity list: 0,1,3-9,17-24,26-33,41-47
|
|
Packit Service |
8a4b7a |
pid 13890's current affinity list: 2,11,13
|
|
Packit Service |
8a4b7a |
pid 13888's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
pid 13886's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
REMOVE APP#2
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Remove App#2
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/apps/2 -X DELETE --user admin:password -k
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
"APP 2 deleted"
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Verify new configuration, get App#2 and all Apps details
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/apps/2 -X GET --user admin:password -k
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"message": "APP 2 not found in config"
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: App#2 not found
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/apps -X GET --user admin:password -k
|
|
Packit Service |
8a4b7a |
[
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"name": "stress-ng",
|
|
Packit Service |
8a4b7a |
"pids": [
|
|
Packit Service |
8a4b7a |
13894,
|
|
Packit Service |
8a4b7a |
13892
|
|
Packit Service |
8a4b7a |
],
|
|
Packit Service |
8a4b7a |
"id": 1,
|
|
Packit Service |
8a4b7a |
"pool_id": 0
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
]
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: No App#2 listed
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Verify new configuration, check core affinity
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
for i in `pidof sleep`; do taskset -p -c $i; done
|
|
Packit Service |
8a4b7a |
pid 13894's current affinity list: 0,1,3-9,17-24,26-33,41-47
|
|
Packit Service |
8a4b7a |
pid 13892's current affinity list: 0,1,3-9,17-24,26-33,41-47
|
|
Packit Service |
8a4b7a |
pid 13890's current affinity list: 0,1,3-9,17-24,26-33,41-47
|
|
Packit Service |
8a4b7a |
pid 13888's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
pid 13886's current affinity list: 0-47
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: App#2’s PID core affinity set to "Default" pool cores
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
REMOVE HP POOL
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Remove HP Pool (#7)
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/pools/7 -X DELETE --user admin:password -k
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
"POOL 7 deleted"
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Verify new configuration, get Pool#7 and all pools details
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/pools/7 -X GET --user admin:password -k
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"message": "POOL 7 not found in config"
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: Pool#7 not found
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/pools -X GET --user admin:password -k | jq –c
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
[{"id":0,
|
|
Packit Service |
8a4b7a |
"mba":50,
|
|
Packit Service |
8a4b7a |
"cbm":15,
|
|
Packit Service |
8a4b7a |
"name":"Default",
|
|
Packit Service |
8a4b7a |
"cores":[0,1,3,4,5,6,7,8,9,17,18,19,20,21,22,23,24,26,27,28,29,30,31,32,33,41,42,43,44,45,46,47],
|
|
Packit Service |
8a4b7a |
"apps":[1]}]
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: No Pool#7 listed
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
RESET CONFIGURATION
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Perform configuration reset.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/reset -X POST --user admin:password -k
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
"Reset performed. Configuration reloaded."
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Verify configuration after reset
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/apps -X GET --user admin:password -k
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
{
|
|
Packit Service |
8a4b7a |
"message": "No apps in config file"
|
|
Packit Service |
8a4b7a |
}
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: No Apps configured
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
curl https://localhost:5000/pools -X GET --user admin:password -k | jq –c
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
[{"id":0,
|
|
Packit Service |
8a4b7a |
"mba":100,
|
|
Packit Service |
8a4b7a |
"cbm":2047,
|
|
Packit Service |
8a4b7a |
"name":"Default",
|
|
Packit Service |
8a4b7a |
"cores":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47]}]
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: "Default" pool reconfigured, takes all cores (96),
|
|
Packit Service |
8a4b7a |
100% of MBA and full CAT CBM (all cache ways).
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
HOW TO GENERATE SELF-SIGNED SSL CERTIFICATE
|
|
Packit Service |
8a4b7a |
===========================================
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: just for example purposes, please obtain proper certificate !
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
It is needed to generate self-signed SSL certificate
|
|
Packit Service |
8a4b7a |
(e.g.: using the OpenSSL toolkit) to enable HTTPS connections.
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
To generate a self-signed SSL certificate using the OpenSSL, run:
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout appqos.key -out appqos.crt
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
NOTE: The filenames are hardcoded to "appqos.key" and "appqos.crt"
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
Legal Disclaimer
|
|
Packit Service |
8a4b7a |
================
|
|
Packit Service |
8a4b7a |
|
|
Packit Service |
8a4b7a |
THIS SOFTWARE IS PROVIDED BY INTEL"AS IS". NO LICENSE, EXPRESS OR
|
|
Packit Service |
8a4b7a |
IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS
|
|
Packit Service |
8a4b7a |
ARE GRANTED THROUGH USE. EXCEPT AS PROVIDED IN INTEL'S TERMS AND
|
|
Packit Service |
8a4b7a |
CONDITIONS OF SALE, INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL
|
|
Packit Service |
8a4b7a |
DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR
|
|
Packit Service |
8a4b7a |
USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO
|
|
Packit Service |
8a4b7a |
FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT
|
|
Packit Service |
8a4b7a |
OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
|