Merge ~alanec/plainbox-provider-checkbox:sngt_threads into plainbox-provider-checkbox:master

Proposed by Adrian Lane
Status: Merged
Merged at revision: 18be269cfe165aa09fbceb20b7813c4b52a0973a
Proposed branch: ~alanec/plainbox-provider-checkbox:sngt_threads
Merge into: plainbox-provider-checkbox:master
Diff against target: 107 lines (+26/-9)
1 file modified
bin/stress_ng_test.py (+26/-9)
Reviewer Review Type Date Requested Status
Rod Smith Needs Fixing
Jeff Lane  Approve
Review via email: mp+424665@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jeff Lane  (bladernr) wrote :

A couple comments inline below... do you have sample output from test runs on a couple servers from the lab (maybe one with a Xeon platnimum like Fleetroc, and one with one of the Milan CPUs?

review: Needs Fixing
Revision history for this message
Rod Smith (rodsmith) wrote :

I'm afraid this needs some work. There's one problem that causes the script to fail completely (stressors all fail, at least under Ubuntu 22.04), and other errors that drop stressors that I don't believe were intended to be dropped. Specifics inline below....

review: Needs Fixing
Revision history for this message
Adrian Lane (alanec) wrote :

Closing this MR due to lack of clarity on these changes.
Updated changes as per Jeff, but apparently they are no longer the desired changes, so I'll setup time to discuss with each of you.

Revision history for this message
Adrian Lane (alanec) wrote :

Re lack of clarity on changes: need specifics on this change.

I also didn't spend much time testing this, so after clarifying the above will test changes.

Revision history for this message
Rod Smith (rodsmith) wrote :

I ran this and it seemed to run fine; however, I do have a few nit-picks inline....

review: Needs Fixing
Revision history for this message
Jeff Lane  (bladernr) wrote (last edit ):

Looks good to me, and has been tested by HPE and now does not fail on smaller systems like the original version did.

review: Approve
Revision history for this message
Rod Smith (rodsmith) wrote :

Still has two .DS_Store files

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/stress_ng_test.py b/bin/stress_ng_test.py
2index 35aad2d..5f3b9a5 100755
3--- a/bin/stress_ng_test.py
4+++ b/bin/stress_ng_test.py
5@@ -58,12 +58,14 @@ class StressNg():
6 stressors,
7 wrapper_timeout,
8 sng_timeout,
9+ thread_count,
10 extra_options=""):
11
12 self.stressors = stressors
13 self.wrapper_timeout = wrapper_timeout
14 self.sng_timeout = sng_timeout
15 self.extra_options = extra_options
16+ self.thread_count = thread_count
17 self.results = ""
18 self.returncode = 0
19
20@@ -71,10 +73,12 @@ class StressNg():
21 """Run a stress-ng test, storing results in self.results."""
22
23 stressor_list = "--" + " 0 --".join(self.stressors)
24- command = "stress-ng --aggressive --verify --timeout {} {} {} 0". \
25+
26+ command = "stress-ng --aggressive --verify --timeout {} {} {} {}". \
27 format(self.sng_timeout,
28 self.extra_options,
29- stressor_list)
30+ stressor_list,
31+ self.thread_count)
32 time_str = time.strftime("%d %b %H:%M", time.gmtime())
33 if len(self.stressors) == 1:
34 print("{}: Running stress-ng {} stressor for {:.0f} seconds...".
35@@ -217,15 +221,18 @@ def stress_memory(args):
36 # Constant-run-time stressors -- run them for the same length of time on
37 # all systems....
38 crt_stressors = ['bsearch', 'context', 'hsearch', 'lsearch', 'matrix',
39- 'memcpy', 'null', 'pipe', 'qsort', 'stack', 'str',
40+ 'memcpy', 'null', 'pipe', 'qsort', 'str',
41 'stream', 'tsearch', 'vm-rw', 'wcs', 'zero', 'mlock',
42 'mmapfork', 'mmapmany', 'mremap', 'shm-sysv',
43 'vm-splice']
44+
45 if num_numa_nodes() > 1:
46 crt_stressors.append('numa')
47
48 # Variable-run-time stressors -- run longer on systems with more RAM....
49- vrt_stressors = ['malloc', 'mincore', 'vm', 'bigheap', 'brk', 'mmap']
50+ vrt_stressors = ['malloc', 'mincore', 'vm', 'mmap']
51+ # Low-thread-count stressors -- throttle to >8 threads...
52+ ltc_stressors = ['stack', 'bigheap', 'brk']
53
54 est_runtime = len(crt_stressors) * args.base_time + \
55 len(vrt_stressors) * vrt
56@@ -234,12 +241,22 @@ def stress_memory(args):
57 for stressor in crt_stressors:
58 test_object = StressNg(stressors=stressor.split(),
59 sng_timeout=args.base_time,
60- wrapper_timeout=args.base_time*2)
61+ wrapper_timeout=args.base_time * 2,
62+ thread_count=0)
63 retval = retval | test_object.run()
64 print(test_object.results)
65 for stressor in vrt_stressors:
66- test_object = StressNg(stressors=stressor.split(), sng_timeout=vrt,
67- wrapper_timeout=vrt*2)
68+ test_object = StressNg(stressors=stressor.split(),
69+ sng_timeout=vrt,
70+ wrapper_timeout=vrt * 2,
71+ thread_count=0)
72+ retval = retval | test_object.run()
73+ print(test_object.results)
74+ for stressor in ltc_stressors:
75+ test_object = StressNg(stressors=stressor.split(),
76+ sng_timeout=vrt,
77+ wrapper_timeout=vrt * 2,
78+ thread_count=8) # throttle to 8 threads
79 retval = retval | test_object.run()
80 print(test_object.results)
81 if my_swap is not None and args.keep_swap is False:
82@@ -271,7 +288,7 @@ def stress_disk(args):
83 est_runtime = len(disk_stressors) * args.base_time
84 print("Using test directory: '{}'".format(test_disk.test_dir))
85 print("Estimated total run time is {:.0f} minutes\n".
86- format(est_runtime/60))
87+ format(est_runtime / 60))
88 retval = 0
89 if not args.simulate:
90 for stressor in disk_stressors:
91@@ -279,7 +296,7 @@ def stress_disk(args):
92 "--hdd-opts dsync --readahead-bytes 16M -k"
93 test_object = StressNg(stressors=stressor.split(),
94 sng_timeout=args.base_time,
95- wrapper_timeout=args.base_time*5,
96+ wrapper_timeout=args.base_time * 5,
97 extra_options=disk_options)
98 retval = retval | test_object.run()
99 print(test_object.results)
100diff --git a/data/.DS_Store b/data/.DS_Store
101new file mode 100644
102index 0000000..f457547
103Binary files /dev/null and b/data/.DS_Store differ
104diff --git a/units/.DS_Store b/units/.DS_Store
105new file mode 100644
106index 0000000..34cdc7c
107Binary files /dev/null and b/units/.DS_Store differ

Subscribers

People subscribed via source and target branches