1

I am not a developer, and don't have enough experience with Linux. I am a data scientist and wants to know how to improve my performance using my CPUs better.

I have a linux VM with 2 physical CPUs, with 15 logical cores with two logical processors per core, (so 30 logical/virtual processors).

System information: With lsb release -a I get:

No LSB modules are available

Distributor ID: Ubuntu

Description: Ubuntu 18.04.4 LTS

Release 18.04

Code Name: bionic

From the website: how-to-determine-the-number-of-physical-cpus-on-linux I can understand that the amount of my virtual processors is greater than the number of my physical processors

According to the website, potentially, I can use Hyper-Threading.

I want to know if my kernel is configured as SMP so I can actually use Hyper-threading.

I have a 4.4.0-18362-Microsoft WSL kernel ( I used uname --all) which gives:

Linux hykindev03 4.4.0-18362-Microsoft #836-Microsoft Mon May 05 16:04:00 PST 220 x86_64 x86_64 x86_64 GNU/Linux

One way to get it is with the methods here: how-to-check-whether-smp-is-enabled-or-disabled-in-the-kernel

The problem is, I can't find the kernel config file, because it doesn't exist in /proc directory. I understand it should be in the kernel directory, but I also can't find it, it is not in /usr/src (and I don't have the kernels directory there neither) nor in /lib/modules.

Any help would be very much appreciated!

  • Normal Ubuntu linux-modules-${KVER} packages install a /boot/config-${KVER} file containing the kernel configuration. Is that also true for Ubuntu on WSL2? (Here, I'm using ${KVER} to represent the kernel version.) – Ian Abbott Jun 15 '20 at 13:21
  • I think for a non-SMP kernel, there will be no more than one CPU listed in /proc/cpuinfo or /sys/devices/system/cpu/. (The reverse is not necessarily true.) – Ian Abbott Jun 15 '20 at 13:44

0 Answers0