Automatic CPU pinning/affinity of instances

29 views
Skip to first unread message

darius.s...@rkt-online.com

unread,
Oct 14, 2018, 6:45:12 AM10/14/18
to ganeti
Hello Ansgar, hello all,

as promised (at Ganticon 2018) I send you a link where you can download my "current" cpu-pinning-hook (and other stuff) I use in production...



There you can find...

My "Shared-LVM" ext provider.

"raw-image" os template (modified version of https://sourceforge.net/projects/ganeti-os-defs)
- controls how many gnt-backups you wanna have.
- choose which disks you want to backup via gnt-backup > all, system, data.

Some patches for ganeti 2.15.2...
- Instance UUID support (export instance UUID and import it via gnt-backup - important for some licensing tools like codemeter)
- Prevent gnt-backup to delete any backups when making new ones.
  The number of backups are controlled by raw-image os template.
- Socat patch to disable SSL to speed up gnt-backup.
- Disable memory ballooning in the cluster.
- Decrease minVgSize to 8GB (otherwise xenvg needs 20GB at minimum)
- Add disk%d_vol, disk%d_vg, disk%d_params to gnt-backups config.ini.
  With this it could be possible to implement a "restore" function into gnt-backup. No need to export than import.

taskset Hook > automatic cpu pinning (you need numactl and taskset installed).
It checks how many numa nodes the host has and pins the instance to the node which has enough free cpus for it.
Otherwise it pins the instance to all cpus.
What it lacks: Take numa node "memory" into account (could be done with "migratepages" from numactl package).

Regards
Darius

darius.s...@rkt-online.com

unread,
Oct 20, 2018, 8:14:52 AM10/20/18
to ganeti
Ooops. I meant...

- Add disk%d_vol, disk%d_vg, disk%d_params to gnt-backups config.ini.
  With this it could be possible to implement a "restore" function into gnt-backup. No need to REMOVE than import.
Reply all
Reply to author
Forward
0 new messages