Up to Main Index                              Up to Journal for June, 2023

                     JOURNAL FOR SATURDAY 10TH JUNE, 2023
______________________________________________________________________________

SUBJECT: Back to school…
   DATE: Sat 10 Jun 19:36:00 BST 2023

This week has been a quite one for programming. Work decided to enrol me in a
“Developer School” for a no-code/low-code development tool they are adopting.

I’d already been using the tool for a month and it shows. The tool is Windows
based with everything being point and click. After grabbing a rodent for four
weeks any kind of typing feels odd, I’m slow and my hands ache :(

Developer school started, tutors introduced themselves and we were asked to do
the same. Afterwards a colleague I work with messaged me:


  The instructor was like “I’m an instructor for many years and know a lot”…

  You went on and said “I have 40 years and know loads… try to teach me now!”.

  Got him sweating!


It didn’t quite play out like that, but their comment made me smile :)

My new Alder Lake PC was still giving problems running KVM+QEMU and just would
not use more than 2 cores per virtual machine. Problem is now sorted.

To remind myself, and in case it helps anybody else, my final incantation is:


  taskset -c 2-7,12-15
  qemu-system-x86_64
  -accel kvm
  -drive id=disk,file=./disk.qcow2,if=virtio
  -cpu Skylake-Client-v4,vmx=on,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time
  -smp 8,sockets=1,cores=4,threads=2,maxcpus=8
  -m 16G
  -rtc base=localtime,clock=host
  -display vnc=127.0.0.2:0
  -device ahci,id=ahci
  -usb
  -device usb-tablet
  -netdev bridge,br=br0,id=n1
  -device virtio-net,netdev=n1


The above should all be on a single line. It runs Windows 10 with bridged
networking, a Virt I/O disk, KVM acceleration, 16Gb RAM and 8 CPU cores. The
taskset pins the VM to 5 performance cores each with 2 threads. This gives
KVM+QEMU some wiggle room to move between CPUs/threads. Using taskset also
keeps KVM+QEMU off of the efficiency cores. Windows 10 and KVM+QEMU hate to
run a mix of performance and efficiency cores…

The Alder Lake i9-12900T has 8 single threaded efficiency cores. I can switch
to using only efficiency cores via “takset -c 16-23”. I found performance
improves if it runs with a little wiggle room, allocating 6 CPUs each with one
thread “-smp 6,sockets=1,cores=6,threads=1,maxcpus=6” instead of 8 CPUs on the
performance cores.

To identify which are performance cores and which are efficiency cores I use:


    >lscpu --all --extended
    CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE    MAXMHZ   MINMHZ       MHZ
      0    0      0    0 0:0:0:0          yes 4800.0000 800.0000  800.0350
      1    0      0    0 0:0:0:0          yes 4800.0000 800.0000 1400.0000
      2    0      0    1 4:4:1:0          yes 4800.0000 800.0000 1400.0000
      3    0      0    1 4:4:1:0          yes 4800.0000 800.0000 1400.0000
      4    0      0    2 8:8:2:0          yes 4800.0000 800.0000 1400.0000
      5    0      0    2 8:8:2:0          yes 4800.0000 800.0000 1400.0000
      6    0      0    3 12:12:3:0        yes 4800.0000 800.0000  782.6210
      7    0      0    3 12:12:3:0        yes 4800.0000 800.0000 1400.0000
      8    0      0    4 16:16:4:0        yes 4900.0000 800.0000 1400.0000
      9    0      0    4 16:16:4:0        yes 4900.0000 800.0000 1400.0000
     10    0      0    5 20:20:5:0        yes 4900.0000 800.0000  849.0260
     11    0      0    5 20:20:5:0        yes 4900.0000 800.0000 1400.0000
     12    0      0    6 24:24:6:0        yes 4800.0000 800.0000 1400.0000
     13    0      0    6 24:24:6:0        yes 4800.0000 800.0000 1400.0000
     14    0      0    7 28:28:7:0        yes 4800.0000 800.0000 1400.0000
     15    0      0    7 28:28:7:0        yes 4800.0000 800.0000 1400.0000
     16    0      0    8 32:32:8:0        yes 3600.0000 800.0000 1400.0000
     17    0      0    9 33:33:8:0        yes 3600.0000 800.0000 1400.0000
     18    0      0   10 34:34:8:0        yes 3600.0000 800.0000 1400.0000
     19    0      0   11 35:35:8:0        yes 3600.0000 800.0000 1400.0000
     20    0      0   12 36:36:9:0        yes 3600.0000 800.0000 1400.0000
     21    0      0   13 37:37:9:0        yes 3600.0000 800.0000 1400.0000
     22    0      0   14 38:38:9:0        yes 3600.0000 800.0000 1400.0000
     23    0      0   15 39:39:9:0        yes 3600.0000 800.0000 1400.0000


Performance cores have two CPUs listed and clock upto @4.8/4.9GHz. Efficiency
cores have one CPU and clock upto 3.6GHz.

Running on the performance cores Windows 10 is nearly snappy, but the PC runs
hot and the very noisy fans keep spinning up. Using taskset with “2-7,12-15”
instead of “4-15” seems to help by avoiding the 4.9GHz cores. Running on the
efficiency cores performance is, obviously, noticeably lower but acceptable.
However, the PC runs a lot cooler with the fans hardly spinning up :)

I’ve still got a week of developer school to go with a certification exam at
the end — something else to add to my CV and wave at potential clients.

--
Diddymus


  Up to Main Index                              Up to Journal for June, 2023