There's not enough detail here to be more prescriptive than "use the 
profiler". You can of course insert calls to t := time.Now() at lots of 
places, compute time.Since(t) after an aggregate operation, and collect 
statistics on the time each operation takes -- a kind of poor-person's 
manual profiling -- if pprof isn't giving you what you need. In my 
experience needing to do so is rare. If you need to get down to L1 and 
cache coherency optimization, perf is your friend 
(https://en.wikipedia.org/wiki/Perf_%28Linux%29). Start by figuring out 
"where the time goes"-- is it disk, network, memory, or CPU bound?

On Thursday, May 8, 2025 at 9:48:36 PM UTC+1 Kanak Bhatia wrote:

> Does anyone have idea how to optimize consumers, producers and channels 
> using golang. I have to upload a million objects to a cloud object storage, 
> but unable to get a optimzed values for above parametres. Producers used to 
> create objects and send data through channels and receive  them at 
> consumers and call api from there.

-- 
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 visit 
https://groups.google.com/d/msgid/golang-nuts/8f519f76-e927-47f8-9387-0fea64c410ddn%40googlegroups.com.

Reply via email to