Concept observation. Could use some amplification from the congregants, please...
I'm learning about Go. My webserver program had lots of package level vars and only two, small structs. I set a dozen webpages to refresh very busy data calculations every 6 seconds. Over the course of an hour, looking at the pprof output for 'alloc' & 'heapAlloc' it looked like the GC was very busy and collected >6 GiB of stuff. It looked like it would have continued increasing into infinity. Even during that time, the GC rarely went over 10ms active times. I got rid of all the package level vars and put them inside of structs and pass around the struct values to the functions as needed. Using the same test setup above, I set a dozen webpages to refresh very busy data calculations every 6 seconds. Over the course of an hour, looking at the pprof output for 'alloc' & 'heapAlloc' it looked like the GC just loafed along and collected <10 MiB of stuff. And that number was pretty level. The GC was showing mostly zero nanosecond times. I didn't do any timing testing, but the speediness of all the webpages felt about the same in both test cases. I have a notion about what I'm seeing. Anyone care to increase my level of understanding? Are my interpretations about what pprof is showing me accurate? (ps - a big thank you to Burak Serdar who, in a previous thread, showed me something I hadn't considered and put me on the path to making my webserver program successfully concurrent!) TIA, Bucky -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/fb49d5bb-f795-4ca3-af5c-d883aabcf1af%40googlegroups.com.