This is funny in the sense that my programs are great at stressing the CPU even though I don’t want to! :-)
I looked at your hogcpu() function and saw an issue: you busy loop repeats a select statement and a square root. Almost any simple implementation of this will spend all of its time in the select. Put a loop around that math.Sqrt() so that the “hog” routine is doing mostly sqrt() and not mostly select. DO something similar for the hogio and other hog functions. From: <golang-nuts@googlegroups.com> on behalf of <vyasgiridha...@gmail.com> Date: Monday, November 14, 2016 at 4:06 AM To: golang-nuts <golang-nuts@googlegroups.com> Subject: [go-nuts] Stressing the system using I have been working on this applications to stress the cpu, io and the hard drive. https://github.com/vyasgiridhar/gstress Kind of like stress. But i am unable to achieve high load. This might be due to the scheduling of goroutines. Is there a work around for this? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.