generic
resource
manager
András KovÁcs (Andras.kovacs@ericsson.com)
LászlÓ Vadkerti (laszlo.vadkerti@Ericsson.com)
A manager we would like :)
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 2
Last year…
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 3
by merriam-webster:
› something that a country has and can use to increase its wealth
› a supply of something (such as money) that someone has and can use
when it is needed
› a place or thing that provides something useful
by wikipedia (computing):
› A resource, or system resource, is any physical or virtual
component of limited availability within a computer system. [...]
Every internal system component is a resource. […].
What is a resource?
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 4
› CPU
› Memory (hugepage, cache, ivshm, memzone)
› Virtual address
› Packet pool
› Network/Virtual Device (port/queue)
› Lcore
› Instance
› HW accelerator
› And there are lots of other resources coming… (threads,
protocol stacks, etc)
typical dpdk
resources
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 5
› Better control over resources
› Hide “real” environment from applications
› Support migration
› Keep track of resources/usage (High Availability)
› Prioritize resources
› Access control
› Avoid code duplication
Why?
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 6
› Resource pools (resources with similar attributes) e.g.
Servers -> Compute nodes -> Virtual Machines -> CPU/memory/interface/lcore/pktpool
Resource pools
MEM
CPU
I/F
CPU CPU CPU CPU CPU
CPU CPU CPU CPU CPU
CPU CPU CPU CPU CPU
CPU CPU CPU CPU CPU
CPU CPU CPU CPU CPU
CPU
CPU
CPU
CPU
CPU
CPU CPU CPU CPU CPU CPU
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 7
MEM
CPU
MEM
CPU
MEM
CPU
I/F
› Resource pools (resources with similar attributes) e.g.
Servers -> Compute nodes -> Virtual Machines -> CPU/memory/interface/lcore/pktpool
Resource pools
CPU CPU
CPU CPU
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 8
MEM
CPU
MEM
CPU
MEM
CPU
I/F
› Resource pools (resources with similar attributes) e.g.
Servers -> Compute nodes -> Virtual Machines -> CPU/memory/interface/lcore/pktpool
Resource pools
CPU
CPU
attribute 1
attribute 2
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 9
› cpualias foreground {
› cpumask = "2"
› }
› pktpool pktpool_fg {
› cpualias = foreground
› num_pkts = 8K
› num_cached_pkts = 64
› }
Config EXAMPLE
PKT
POOL
CPU
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 10
› cpualias foreground {
› cpumask = "2,12"
› }
› pktpool pktpool_fg {
› cpualias = foreground
› num_pkts = 8K
› num_cached_pkts = 64
› }
Config EXAMPLE
PKT
POOL
CPU CPU
S1S0
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 11
› cpualias foreground {
› cpumask = "2,12"
› }
› pktpool pktpool_fg {
› cpualias = foreground
› num_pkts = 8K
› num_cached_pkts = 64
type = numa
› }
Config EXAMPLE
S1S0
PKT
POOL
PKT
POOL
CPU CPU
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 12
› cpualias foreground {
› cpumask = "2,4,12,14"
› }
› pktpool pktpool_fg {
› cpualias = foreground
› num_pkts = 8K
› num_cached_pkts = 64
type = numa
› }
Config EXAMPLE
S1S0
PKT
POOL
PKT
POOL
CPU CPU
CPUCPU
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 13
› cpualias foreground {
› cpumask = "2,4,12,14"
› }
› pktpool pktpool_fg {
› cpualias = foreground
› num_pkts = 8K
› num_cached_pkts = 64
type = exclusive
› }
Config EXAMPLE
PKT
POOL
S1S0
PKT
POOL
PKT
POOL
PKT
POOL
CPU CPU
CPUCPU
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 14
› resource allocation (static or on-demand)
› chain of pools in case of dynamic allocation (example)
RESOURCE allocation
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 16
› e.g. a native workstation with 4 sockets, memory,
interfaces.
› resmgr starts, autodetects (CPUs, HT siblings, cache sizes,
etc) every resources we can use.
› resmgr: daemon/binary/library
› reading configuration and creating a free resource
database (our choice is xattr)
› supporting popup cpu, memory, interface, etc
› linking/referencing resources (cpu table, HT table, NUMA,
L3 cache (CAT/cache QoS), etc)
RESMGR at work
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 17
› Is the relation between virtual ports, virtual queues and
named packet pools. Somewhat similar to pipeline model
configuration.
packet domain
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 18
› Allocating resources
› Per-application configuration
› Application instances see only assigned resources (like a
VM)
DPDK DOMAIN
(APPlication DOMAIN)
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 19
existing Memory
management example
process1
process2
1G
1G
1G
1G
1G
1G
1G
1G
DPDK memory
DPDK
socket
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 20
› Simple memory management API
› Transparent NUMA awareness for applications
– Even in a non-NUMA aware guest VM environment
› Flexible, configuration, re-configuration
› Provide a more granular way of placing objects in memory
– e.g. to control the number of TLB cache entry usage
› Memory partitioning
– Physically contiguous memory, hugepages etc.
– Partitioning across application instances
– Shared memory support
memory management
goals
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 21
› Named and indexed memory partition (shared memory)
with defined properties such as
– Location, e.g. NUMA node(s)
– Size of partition, e.g. 4GB/1G, 512MB/2M hugepages
– Physical contiguity
– Type (future improvement), e.g.
› Hugepage memory (only possible type today)
› Mmap-ped file
› Inter-vm shared memory
› Distributed memory
› etc.
what is a memdomain?
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 22
› Is a pool of shared memory resources (memdomains)
› Is a named group of memory partitions with different
location attributes
› Three main types
– DEFAULT
› No location preference, only a single memdomain in the pool
– NUMA
› One memdomain per involved NUMA node
– EXCLUSIVE
› One memdomain per application instance
what is a memdomain
pool?
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 23
MEMDOMAIN
Configuration
› Can be compared to partitioning a hard drive where
– Available hugepage memory is the hard drive,
e.g. one drive per NUMA node
– Memdomains can be compared to disk partitions
– Memzones can be compared to files
› Should be a system engineering task to find the best model
working for the specific application model
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 24
MEMDOMAIN Simple
Application API
› Initialize library (oai_memcfg_libinit)
– Register a unique name to the process (High Availability, debug)
– Initializes DPDK memory, grabs hugepages etc.
› Attach to named memory partition (oai_memcfg_attach)
– Using pre-configured memdomain pool name
– Automatic memdomain selection from pool (per instance, NUMA)
– Maps memdomain (memzones) into virtual address space
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 25
MEMDOMAIN
ConfiguratioN EXAMPLE
CPUALIAS
cpualias all {
cpumask = "0-31" # all available CPU
}
CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU
CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 26
MEMDOMAIN
ConfiguratioN EXAMPLE
CPUALIAS
cpualias all {
cpumask = "0-31" # all available CPU
}
cpualias foreground {
cpumask = "2-31:2" # even cpus excluding cpu0
}
CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU
CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 27
MEMDOMAIN
CONFIGURATION EXAMPLE
DEFAULT TYPE
# -------------------------------
# Shared memory accessed by
# all instances
# -------------------------------
memdomain App_Shared_Memory {
type = default
cpualias = "all"
alloc_memzone = true
size {
huge_2M = 512M
huge_1G = 0
}
}
Instance1
S1S0
MEM
DOMAIN
Instance2
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 28
memdomain API ATTACH
EXAMPLE
DEFAULT TYPE
Instance1:
- oai_memcfg_libinit(“AppProcess1”);
- addr1 = oai_memcfg_attach(“App_Shared_Memory”,
OAI_MEMCFG_MD_INDEX_AUTO,
&len,
OAI_MEMCFG_MZ_FLAGS_NONE);
Instance2:
- oai_memcfg_libinit(“AppProcess2”);
- addr2 = oai_memcfg_attach(“App_Shared_Memory”,
OAI_MEMCFG_MD_INDEX_AUTO,
&len,
OAI_MEMCFG_MZ_FLAGS_NONE);
› Explanation:
– addr1 in process1 will point to the same memory as addr2 in process2
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 29
MEMDOMAIN
CONFIGURATION EXAMPLE
NUMA TYPE
# ----------------------------------------
# Per NUMA node shared memory.
# App instances tied to the same NUMA
# are sharing the same memory partition.
# ----------------------------------------
memdomain App_NUMA_Shared {
type = numa
cpualias = "all"
alloc_memzone = true
size {
is_per_numa = true
huge_2M = 0
huge_1G = 1G
}
}
Instance1
S1S0
MEM
DOMAIN
MEM
DOMAIN
Instance2
Instance3
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 30
memdomain API ATTACH
EXAMPLE
NUMA TYPE
Instance1:
- oai_memcfg_libinit(“AppProcess1”);
- pin to vcpu on numa node0 (lcore_assign, pktpthread_setaffinity_np)
- addr1 = oai_memcfg_attach(“App_NUMA_Shared”,
OAI_MEMCFG_MD_INDEX_AUTO,
&len,
OAI_MEMCFG_MZ_FLAGS_NONE);
Instance2:
- oai_memcfg_libinit(“AppProcess2”);
- pin to vcpu on numa node1 (lcore_assign, pktpthread_setaffinity_np)
- addr2 = oai_memcfg_attach(“App_NUMA_Shared”,
OAI_MEMCFG_MD_INDEX_AUTO,
&len,
OAI_MEMCFG_MZ_FLAGS_NONE);
Instance3:
- oai_memcfg_libinit(“AppProcess3”);
- pin to vcpu on numa node1 (lcore_assign, pktpthread_setaffinity_np)
- addr3 = oai_memcfg_attach(“App_NUMA_Shared”,
OAI_MEMCFG_MD_INDEX_AUTO,
&len,
OAI_MEMCFG_MZ_FLAGS_NONE);
› Explanation:
– addr1 in instance1 will point to the partition allocated in NUMA node0 while
addr2 in instance2 and addr3 in instance3 will point to the same partition allocated in NUMA
node1
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 31
memdomain
CONFIGURATION EXAMPLE
EXCLUSIVE TYPE
# -----------------------------------
# Per App instance private memory.
# Every instance has its own memory
# partition.
# -----------------------------------
memdomain App_Thread_Local {
type = excl
cpualias = "foreground"
alloc_memzone = true
size {
is_per_cpu = true
huge_2M = 0
huge_1G = 1G
}
}
Instance1
S1S0
MEM
DOMAIN
MEM
DOMAIN
MEM
DOMAIN
Instance2
instance3
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 32
memdomain API ATTACH
EXAMPLE
EXCLUSIVE TYPE
Instance1:
- oai_memcfg_libinit(“AppProcess1”);
- pin to vcpu2 on numa node0 (lcore_assign, pktpthread_setaffinity_np)
- addr1 = oai_memcfg_attach(“App_Thread_Local”,
OAI_MEMCFG_MD_INDEX_AUTO,
&len,
OAI_MEMCFG_MZ_FLAGS_NONE);
Instance2:
- oai_memcfg_libinit(“AppProcess2”);
- pin to vcpu16 on numa node1 (lcore_assign, pktpthread_setaffinity_np)
- addr2 = oai_memcfg_attach(“App_Thread_Local”,
OAI_MEMCFG_MD_INDEX_AUTO,
&len,
OAI_MEMCFG_MZ_FLAGS_NONE);
Instance3:
- oai_memcfg_libinit(“AppProcess3”);
- pin to vcpu18 on numa node1 (lcore_assign, pktpthread_setaffinity_np)
- addr3 = oai_memcfg_attach(“App_Thread_Local”,
OAI_MEMCFG_MD_INDEX_AUTO,
&len,
OAI_MEMCFG_MZ_FLAGS_NONE);
› Explanation:
– Addr1, addr2 and addr3 will point to different memory addresses
– addr1 allocated on NUMA node0 while addr2 and addr3 allocated on NUMA node1
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 33
Advanced MEMCFG API
› Create memdomain pools in a transaction
– Creating a pool of memory partitions
(partitions are auto aligned based on user's location or requested
layout)
– Creating multiple memdomain pools in a transaction allows better
placement (e.g. prioritizing physically contiguous memory)
› Attach to memdomain (memory partition)
– Attach by memdomain name and index, returning md handle
(index could be auto if instance location is known e.g. by lcoreid)
– Could also MMAP whole partition into virtual address space
› Get number of memory partitions in a memdomain pool
– Allows attaching to all partitions by index within a pool
e.g. for per NUMA table replication
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 34
Advanced MEMCFG API
› Reserve named memzones by memdomain handle
– Memzone name must only be unique within the memdomain,
same name can be used in another memdomain
e.g. it allows attaching to replicas using the same name
– supports fragments if physical contiguity is not requested
(virtually cont)
› Lookup memzone by memdomain handle
– Looks up memzone within a memdomain returning mz handle
› Attach to memzone by memzone handle
– Attaches to a memzone, e.g. mapping into requested/reserved
virtual address space as readonly/readwrite
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 35
Memdomain example
process1
process2
1G
1G
1G
1G
1G
1G
1G
1G
DPDK memory
memory
partition
1
memory
partition
2
Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 36
› Support non-DPDK applications
› Memory types for rte_malloc
› DPDK certification (for VM or hardware)
› GUI or config file for dpdk startup
parameters (RESMGR config alternative)
› Visual resource allocator (GParted style)
› DPDK OS / DPDK distro
› standby instances
› NEW emulated QEMU device
Future ideas
Generic Resource Manager - László Vadkerti, András Kovács

More Related Content

PDF
DPDK Integration: A Product's Journey - Roger B. Melton
PDF
DPDK Summit - 08 Sept 2014 - Ericsson - A Multi-Socket Ferrari for NFV
PDF
Hyperscan - Mohammad Abdul Awal
PDF
DPDK Architecture Musings - Andy Harvey
PDF
Hotplug and Virtio - Tetsuya Mukawa
PDF
OpenDataPlane - Bill Fischofer
PDF
Cloud Networking Trends
PPTX
Symmetric Crypto for DPDK - Declan Doherty
DPDK Integration: A Product's Journey - Roger B. Melton
DPDK Summit - 08 Sept 2014 - Ericsson - A Multi-Socket Ferrari for NFV
Hyperscan - Mohammad Abdul Awal
DPDK Architecture Musings - Andy Harvey
Hotplug and Virtio - Tetsuya Mukawa
OpenDataPlane - Bill Fischofer
Cloud Networking Trends
Symmetric Crypto for DPDK - Declan Doherty

What's hot (20)

PDF
FD.io - The Universal Dataplane
PDF
DPDK Summit 2015 - Sprint - Arun Rajagopal
PDF
LF_DPDK17_Implementation and Testing of Soft Patch Panel
PDF
Inside Microsoft's FPGA-Based Configurable Cloud
PDF
Fast datastacks - fast and flexible nfv solution stacks leveraging fd.io
PDF
ODSA Use Case - SmartNIC
PDF
Dpdk Validation - Liu, Yong
PDF
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
PPTX
TLDK - FD.io Sept 2016
PDF
LF_DPDK17_mediated devices: better userland IO
PPTX
Netsft2017 day in_life_of_nfv
PDF
DPDK Summit 2015 - Aspera - Charles Shiflett
PDF
Advanced Traffic Engineering (TE++)
PPTX
Building a Router
PDF
Tungsten Fabric Overview
PDF
OVS and DPDK - T.F. Herbert, K. Traynor, M. Gray
PPTX
The Need for Complex Analytics from Forwarding Pipelines
PDF
Performance challenges in software networking
PPTX
DPDK IPSec performance benchmark ~ Georgii Tkachuk
PDF
LF_DPDK17_Accelerating NFV with VMware's Enhanced Network Stack (ENS) and Int...
FD.io - The Universal Dataplane
DPDK Summit 2015 - Sprint - Arun Rajagopal
LF_DPDK17_Implementation and Testing of Soft Patch Panel
Inside Microsoft's FPGA-Based Configurable Cloud
Fast datastacks - fast and flexible nfv solution stacks leveraging fd.io
ODSA Use Case - SmartNIC
Dpdk Validation - Liu, Yong
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
TLDK - FD.io Sept 2016
LF_DPDK17_mediated devices: better userland IO
Netsft2017 day in_life_of_nfv
DPDK Summit 2015 - Aspera - Charles Shiflett
Advanced Traffic Engineering (TE++)
Building a Router
Tungsten Fabric Overview
OVS and DPDK - T.F. Herbert, K. Traynor, M. Gray
The Need for Complex Analytics from Forwarding Pipelines
Performance challenges in software networking
DPDK IPSec performance benchmark ~ Georgii Tkachuk
LF_DPDK17_Accelerating NFV with VMware's Enhanced Network Stack (ENS) and Int...
Ad

Similar to Generic Resource Manager - László Vadkerti, András Kovács (20)

PPTX
Emc vspex customer_presentation_private_cloud_virtualized_share_point
PDF
Elastify Cloud-Native Spark Application with Persistent Memory
PDF
Volatile Uses for Persistent Memory
PDF
Srm suite technical presentation nrm - tim piqueur
PPTX
Emc data domain technical deep dive workshop
PPTX
Optimize DR and Cloning with Logical Hostnames in Oracle E-Business Suite (OA...
PPTX
NetBackup Appliance Family presentation
PDF
MIG 5th Data Centre Summit 2016 PTS Presentation v1
PDF
TECHNICAL BRIEF▶ Backup Exec 15 Blueprint for Large Installations
PDF
BMC: Bare Metal Container @Open Source Summit Japan 2017
PPTX
Emc sql server 2012 overview
PDF
Transforming Mission Critical Applications
PPTX
Pro sphere customer technical
PPTX
EMC Vmax3 tech-deck deep dive
PDF
Memory-Driven Near-Data Acceleration and its application to DOME/SKA
PDF
Accelerating SDN/NFV with transparent offloading architecture
PDF
NGD Systems and Microsoft Keynote Presentation at IPDPS MPP in Vacouver
PPTX
Diablo Memory Channel Flash Podcast
PPTX
CtrlS: Cloud Solutions for Retail & eCommerce
PDF
”Bare-Metal Container" presented at HPCC2016
Emc vspex customer_presentation_private_cloud_virtualized_share_point
Elastify Cloud-Native Spark Application with Persistent Memory
Volatile Uses for Persistent Memory
Srm suite technical presentation nrm - tim piqueur
Emc data domain technical deep dive workshop
Optimize DR and Cloning with Logical Hostnames in Oracle E-Business Suite (OA...
NetBackup Appliance Family presentation
MIG 5th Data Centre Summit 2016 PTS Presentation v1
TECHNICAL BRIEF▶ Backup Exec 15 Blueprint for Large Installations
BMC: Bare Metal Container @Open Source Summit Japan 2017
Emc sql server 2012 overview
Transforming Mission Critical Applications
Pro sphere customer technical
EMC Vmax3 tech-deck deep dive
Memory-Driven Near-Data Acceleration and its application to DOME/SKA
Accelerating SDN/NFV with transparent offloading architecture
NGD Systems and Microsoft Keynote Presentation at IPDPS MPP in Vacouver
Diablo Memory Channel Flash Podcast
CtrlS: Cloud Solutions for Retail & eCommerce
”Bare-Metal Container" presented at HPCC2016
Ad

Recently uploaded (20)

PPTX
SGT Report The Beast Plan and Cyberphysical Systems of Control
PDF
A symptom-driven medical diagnosis support model based on machine learning te...
PPTX
Build automations faster and more reliably with UiPath ScreenPlay
PDF
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
Advancing precision in air quality forecasting through machine learning integ...
PPTX
agenticai-neweraofintelligence-250529192801-1b5e6870.pptx
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
Ensemble model-based arrhythmia classification with local interpretable model...
PDF
Introduction to MCP and A2A Protocols: Enabling Agent Communication
PPTX
Module 1 Introduction to Web Programming .pptx
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PDF
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
PDF
EIS-Webinar-Regulated-Industries-2025-08.pdf
PDF
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
SGT Report The Beast Plan and Cyberphysical Systems of Control
A symptom-driven medical diagnosis support model based on machine learning te...
Build automations faster and more reliably with UiPath ScreenPlay
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
NewMind AI Weekly Chronicles – August ’25 Week IV
Advancing precision in air quality forecasting through machine learning integ...
agenticai-neweraofintelligence-250529192801-1b5e6870.pptx
giants, standing on the shoulders of - by Daniel Stenberg
Early detection and classification of bone marrow changes in lumbar vertebrae...
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
Lung cancer patients survival prediction using outlier detection and optimize...
Ensemble model-based arrhythmia classification with local interpretable model...
Introduction to MCP and A2A Protocols: Enabling Agent Communication
Module 1 Introduction to Web Programming .pptx
Data Virtualization in Action: Scaling APIs and Apps with FME
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
EIS-Webinar-Regulated-Industries-2025-08.pdf
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj

Generic Resource Manager - László Vadkerti, András Kovács

  • 2. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 2 Last year…
  • 3. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 3 by merriam-webster: › something that a country has and can use to increase its wealth › a supply of something (such as money) that someone has and can use when it is needed › a place or thing that provides something useful by wikipedia (computing): › A resource, or system resource, is any physical or virtual component of limited availability within a computer system. [...] Every internal system component is a resource. […]. What is a resource?
  • 4. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 4 › CPU › Memory (hugepage, cache, ivshm, memzone) › Virtual address › Packet pool › Network/Virtual Device (port/queue) › Lcore › Instance › HW accelerator › And there are lots of other resources coming… (threads, protocol stacks, etc) typical dpdk resources
  • 5. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 5 › Better control over resources › Hide “real” environment from applications › Support migration › Keep track of resources/usage (High Availability) › Prioritize resources › Access control › Avoid code duplication Why?
  • 6. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 6 › Resource pools (resources with similar attributes) e.g. Servers -> Compute nodes -> Virtual Machines -> CPU/memory/interface/lcore/pktpool Resource pools MEM CPU I/F CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU
  • 7. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 7 MEM CPU MEM CPU MEM CPU I/F › Resource pools (resources with similar attributes) e.g. Servers -> Compute nodes -> Virtual Machines -> CPU/memory/interface/lcore/pktpool Resource pools CPU CPU CPU CPU
  • 8. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 8 MEM CPU MEM CPU MEM CPU I/F › Resource pools (resources with similar attributes) e.g. Servers -> Compute nodes -> Virtual Machines -> CPU/memory/interface/lcore/pktpool Resource pools CPU CPU attribute 1 attribute 2
  • 9. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 9 › cpualias foreground { › cpumask = "2" › } › pktpool pktpool_fg { › cpualias = foreground › num_pkts = 8K › num_cached_pkts = 64 › } Config EXAMPLE PKT POOL CPU
  • 10. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 10 › cpualias foreground { › cpumask = "2,12" › } › pktpool pktpool_fg { › cpualias = foreground › num_pkts = 8K › num_cached_pkts = 64 › } Config EXAMPLE PKT POOL CPU CPU S1S0
  • 11. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 11 › cpualias foreground { › cpumask = "2,12" › } › pktpool pktpool_fg { › cpualias = foreground › num_pkts = 8K › num_cached_pkts = 64 type = numa › } Config EXAMPLE S1S0 PKT POOL PKT POOL CPU CPU
  • 12. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 12 › cpualias foreground { › cpumask = "2,4,12,14" › } › pktpool pktpool_fg { › cpualias = foreground › num_pkts = 8K › num_cached_pkts = 64 type = numa › } Config EXAMPLE S1S0 PKT POOL PKT POOL CPU CPU CPUCPU
  • 13. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 13 › cpualias foreground { › cpumask = "2,4,12,14" › } › pktpool pktpool_fg { › cpualias = foreground › num_pkts = 8K › num_cached_pkts = 64 type = exclusive › } Config EXAMPLE PKT POOL S1S0 PKT POOL PKT POOL PKT POOL CPU CPU CPUCPU
  • 14. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 14 › resource allocation (static or on-demand) › chain of pools in case of dynamic allocation (example) RESOURCE allocation
  • 15. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 16 › e.g. a native workstation with 4 sockets, memory, interfaces. › resmgr starts, autodetects (CPUs, HT siblings, cache sizes, etc) every resources we can use. › resmgr: daemon/binary/library › reading configuration and creating a free resource database (our choice is xattr) › supporting popup cpu, memory, interface, etc › linking/referencing resources (cpu table, HT table, NUMA, L3 cache (CAT/cache QoS), etc) RESMGR at work
  • 16. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 17 › Is the relation between virtual ports, virtual queues and named packet pools. Somewhat similar to pipeline model configuration. packet domain
  • 17. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 18 › Allocating resources › Per-application configuration › Application instances see only assigned resources (like a VM) DPDK DOMAIN (APPlication DOMAIN)
  • 18. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 19 existing Memory management example process1 process2 1G 1G 1G 1G 1G 1G 1G 1G DPDK memory DPDK socket
  • 19. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 20 › Simple memory management API › Transparent NUMA awareness for applications – Even in a non-NUMA aware guest VM environment › Flexible, configuration, re-configuration › Provide a more granular way of placing objects in memory – e.g. to control the number of TLB cache entry usage › Memory partitioning – Physically contiguous memory, hugepages etc. – Partitioning across application instances – Shared memory support memory management goals
  • 20. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 21 › Named and indexed memory partition (shared memory) with defined properties such as – Location, e.g. NUMA node(s) – Size of partition, e.g. 4GB/1G, 512MB/2M hugepages – Physical contiguity – Type (future improvement), e.g. › Hugepage memory (only possible type today) › Mmap-ped file › Inter-vm shared memory › Distributed memory › etc. what is a memdomain?
  • 21. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 22 › Is a pool of shared memory resources (memdomains) › Is a named group of memory partitions with different location attributes › Three main types – DEFAULT › No location preference, only a single memdomain in the pool – NUMA › One memdomain per involved NUMA node – EXCLUSIVE › One memdomain per application instance what is a memdomain pool?
  • 22. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 23 MEMDOMAIN Configuration › Can be compared to partitioning a hard drive where – Available hugepage memory is the hard drive, e.g. one drive per NUMA node – Memdomains can be compared to disk partitions – Memzones can be compared to files › Should be a system engineering task to find the best model working for the specific application model
  • 23. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 24 MEMDOMAIN Simple Application API › Initialize library (oai_memcfg_libinit) – Register a unique name to the process (High Availability, debug) – Initializes DPDK memory, grabs hugepages etc. › Attach to named memory partition (oai_memcfg_attach) – Using pre-configured memdomain pool name – Automatic memdomain selection from pool (per instance, NUMA) – Maps memdomain (memzones) into virtual address space
  • 24. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 25 MEMDOMAIN ConfiguratioN EXAMPLE CPUALIAS cpualias all { cpumask = "0-31" # all available CPU } CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU
  • 25. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 26 MEMDOMAIN ConfiguratioN EXAMPLE CPUALIAS cpualias all { cpumask = "0-31" # all available CPU } cpualias foreground { cpumask = "2-31:2" # even cpus excluding cpu0 } CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU CPU
  • 26. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 27 MEMDOMAIN CONFIGURATION EXAMPLE DEFAULT TYPE # ------------------------------- # Shared memory accessed by # all instances # ------------------------------- memdomain App_Shared_Memory { type = default cpualias = "all" alloc_memzone = true size { huge_2M = 512M huge_1G = 0 } } Instance1 S1S0 MEM DOMAIN Instance2
  • 27. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 28 memdomain API ATTACH EXAMPLE DEFAULT TYPE Instance1: - oai_memcfg_libinit(“AppProcess1”); - addr1 = oai_memcfg_attach(“App_Shared_Memory”, OAI_MEMCFG_MD_INDEX_AUTO, &len, OAI_MEMCFG_MZ_FLAGS_NONE); Instance2: - oai_memcfg_libinit(“AppProcess2”); - addr2 = oai_memcfg_attach(“App_Shared_Memory”, OAI_MEMCFG_MD_INDEX_AUTO, &len, OAI_MEMCFG_MZ_FLAGS_NONE); › Explanation: – addr1 in process1 will point to the same memory as addr2 in process2
  • 28. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 29 MEMDOMAIN CONFIGURATION EXAMPLE NUMA TYPE # ---------------------------------------- # Per NUMA node shared memory. # App instances tied to the same NUMA # are sharing the same memory partition. # ---------------------------------------- memdomain App_NUMA_Shared { type = numa cpualias = "all" alloc_memzone = true size { is_per_numa = true huge_2M = 0 huge_1G = 1G } } Instance1 S1S0 MEM DOMAIN MEM DOMAIN Instance2 Instance3
  • 29. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 30 memdomain API ATTACH EXAMPLE NUMA TYPE Instance1: - oai_memcfg_libinit(“AppProcess1”); - pin to vcpu on numa node0 (lcore_assign, pktpthread_setaffinity_np) - addr1 = oai_memcfg_attach(“App_NUMA_Shared”, OAI_MEMCFG_MD_INDEX_AUTO, &len, OAI_MEMCFG_MZ_FLAGS_NONE); Instance2: - oai_memcfg_libinit(“AppProcess2”); - pin to vcpu on numa node1 (lcore_assign, pktpthread_setaffinity_np) - addr2 = oai_memcfg_attach(“App_NUMA_Shared”, OAI_MEMCFG_MD_INDEX_AUTO, &len, OAI_MEMCFG_MZ_FLAGS_NONE); Instance3: - oai_memcfg_libinit(“AppProcess3”); - pin to vcpu on numa node1 (lcore_assign, pktpthread_setaffinity_np) - addr3 = oai_memcfg_attach(“App_NUMA_Shared”, OAI_MEMCFG_MD_INDEX_AUTO, &len, OAI_MEMCFG_MZ_FLAGS_NONE); › Explanation: – addr1 in instance1 will point to the partition allocated in NUMA node0 while addr2 in instance2 and addr3 in instance3 will point to the same partition allocated in NUMA node1
  • 30. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 31 memdomain CONFIGURATION EXAMPLE EXCLUSIVE TYPE # ----------------------------------- # Per App instance private memory. # Every instance has its own memory # partition. # ----------------------------------- memdomain App_Thread_Local { type = excl cpualias = "foreground" alloc_memzone = true size { is_per_cpu = true huge_2M = 0 huge_1G = 1G } } Instance1 S1S0 MEM DOMAIN MEM DOMAIN MEM DOMAIN Instance2 instance3
  • 31. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 32 memdomain API ATTACH EXAMPLE EXCLUSIVE TYPE Instance1: - oai_memcfg_libinit(“AppProcess1”); - pin to vcpu2 on numa node0 (lcore_assign, pktpthread_setaffinity_np) - addr1 = oai_memcfg_attach(“App_Thread_Local”, OAI_MEMCFG_MD_INDEX_AUTO, &len, OAI_MEMCFG_MZ_FLAGS_NONE); Instance2: - oai_memcfg_libinit(“AppProcess2”); - pin to vcpu16 on numa node1 (lcore_assign, pktpthread_setaffinity_np) - addr2 = oai_memcfg_attach(“App_Thread_Local”, OAI_MEMCFG_MD_INDEX_AUTO, &len, OAI_MEMCFG_MZ_FLAGS_NONE); Instance3: - oai_memcfg_libinit(“AppProcess3”); - pin to vcpu18 on numa node1 (lcore_assign, pktpthread_setaffinity_np) - addr3 = oai_memcfg_attach(“App_Thread_Local”, OAI_MEMCFG_MD_INDEX_AUTO, &len, OAI_MEMCFG_MZ_FLAGS_NONE); › Explanation: – Addr1, addr2 and addr3 will point to different memory addresses – addr1 allocated on NUMA node0 while addr2 and addr3 allocated on NUMA node1
  • 32. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 33 Advanced MEMCFG API › Create memdomain pools in a transaction – Creating a pool of memory partitions (partitions are auto aligned based on user's location or requested layout) – Creating multiple memdomain pools in a transaction allows better placement (e.g. prioritizing physically contiguous memory) › Attach to memdomain (memory partition) – Attach by memdomain name and index, returning md handle (index could be auto if instance location is known e.g. by lcoreid) – Could also MMAP whole partition into virtual address space › Get number of memory partitions in a memdomain pool – Allows attaching to all partitions by index within a pool e.g. for per NUMA table replication
  • 33. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 34 Advanced MEMCFG API › Reserve named memzones by memdomain handle – Memzone name must only be unique within the memdomain, same name can be used in another memdomain e.g. it allows attaching to replicas using the same name – supports fragments if physical contiguity is not requested (virtually cont) › Lookup memzone by memdomain handle – Looks up memzone within a memdomain returning mz handle › Attach to memzone by memzone handle – Attaches to a memzone, e.g. mapping into requested/reserved virtual address space as readonly/readwrite
  • 34. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 35 Memdomain example process1 process2 1G 1G 1G 1G 1G 1G 1G 1G DPDK memory memory partition 1 memory partition 2
  • 35. Generic resource manager for DPDK | Public | © Ericsson AB 2015 | 2015-09-29 | Page 36 › Support non-DPDK applications › Memory types for rte_malloc › DPDK certification (for VM or hardware) › GUI or config file for dpdk startup parameters (RESMGR config alternative) › Visual resource allocator (GParted style) › DPDK OS / DPDK distro › standby instances › NEW emulated QEMU device Future ideas