Тёмный
No video :(

justforfunc #22: using the Go execution tracer 

justforfunc: Programming in Go
Подписаться 40 тыс.
Просмотров 22 тыс.
50% 1

What's the best way to create a Mandelbrot fractal in Go?
pprof is not enough to help us with this ... let's learn how to use the Go tracer instead!
blog post: / using-the-go-execution...
code: github.com/cam...

Опубликовано:

 

25 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 80   
@joecarter4512
@joecarter4512 6 лет назад
One of your best episodes so far. This was really interesting, I'm up for more episodes like this!
@azzalos
@azzalos 5 лет назад
I watched this again and it was super helpful. I wish there were more of these. I also find it funny how you get excited about performance improvements as if you've just discovered them for the first time.
@Danielshenking
@Danielshenking Год назад
Every step of inference of optimizing is amazing. Particularly love this episode by far.
@JeffRAllenCH
@JeffRAllenCH 6 лет назад
You can also tell it's working better with createRow because time said that CPU was over 600% (theoretical max was 800%). Also, beginners needed a better description of why none of your (working) programs had data races. There are two cardinal sins when using goroutines: 1. communicating by sharing (unless you know why it's safe) and 2. not knowing when your goroutines exit (thanks Uncle Dave). You did a great job of showing that even in toy programs your goroutines have to exit correctly.
@markmcdonnell
@markmcdonnell 6 лет назад
I've been needing to understand profiling in go for a while. I've never really grok'ed it properly before but you've made it so super simple. Thank you ❤️
@Dolanor
@Dolanor 5 лет назад
Wanted to exactly say that. That was an amazing episode!
@nikhilchoudhary6891
@nikhilchoudhary6891 3 года назад
Watching from India.The comparison is really cool and would love to watch more such videos. Thanks
@sdero499
@sdero499 6 лет назад
This was the best func yet. Seriously, breaking down code and just tracing through while optimizing is insanely helpful. More observability always!
@joonasfi
@joonasfi 5 лет назад
I love to learn about perf / tooling videos like these!
@chrisvaughn01
@chrisvaughn01 6 лет назад
Great episode. I really appreciate videos like this showing the tools available and how to approach performance problems.
@pawesajnog2248
@pawesajnog2248 6 лет назад
Wow, trace tool is impressive! Another great just for func episode! Thanks Francesc :)
@riftitsolutions2372
@riftitsolutions2372 6 лет назад
I actually enjoy the go tooling because from every video I have seen and tutorials I followed on benchmarking performance, after watching your video I finally get it. Thanks.
@hugoschmitt1772
@hugoschmitt1772 6 лет назад
Love the use of music for comedic effect ;)
@ezg5221
@ezg5221 4 года назад
Oh boy, I'll be coming back to this one
@merlin2600
@merlin2600 6 лет назад
Very interesting. I will immediately apply it to one of my first apps that is extremely CPU intensive and I did use the "let's create millions of routines and let Go handle it" approach.
@rajendragosavi2233
@rajendragosavi2233 3 года назад
That was crazy. Thanks for explaining such. a complex topic. I am late in the race, trying to learn as much I can. :)
@igustingurahokaprinarjaya7482
@igustingurahokaprinarjaya7482 2 года назад
AMAZING! love it! Thank you for your effort creating this awesome amazing knowledge video
@lawrencehoffman3517
@lawrencehoffman3517 6 лет назад
Great rundown. Immediate subscription. Going to go back and watch some of your other videos. Please keep these up!
@robertoferrer535
@robertoferrer535 6 лет назад
Cada video te superas, gracias Francesc :)
@shadowfaxenator
@shadowfaxenator 6 лет назад
Thanks! More videos like this please
@JeffDupont38
@JeffDupont38 6 лет назад
Awesome! Love seeing how to effectively use these tools
@radoslavtomov9121
@radoslavtomov9121 6 лет назад
Great video. Keep them coming :). Tooling and code reviews are spot on.
@chneau
@chneau 6 лет назад
That is a super episode, I knew pprof but now I know trace ! Cheers
@jhaals
@jhaals 6 лет назад
Tooling and performance is great! Thanks
@JammyJay86
@JammyJay86 6 лет назад
Great video! I like both types of videos, and like how you alternate them.
@simonarcher1510
@simonarcher1510 2 года назад
This is helpful, but I need to mention how challenging this is when you have a real program. It’s much harder “in the wild”. Having unit tests to ensure that your optimization did not break anything is recommended over manual inspection.
@llgmusic
@llgmusic 6 лет назад
Thanks, good demonstration on how to optimize code with go tools
@kimnielsen7818
@kimnielsen7818 6 лет назад
I really enjoyed this .. Thanks :) I wouldn't mind more about tooling or ways to optimize so please keep'em comming
@KasisnuSingh
@KasisnuSingh 6 лет назад
Love the style of presentation.
@quillaja
@quillaja 5 лет назад
I'd like to know more about how to do optimizations in Go such as avoiding cache misses and aligning (slices/arrays of) data in memory. Also, and probably more importantly, how to reduce allocations and garbage collection.
@MAtloi
@MAtloi 6 лет назад
This video gives me a good feeling that using the worker pools is most of the time the right pattern I use! The video was awesome! Keep these coming, because I feel like a lot of stdlib things aren't very well documented, explained or advertised. One question I have for long running programs: Can you create traces while running e.g. in a container, like it's possible with pprof via http? Thanks! :)
@ugur_dincer
@ugur_dincer 5 лет назад
Me and the boys gonna watch this again, reserved.
@morwar_
@morwar_ 6 лет назад
Amazing video, the tracer tool is really good and you explained it very well. Twenty days for GopherconBR, see you there Francesc!
@nxxxxzn
@nxxxxzn 5 лет назад
I guess the best would be to divide the image into 8 parts, for each go routine..? So that each go routine gets ~500k pixels
@MaisonArmani
@MaisonArmani 6 лет назад
Thanks bro.... This is crazy helpful...
@RandomShowerThoughts
@RandomShowerThoughts 4 года назад
this video was incredible!
@jepkofficial
@jepkofficial 6 лет назад
I def would enjoy more videos using the go tooling for A/B testing code performance.
@caeliferog
@caeliferog 6 лет назад
Great video! It would be nice if you mentioned navigation keys you use to zoom on the trace.
@ronanlanigan
@ronanlanigan 6 лет назад
Excellent video, keep them coming :-)
@valentindeleplace7860
@valentindeleplace7860 6 лет назад
Great video What you call createRow, I would call createColumns. Disclaimer: I have ~50% chance of being wrong...
@b4ux1t3-tech
@b4ux1t3-tech 6 лет назад
So, you going through this helped me _finally_ grok goroutines and channels. Plus, I know about trace now (I didn't even know it existed).
@hualetwang3105
@hualetwang3105 6 лет назад
Nice video, very useful.
@MarEkkertsen
@MarEkkertsen 6 лет назад
A really good one. Thank you sir!
@baranda1985
@baranda1985 5 лет назад
Amazing video, really enlightening!
@Daniel-wt9bh
@Daniel-wt9bh 4 года назад
Thanks!
@vladimirbauer6604
@vladimirbauer6604 6 лет назад
Thank you Francesc! Some of patterns you've showed, have well established names, so it would be nice if you'll refer to "official" name where appropriate. For example, last pattern you've used is called bounded parallelism, as far as I know. PS: nice caveat561 gotcha :)
@MichaelYinger_Beginner
@MichaelYinger_Beginner 6 лет назад
Very informative. Thanks.
@soumyaprakashdatta
@soumyaprakashdatta 6 лет назад
This was really awesome ... loved the video :)
@tjholowaychuk4646
@tjholowaychuk4646 6 лет назад
Awesome as usual!
@dineshdevaraj1844
@dineshdevaraj1844 3 года назад
Great Man
@lovekeys1908
@lovekeys1908 6 лет назад
Thanks! Great help! More vids like this, please :)
@RealShabana
@RealShabana 6 лет назад
This is amazing really
@arthurnn
@arthurnn 6 лет назад
gracias .. great work!
@konstantin8105L
@konstantin8105L 6 лет назад
Thanks.
@shaikmuzakkir
@shaikmuzakkir 2 года назад
Very informative. Can you please let me know how I can zoom into the graphs on my mac?
@shaikmuzakkir
@shaikmuzakkir 2 года назад
I figured it out. Thanks!
@theyruinedyoutubeagain
@theyruinedyoutubeagain 6 лет назад
"Top see you em" for cumulative. I loved how awkward that was! xD
@ilyushka21st
@ilyushka21st 6 лет назад
First of all, I want to say: Thank you, for a good job. Want to ask, what the shortcut do you use to enlarge the trace in a browser?
@abhijitiitr
@abhijitiitr 6 лет назад
This somehow shows that blocking send/receive on a channel(2048 times) has more overhead than the scheduler scheduling 2048 goroutines on 8 cores. Since there are only 8 goroutines in the first case and the process is CPU heavy, so I don't expect any of the 8 goroutines getting scheduled on/off from the CPU. Please feel welcome to critique this hypothesis.
@andreaswestberg536
@andreaswestberg536 6 лет назад
Can the videos be watched offline? Like watching in areas where Wi-Fi not accessible
@JustForFunc
@JustForFunc 6 лет назад
+Andreas Westberg RU-vid Red makes it easy, but I'm sure there's other ways
@SeshachalamMalisetti
@SeshachalamMalisetti 6 лет назад
how should one decide on the number of go routines to spawn(here 8 routines) ? programs run on different machines.
@JustForFunc
@JustForFunc 6 лет назад
+Seshachalam Malisetti you could use the runtime package to figure out how many CPUs are available
@SeshachalamMalisetti
@SeshachalamMalisetti 6 лет назад
yeah, runtime.NumCPU() but to find the optimal number of worker routines how to proceed ? somewhere in irc channel i heard someone saying dont use numcpu
@patenlikoyun
@patenlikoyun 6 лет назад
What's that text editor?
@MarcoCarmonaT
@MarcoCarmonaT 6 лет назад
Visual Studio Code.
@patenlikoyun
@patenlikoyun 6 лет назад
Thanks
@alexandersvensson1253
@alexandersvensson1253 6 лет назад
Why do you build the program instead of using "go run" ?
@oliverbutterfield9844
@oliverbutterfield9844 6 лет назад
Alexander Svensson because he was trying to time the performance of the thing. Some of the time spent in go run is compiling stuff, so it adds overhead to each test.
@JimmyStewpot
@JimmyStewpot 6 лет назад
Alexander Svensson because the time command would also so the compile time for the binary. He mentioned briefly at the start.
@alexandersvensson1253
@alexandersvensson1253 6 лет назад
Ah, makes sense, thanks for the answers :)
@zelimirfedoran9720
@zelimirfedoran9720 3 года назад
So... "don't use channels". Got it ;p
@ulissemini5492
@ulissemini5492 5 лет назад
i ' m a l r e a d y t r a c e r
@jjanx4820
@jjanx4820 6 лет назад
That command flag lol
@theyruinedyoutubeagain
@theyruinedyoutubeagain 6 лет назад
50th! Now, to watch the video.
@LuisFigueiredoz
@LuisFigueiredoz 6 лет назад
go channels have some overhead and can get a bit slower than a simple mutex, github.com/golang/go/wiki/MutexOrChannel A discussion on the topic: news.ycombinator.com/item?id=11210578 (I disagree that channels are bad)
@theyruinedyoutubeagain
@theyruinedyoutubeagain 6 лет назад
"My mac has 8 cores". It's threads, not cores. Literally unwatchable.
@theyruinedyoutubeagain
@theyruinedyoutubeagain 6 лет назад
Just kidding of course. Love your videos ❤️
@theyruinedyoutubeagain
@theyruinedyoutubeagain 6 лет назад
Also, is the correct nomenclature hyperthreads? Otherwise it's confusing with OS threads.
Далее
justforfunc #21: reviewing ursho II - using PostgreSQL
19:24
justforfunc #19: mastering io.Pipes
41:24
Просмотров 33 тыс.
Only I get to bully my sister 😤
00:27
Просмотров 17 млн
justforfunc #1: A Code Review
35:25
Просмотров 52 тыс.
Twelve Go Best Practices - Francesc Campoy
49:27
Просмотров 70 тыс.
Why do C Programmers Always Obfuscate Their Code?
2:01:57
justforfunc #37: sync.Pool from the pool
27:11
Просмотров 17 тыс.