Public bug reported: In one of my working unit (service), I try to toggle the MemoryKSM boolean setting.
Using any of: MemoryKSM=yes MemoryKSM=on MemoryKSM=true MemoryKSM=1 Results in: Sep 19 16:16:56 systemd[1]: Started XXX.service - XXX service. Sep 19 16:16:56 (e_server)[4487]: XXX.service: Failed to set KSM: Invalid argument Sep 19 16:16:56 systemd[1]: XXX.service: Main process exited, code=exited, status=245/KSM Sep 19 16:16:56 systemd[1]: XXX.service: Failed with result 'exit-code'. The following lines allow the service to start: MemoryKSM="yes" MemoryKSM="on" MemoryKSM="true" MemoryKSM="1" but still, MemoryKSM stays off: # systemctl show XXX.service | grep MemoryKSM MemoryKSM=no KSM is activated in my running kernel: # cat /boot/config-$(uname -r) | grep KSM CONFIG_KSM=y Using prctl (libc6 2.39-0ubuntu8.3) to toggle KSM inside a running process also works. I can read and set the memory_merge switch. ProblemType: Bug DistroRelease: Ubuntu 24.04 Package: systemd 255.4-1ubuntu8.4 ProcVersionSignature: Ubuntu 6.8.0-45.45-generic 6.8.12 Uname: Linux 6.8.0-45-generic x86_64 ApportVersion: 2.28.1-0ubuntu3.1 Architecture: amd64 CasperMD5CheckResult: unknown CloudArchitecture: x86_64 CloudBuildName: server CloudID: openstack CloudName: openstack CloudPlatform: openstack CloudSerial: 20240612 CloudSubPlatform: metadata (http://169.254.169.254) Date: Thu Sep 19 16:06:51 2024 Lsusb: Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU Tablet Bus 001 Device 003: ID 0627:0001 Adomax Technology Co., Ltd QEMU Tablet Lsusb-t: /: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=uhci_hcd/2p, 12M |__ Port 001: Dev 002, If 0, Class=Human Interface Device, Driver=usbhid, 12M |__ Port 002: Dev 003, If 0, Class=Human Interface Device, Driver=usbhid, 12M MachineType: OpenStack Foundation OpenStack Nova ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-6.8.0-45-generic root=UUID=1c5e2fdc-a746-403d-9fc0-71af31bc9c19 ro console=tty1 console=ttyS0 SourcePackage: systemd UpgradeStatus: No upgrade log present (probably fresh install) dmi.bios.date: 02/06/2015 dmi.bios.release: 0.0 dmi.bios.vendor: EFI Development Kit II / OVMF dmi.bios.version: 0.0.0 dmi.chassis.type: 1 dmi.chassis.vendor: QEMU dmi.chassis.version: pc-q35-4.2 dmi.modalias: dmi:bvnEFIDevelopmentKitII/OVMF:bvr0.0.0:bd02/06/2015:br0.0:svnOpenStackFoundation:pnOpenStackNova:pvr26.2.3:cvnQEMU:ct1:cvrpc-q35-4.2:sku: dmi.product.family: Virtual Machine dmi.product.name: OpenStack Nova dmi.product.version: 26.2.3 dmi.sys.vendor: OpenStack Foundation ** Affects: systemd (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug cloud-image noble -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081192 Title: Cannot change MemoryKSM in systemd units To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2081192/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs