resurrecting-open-source-projects / stress

Tool to impose load on and stress test a computer system
GNU General Public License v2.0
87 stars 18 forks source link

print how much memory could be allocated #8

Open john-peterson opened 1 month ago

john-peterson commented 1 month ago

the result message

stress -m 1 --vm-hang 0 -v --vm-bytes 15g
stress: FAIL: [12505] (461) failed run completed in 5s

could be amended to

stress: FAIL: [12505] (461) failed run completed in 5s with 9842m allocated 

the memory manager was able to print it on the host but i need to test it on a guest system that use lmk that i am unfamiliar with

sudo journalctl -u earlyoom | tail
May 27 13:24:23 emu earlyoom[7334]: sending SIGTERM to process 10414 uid 1001 "stress": badness 1078, VmRSS 9842 MiB

there is a crude work around by counting the number of completed workers. but better to reveal the mystery and just tell how much the system was able to offer. i am assigning myself to fix this

stress -m 1 --vm-hang 0 -v --vm-bytes 1g -m 15 --backoff 1000000
john-peterson commented 1 month ago

It seems like the entire shell is terminated in android emulator

For cases like that it would be necessary to print the byte progress to a local file and flush

android memory log is hard to understand

i am still struggling to interpret the memory manager messages if they exist at all. after every stress run is terminated the head is always of a reboot of the memory manager itself in the recent minute and nothing before that. i don't know what to make of it

adb logcat -d|grep lmk|head -2
05-27 15:01:43.399     0     0 I init    : Parsing file /system/etc/init/lmkd.rc...
05-27 15:01:44.347     0     0 I init    : starting service 'lmkd'...

i don't know if this tail means it did something. terminated something. sure is not much information. i need to know how much memory the system can carry


adb logcat -d|grep lmk|tail -1
05-27 15:02:04.482     0     0 I init    : Sending signal 9 to service 'exec 23 (/system/bin/lmkd --reinit)' (pid 1479) process group...