shenango / caladan

Interference-aware CPU scheduling that enables performance isolation and high CPU utilization for datacenter servers
Apache License 2.0
117 stars 50 forks source link

pcm problem: Can not access server uncore PCI configuration space. #21

Open Ahnyeohn opened 1 week ago

Ahnyeohn commented 1 week ago

Hello, I'm having a problem running your code.

This is my server information:

Hardware

Intel(R) Xeon(R) W-2223 CPU, Connectx-6 NIC

OS&Kernel

Ubuntu 18.04 with kernel 5.2

iokerneld:

When I run the sudo ./iokerneld ias command, I get the following message:

CPU 01| <6> entering 'iokernel' init phase
CPU 01| <6> init -> base
CPU 01| <5> thread: created thread 0
CPU 01| <5> cpu: detected 8 cores, 1 nodes
CPU 01| <5> time: detected 3600 ticks / us
[  0.001183] CPU 01| <6> init -> ksched
[  0.001242] CPU 01| <6> init -> sched
[  0.001262] CPU 01| <5> sched: CPU configuration...
        node 0: [0,4][1,5][2,6][3,7]
[  0.001283] CPU 01| <5> sched: dataplane on 4, control on 0
[  0.001291] CPU 01| <6> init -> simple
[  0.001301] CPU 01| <6> init -> numa
[  0.001309] CPU 01| <6> init -> ias

=====  Processor information  =====
Linux arch_perfmon flag  : yes
Hybrid processor         : no
IBRS and IBPB supported  : yes
STIBP supported          : yes
Spec arch caps supported : yes
Max CPUID level          : 22
CPU model number         : 85
IBRS enabled in the kernel   : yes
STIBP enabled in the kernel  : no
The processor is not susceptible to Rogue Data Cache Load: yes
The processor supports enhanced IBRS                     : yes
mmap failed: errno is 22
Can not access server uncore PCI configuration space. Access to uncore counters (memory and QPI bandwidth) is disabled.
You must be root to access server uncore counters in PCM.
Initializing RMIDs
terminate called after throwing an instance of 'std::out_of_range'
  what():  vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
Aborted

Why am I getting the following error even though I am already running as root? My server is using a Xeon cpu, so I don't think there is a hardware issue.

joshuafried commented 1 week ago

Hi, sorry you are having problems with this. What type of server/machine are you running on? If you don't care about using Caladan's memory bandwidth controller, you can just disable it by using this command: 'sudo ./iokerneld ias nobw'

Ahnyeohn commented 1 week ago

It's just a physical server (not a virtual instance like AWS). It works fine when using the nobw option, but I'd like to try out the memory controller feature, is there any workaround? I separately installed pcm on my server and ran pcm-memory and it worked fine, so I don't think it's a hardware issue.

joshuafried commented 1 week ago

In your clean build, PCM may be using a different interface to access the performance counters. We need to directly access the PCI configuration space using /dev/mem to read the counters. What is the model of your server?

Ahnyeohn commented 1 week ago

my server model is : 30BES2C300 (Manufacturer: [Lenovo] (https://www.lenovo.com/)) and this is information about my server:

스크린샷(321)