Public bug reported:

It seems the latest stress-ng changed how percentages are handled and
using it to populate a percentage of memory does not work.


[ Reproducer ]

$ lxc launch o-vm
$ lxc shell o-vm
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu Oracular Oriole (development branch)
Release:        24.10
Codename:       oracular
# apt update -y && apt install -y stress-ng
# dpkg -s stress-ng | grep Version:
Version: 0.18.02-1
# stress-ng -vm 1 --vm-bytes 20%
stress-ng: debug: [139883] invoked with 'stress-ng -vm 1 --vm-bytes 20%' by 
user 0 'root'
stress-ng: debug: [139883] stress-ng 0.18.02
stress-ng: debug: [139883] system: Linux o-vm 6.8.0-31-generic #31-Ubuntu SMP 
PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64, gcc 14.2.0, glibc 2.40, 
little endian
stress-ng: debug: [139883] RAM total: 954.6M, RAM free: 433.0M, swap free: 0.0
stress-ng: debug: [139883] temporary file path: '/root', filesystem type: ext2 
(1738063 blocks available)
stress-ng: debug: [139883] 1 processor online, 8 processors configured
stress-ng: info:  [139883] defaulting to a 1 day run per stressor
stress-ng: debug: [139883] CPU data cache: L1: 32K, L2: 4096K, L3: 16384K
stress-ng: debug: [139883] cache allocate: shared cache buffer size: 16384K
stress-ng: info:  [139883] dispatching hogs: 1 vm
stress-ng: debug: [139883] starting stressors
stress-ng: debug: [139883] 1 stressor started
stress-ng: debug: [139884] vm: [139884] started (instance 0 on CPU 0)
stress-ng: debug: [139884] vm: using method 'all'
stress-ng: info:  [139885] vm: gave up trying to mmap, no available memory, 
skipping stressor
stress-ng: debug: [139884] vm: [139884] exited (instance 0 on CPU 0)
stress-ng: warn:  [139883] vm: [139884] aborted early, out of system resources
stress-ng: debug: [139883] vm: [139884] terminated (no resources)
stress-ng: debug: [139883] metrics-check: all stressor metrics validated and 
sane
stress-ng: info:  [139883] skipped: 1: vm (1)
stress-ng: info:  [139883] passed: 0
stress-ng: info:  [139883] failed: 0
stress-ng: info:  [139883] metrics untrustworthy: 0
stress-ng: info:  [139883] successful run completed in 10.03 secs


( Testing the previous version )
# wget 
https://launchpad.net/ubuntu/+archive/primary/+files/stress-ng_0.17.06-1build1_amd64.deb
# dpkg -i ./stress-ng_0.17.06-1build1_amd64.deb
# dpkg -s stress-ng | grep Version:
Version: 0.17.06-1build1
# stress-ng -vm 1 --vm-bytes 20% --timeout 10s
stress-ng: debug: [140097] invoked with 'stress-ng -vm 1 --vm-bytes 20% 
--timeout 10s' by user 0 'root'
stress-ng: debug: [140097] stress-ng 0.17.06
stress-ng: debug: [140097] system: Linux o-vm 6.8.0-31-generic #31-Ubuntu SMP 
PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64, gcc 13.2.0, glibc 2.39
stress-ng: debug: [140097] RAM total: 954.6M, RAM free: 368.2M, swap free: 0.0
stress-ng: debug: [140097] temporary file path: '/root', filesystem type: ext2 
(1738698 blocks available)
stress-ng: debug: [140097] 1 processor online, 8 processors configured
stress-ng: info:  [140097] setting to a 10 secs run per stressor
stress-ng: debug: [140097] CPU data cache: L1: 32K, L2: 4096K, L3: 16384K
stress-ng: debug: [140097] cache allocate: shared cache buffer size: 16384K
stress-ng: info:  [140097] dispatching hogs: 1 vm
stress-ng: debug: [140097] starting stressors
stress-ng: debug: [140097] 1 stressor started
stress-ng: debug: [140098] vm: [140098] started (instance 0 on CPU 0)
stress-ng: debug: [140098] vm: using method 'all'
stress-ng: debug: [140098] vm: [140098] exited (instance 0 on CPU 0)
stress-ng: debug: [140097] vm: [140098] terminated (success)
stress-ng: debug: [140097] metrics-check: all stressor metrics validated and 
sane
stress-ng: info:  [140097] skipped: 0
stress-ng: info:  [140097] passed: 1: vm (1)
stress-ng: info:  [140097] failed: 0
stress-ng: info:  [140097] metrics untrustworthy: 0
stress-ng: info:  [140097] successful run completed in 10.01 secs

** Affects: stress-ng (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: stress-ng (Ubuntu Noble)
     Importance: Undecided
         Status: Fix Released

** Affects: stress-ng (Ubuntu Oracular)
     Importance: Undecided
         Status: New

** Also affects: stress-ng (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Also affects: stress-ng (Ubuntu Oracular)
   Importance: Undecided
       Status: New

** Changed in: stress-ng (Ubuntu Noble)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2078871

Title:
  Using a percentage of memory no longer works

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/stress-ng/+bug/2078871/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to