Linux v Windows: Which is FASTER? - Software Drag Racing!

Sdílet
Vložit
  • čas přidán 11. 04. 2021
  • Retired Microsoft operating system developer Davepl races Linux against Windows on the latest Threadripper CPUs to determine once and for all which system is actually fastest under maximum load.
    Davepl develops a multicore prime sieve capable of solving the primes to a BILLION in under a second - or dozens of times per second on the "big" CPUs!
    All the code can be found at github.com/PlummersSoftwareLL... in the PrimeCPP_PAR folder.
    All profits from the sale of Dave's Garage mugs go to Autism Reseach:
    daves-garage-store.creator-sp...
    "How to Lie With Statistics" - amzn.to/3wXQceK
  • Věda a technologie

Komentáře • 812

  • @hellterminator
    @hellterminator Před 3 lety +1018

    Next drag race suggestion: WSL vs Linux running natively.

    • @Gornius
      @Gornius Před 3 lety +27

      This shouldn't matters as much, but still would be interesting.

    • @Basement-Science
      @Basement-Science Před 3 lety +54

      @@Gornius That becomes complicated pretty quickly. For example some low-level features are not available on WSL.

    • @classicmacintosh
      @classicmacintosh Před 3 lety +82

      Surely NTFS will cripple any disk IO performance you may try to measure. I'd expect the native Linux instance to win hands down.

    • @hellterminator
      @hellterminator Před 3 lety +63

      @@classicmacintosh I fully expect Linux to win because if nothing else, you're removing an API translation layer. The question is by how much.

    • @Pracedru
      @Pracedru Před 3 lety +20

      Phoronix has done a lot of WSL-WSL2-Baremetal benchmarks.
      Interestingly both WSL and WSL2 beat linux in a few of them.

  • @noodlefu_
    @noodlefu_ Před 3 lety +196

    I almost feel like I'm seeing the beginnings of Dave's Garage Benchmark...

  • @kquote03
    @kquote03 Před 3 lety +146

    The "How to lie with statistics" amazon link in the description is instilling fears in me.

    • @DavesGarage
      @DavesGarage  Před 3 lety +78

      Fear not - I merely point out the three different ways the graph COULD be presented, and it's up to you which you like best, but they all still say the same thing. Because there are "lies, damned lies, and statistics".

    • @kquote03
      @kquote03 Před 3 lety +1

      @@DavesGarage I see, I thought you were going to do something sneaky and at the end of the video be like "boom! ya'll wrong!!"
      You certainly know how to make me hyped!

    • @DavesGarage
      @DavesGarage  Před 3 lety +11

      @Ron Bali Ubuntu 20,.04 LTS

    • @joshix833
      @joshix833 Před 3 lety +10

      @@DavesGarage Why Ubuntu? Why not something like Arch with more up to date software?

    • @DrFunFong
      @DrFunFong Před 3 lety +1

      Lies, damned lies, statistics, and models....

  • @brucewilliams6292
    @brucewilliams6292 Před 3 lety +4

    I appreciate your balanced view of the drag races. It is amazing how close everything is. Thank you for the great video series.

  • @ikannunaplays
    @ikannunaplays Před 3 lety +116

    I told my assistant to hold my calls, and then she laughed and said no one cares to call you. I hate my wife sometimes.

    • @louistournas120
      @louistournas120 Před 2 lety +2

      @I see and you see You are a Homer Simpson.

    • @proloycodes
      @proloycodes Před 2 lety

      @I see and you see bruh calm down he meant it as a joke

    • @fokthewef
      @fokthewef Před 2 lety

      😂😂😂

    • @jenniferjones2863
      @jenniferjones2863 Před 2 lety +1

      That was funny. It put a smile on my face this morning. Thank you.

  • @MichaelPohoreski
    @MichaelPohoreski Před 3 lety +6

    @Dave's Garage I wrote a multithreaded prime sieve a few years back. For finding primes between 1 and 10,000,000 on my Threadripper 3960X it takes ~ 0.01 seconds regardless of the number of threads used. You are correct, multi-threading won't bring any gains when the sieve is heavily dependent on prior work.
    Now for finding primes between 1 and 1,000,000,000 then we start to see some differences with +/- 0.10 seconds:
    1 thread = 5.032 seconds
    2 threads = 4.816 seconds
    4 threads = 4.72 seconds
    8 threads = 4.450 seconds
    16 threads = 3.989 seconds
    32 threads = 3.702 seconds
    48 threads = 3.548 seconds
    A better multithreaded test is Buddhabrot rendering.

  • @sebastienvaillancourt9399
    @sebastienvaillancourt9399 Před 3 lety +41

    the amount of effort and thought you put into your videos is startling! thumbs up!

    • @glasser2819
      @glasser2819 Před 3 lety

      oui, rien que pour du sport cérébrale! Ça doit être dure pour lui de vivre entouré par des patates... 🤣

  • @MrJugsstein
    @MrJugsstein Před 2 lety

    Thanks for your time. enjoying every episode

  • @georgeprout42
    @georgeprout42 Před 3 lety +22

    20 years ago I set up a dual boot and tried Linux (again). I'd had a bad time previously with Red Hat. Even under WINE counterstrike gave me a lower ping and faster FPS. I was a working as Windows desktop support at the time, had to quit as I realised that (on my machine) everything was quicker and easier, it wasn't long before I realised that I'd not booted back to windows for anything. Working with user/server mangler became a chore. Even now I giggle at the extra steps microcontroller developers need to take under Windows, when it works out of the box under Linux. YMMV, but I was happy to buy a laptop last year that came with freeDOS. Works perfectly with Mint.

  • @mibdev
    @mibdev Před 3 lety

    Congratulations on the 100k subscribers, Dave. You deserve it.

  • @asdasfdfgewqgrgyjh
    @asdasfdfgewqgrgyjh Před 3 lety

    I really like the outtakes. you should bring those back

  • @drewwilson8756
    @drewwilson8756 Před rokem

    I appreciate the exposition Dave!

  • @HALFLIFETRUTHER
    @HALFLIFETRUTHER Před 3 lety +1

    Dave, I love your videos so much! You're very good at telling a story from start to end, and your voice is very easy to listen too. I can't wait for you to post more videos, they are captivating!

  • @mercuriete
    @mercuriete Před 3 lety +68

    I would like to see Linux baremetal and Windows on HyperV.
    That was not a fair comparison IMHO.

    • @pipyakas
      @pipyakas Před 3 lety +10

      in this case, both are on Hyper-V

    • @peace9272
      @peace9272 Před 3 lety +5

      Agreed, BareMetal x BareMetal is the way to go. Using Virtualization just doesnt seem right.

    • @I_SEE_RED
      @I_SEE_RED Před 3 lety +10

      @@peace9272 it's perfectly realistic, the world runs on vms

    • @orkhepaj
      @orkhepaj Před 3 lety +1

      @@I_SEE_RED exactly , barebone comparisons are stupid , it is like compare 2 cars in the factory , that is not how it will behave when used by the customers

    • @agushex
      @agushex Před 3 lety +2

      ammm well not to disagree with EVERYBODY but... performance matters in VM and in Baremetal the same, for a user perspective baremetal is more important, for servers both are important, you can run a lot on vm but some stuff you better run them on baremetal.

  • @Barnacules
    @Barnacules Před 2 lety +70

    Dave, did you do your testing for over 16 cores on Enterprise builds of Windows? I know back in the day they used to artificially cripple the consumer builds and limit performance both at the HAL and Kernel levels to some degree so you couldn’t take advantage of many cores and huge amounts of memory. Not sure if that is the case with later generations like Windows 8+ but wouldn’t put it past them 😉 I’m genuinely curious myself as to why Linux was so much faster with with C over 16 cores 🤔 I wonder if the Windows Intel C compiler is also doing something funny here. I’m really rusty since I haven’t coded in a good long time but this got my cogs turning a bit so I thought I would comment. I shot you an email, keep on killing it with these videos man 👍🏻

    • @TheYealoChannel
      @TheYealoChannel Před 2 lety +3

      Did you guys know each other at Microsoft?

    • @unicodefox
      @unicodefox Před 2 lety +5

      @@TheYealoChannel Microsoft is a massive company, so maybe not, but I'd bet they at least saw each other, even if they didn't recognise each other!

    • @dg-hughes
      @dg-hughes Před 2 lety +3

      Dave's not here man

    • @RamkrishanYT
      @RamkrishanYT Před 2 lety

      What's HAL?

    • @dg-hughes
      @dg-hughes Před 2 lety

      ​@@RamkrishanYT hardware abstraction layer

  • @TJPactronix
    @TJPactronix Před 3 lety

    This channel is beyond fascinating. Learning so much about computing and coding in general. Thank you Dave.

  • @gumboe2007
    @gumboe2007 Před 3 lety +43

    Education and entertainment at the same time. I enjoy these videos Dave, keep going please

    • @jonohiggs
      @jonohiggs Před 3 lety +1

      And more computing concepts explained by minions please

  • @RahulAeri
    @RahulAeri Před 3 lety

    Dave, I LOVE your videos and commentaries! Thanks for sharing! :)

  • @chrismanning5232
    @chrismanning5232 Před 3 lety +2

    Dave got some new lighting (or learned to color grade)! Another excellent video, sir.

  • @BDMcGrew
    @BDMcGrew Před 3 lety +2

    Definitely enjoy the coding videos. I've coded user space and kernel drivers in Linux for eon's but never had anywhere near the understanding of the architecture that you're providing in your content. Thanks!

  • @magnus6711
    @magnus6711 Před 3 lety

    Congrats on 100k subscribers Dave 🎉

  • @mike-barber
    @mike-barber Před 3 lety

    Nice work explaining the issues involved, Dave! This is pretty shareable.

  • @JerryTravisSmith
    @JerryTravisSmith Před 3 lety

    You're awesome Dave! I learn so much every time I watch one of your videos.

  • @strifef7
    @strifef7 Před 3 lety +2

    never, ever knew how much I NEEDED to know this! Great stuff Dave.

  • @timothyschumann
    @timothyschumann Před 3 lety +1

    This is the best excuse for getting up earlier I've had in a while. Keep it up!

  • @danwolfe6295
    @danwolfe6295 Před 3 lety

    Thank you so much Dave for delivering yet another fantastic video. I always end up learning something new and interesting.

  • @programorprogrammed
    @programorprogrammed Před 3 lety +3

    Like this series. Thanks Dave.

  • @Thumper68
    @Thumper68 Před 3 lety +5

    Love the outtakes at the end!

  • @davewmck
    @davewmck Před 3 lety

    Sure been fun watching this channel grow 👍

    • @DavesGarage
      @DavesGarage  Před 3 lety

      Thanks for the visit! Tell a friend :-)

    • @remasteredretropcgames3312
      @remasteredretropcgames3312 Před 3 lety

      @@DavesGarage
      There are a few optimization generalized driver images out there. You would be the perfect Gentleman to take us to the next level.

  • @m.p.jallan2172
    @m.p.jallan2172 Před 3 lety +50

    Drag racing is a great analogy for these tests. Its humorous and accurate. I consider this a kind of sport now.

    • @MrMartinSchou
      @MrMartinSchou Před 3 lety +8

      If it's like actual drag racing, I do not want to run anything on my computer - I have no interest in the engine (the CPU) exploding and sending parts all over the place.
      I will, however, admit that I would love to see a parachute deploy from my computer whenever it's finished doing a hard task.

    • @tacokoneko
      @tacokoneko Před 3 lety

      the current most popular term for this is "benchmarking" but you can try to make the other term catch on

    • @ScottWalde
      @ScottWalde Před 3 lety +1

      @@MrMartinSchou I'm just wondering if I need an NHRA certified rollcage in my computer if I go quicker than 10s.

    • @remasteredretropcgames3312
      @remasteredretropcgames3312 Před 3 lety

      Oh how I never did get that 224 cam.
      Tragedy.

  • @TGCIIII
    @TGCIIII Před 3 lety +5

    As someone who only recently got into computation and coding (for any purpose other than physics calculations, I am an engineer after all) I love your videos. Your video on gigabit switches already helped me. I just don't have time to learn this stuff on my own, and you really break things into awesome, digestible blocks.

  • @Gonkers44
    @Gonkers44 Před 2 lety

    I love your videos. It’s so much real world info that you don’t get in really any kind of formal education setting. Thanks!

  • @doncapo732
    @doncapo732 Před 3 lety +30

    Yet again, Dave fools us into exploring and learning something through entertainment. Excellent video Dave, thank you!

  • @tehs3raph1m
    @tehs3raph1m Před 2 lety +1

    just want to drop a comment about the quality of the camera, its focus on the face and the clean audio. not a lot of people will appreciate it, but I notice that tight depth of field

  • @HaouasLeDocteur
    @HaouasLeDocteur Před 3 lety

    This channel brings me so much joy.

  • @whydoineedausername1386
    @whydoineedausername1386 Před 3 lety +34

    Wait
    You ran the entire linux bench in WSL? I guess it isn't really doing any syscalls, but it doesn't really feel very fair. Time to bench it myself running natively I guess.

    • @hpsmash77
      @hpsmash77 Před 2 lety

      uhh...... the benchmarks........

  • @thebigMuh
    @thebigMuh Před 3 lety +17

    Hi! About your remarks for how to thread the prime sieve:
    You should be perfectly fine to hand out marking of multiples for the entire sieve range to individual threads; I don't think the case you described would cause any issues.
    The worst thing that would happen is that a thread picks up a factor that should have been eliminated, and marks all multiples of it as non-prime. As long as another thread marks that factor itself later as non-prime, all that has happened was simply that redundant work was done.
    Example: 4 threads start marking off multiples; they all start at the same time, marking off the multiples of 3, 5, 7 and 9 (since those are the first 4 factors in your sieve). Of course, all multiples of 9 would be eliminated by the thread marking off multiples of 3; but no ill effects result of this redundant work, you just lose a bit efficiency at the beginning. The further the sieve progresses, the less likely it becomes that a thread is doing redundant work.
    It's of course important for this that you DON'T use vector or any container that stores the bit fields by ORing values together, as you run into contention issues. But using e.g. a vector should work just fine.

  • @MichaelMiller-rg6or
    @MichaelMiller-rg6or Před 3 lety

    Love your channel! Keep it up!

  • @ag4391
    @ag4391 Před 3 lety +1

    Great content, this was a very interesting comparison.

  • @bitcortex1991
    @bitcortex1991 Před 3 lety +11

    Interesting. I've seen other multithreaded benchmarks (using rendering software, I believe) that corroborate Windows' loss of efficiency beyond 16 cores. My guess is that its scheduling and/or thread pooling algorithms haven't been updated since long before such core counts became common. Nice win for Linux, although the "hump" in its curve indicates the potential for even better performance. Great video as always!

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 Před 3 lety

      Linux runs on supercomputers with thousands of cores.
      Microsoft tried to compete in this market once (with Windows HPC), but they couldn’t even give it away.

    • @bitcortex1991
      @bitcortex1991 Před 3 lety +1

      @@lawrencedoliveiro9104 As I understand it, Windows HPC is a clustering solution for commodity hardware and has nothing to do with supercomputers. BTW, there's a market for supercomputer operating systems?

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 Před 3 lety +1

      One or two machines running Windows HPC did appear on the Top 500 list at one point, but quickly disappeared.

    • @bitcortex1991
      @bitcortex1991 Před 3 lety

      If Windows managed to put a flock of Dells on that list, color me impressed! 🤣

    • @joer8854
      @joer8854 Před 2 lety

      In all fairness Linux was doing multithreading since the very beginning. It was being used on many muti-cpu boards early on and because of that there's been a continuous evolution for how it handles use of multiple cores. For a long time there wasn't much advantage to windows in making use of multiple workloads and so they didn't spend any time on it. As Linux became more and more popular on servers and supercomputers how it handled those processes and made use of multiple cores became more and more important. Because of that Microsoft is way behind in multithreading.

  • @kostasanalytis2925
    @kostasanalytis2925 Před 3 lety

    Dude, you're a machine! The way you blast through your explanations is awesome, and I always feel like you are talking directly to me.
    As always, 😎

  • @TheExcellentVideoChannel
    @TheExcellentVideoChannel Před 3 lety +5

    From the outtakes it looks like you're editing live ... what a good idea! Loving the content, but then I am a C++ vet.

    • @Uffeful
      @Uffeful Před 3 lety +2

      As a rather new front end guy I agree its great content.

  • @brandtharen
    @brandtharen Před 3 lety

    This has been a very interesting series to watch. And seeing all those cores fully loaded in Task Manager reminds me of my first time seeing my multicore monster (by consumer 2011 standards) 6-Core 12-hyperthread Intel X79 PC building getting it's initial test run.

  • @scifibob
    @scifibob Před 3 lety +7

    I feel like this is a kind of the software version of the tests on Gamers Nexus (and other HW focused channels), and we definitely needs more of these.

  • @grezelnick
    @grezelnick Před 3 lety +1

    Kudos on making sure your audio is excellent. Kudos on keeping it interesting. I recommend you move your teleprompter a little further away - we can see your eyes scanning the text... Moving the prompter further away can eliminate that telltale sign.

  • @tlpNZ
    @tlpNZ Před 3 lety

    Hey Dave back in the day I was at Sun and run many benchmarks. Near the end of my time showed that my laptop running Solaris on x86 was an order of magnitude faster than running the software on their 64CPU E10K. And all I did was compile their source! Because they just didn't seem to understand that the software was single threaded and big SPARC boxes weren't designed for that. So keep it up love these videos and your honesty.

  • @TheDamian418
    @TheDamian418 Před 3 lety +2

    Just about to hit 100k subs! Love the content, Dave!

  • @jonathanvanier
    @jonathanvanier Před 3 lety

    Great series! How about combining it with deeper dives in architectural differences between different OSs and your opinion on them as to performance, security, programmer's convenience, elegance, etc.? Maybe with FreeBSD, macOS, Illumos, and others thrown into the mix!

  • @matthewsjardine
    @matthewsjardine Před 3 lety +9

    I really enjoy these Windows vs Linux videos. Please keep it up! Thanks Dave.

  • @HugRunner
    @HugRunner Před 3 lety +6

    Would be cool to see a test between different Windows versions (XP, ME, 2000 etc.) to see the progress throughout the years with handling multi-treading and number-crunching.

  • @Gornius
    @Gornius Před 3 lety +23

    Finally someone else who pronounces clang like "Sea-Lang" instead of "Clang" like in "Clam". And yes, I know the correct one is the second one.

    • @Spero_Hawk
      @Spero_Hawk Před 3 lety +1

      That's how I feel about cout and char in c++.

    • @rameynoodles152
      @rameynoodles152 Před 3 lety +1

      @@Spero_Hawk Do you say See-har?

    • @Spero_Hawk
      @Spero_Hawk Před 3 lety +3

      @@rameynoodles152 I say "char" because I'm a plebian but I want to say "care" because it's care-acter not char-acter. I am very on the fence about that one though.

    • @ZiggyTheHamster
      @ZiggyTheHamster Před 3 lety

      I pronounce it like the sound that a chain makes when you drop it on the floor.

    • @R.B.
      @R.B. Před 3 lety +1

      And yet num-pee instead of num-pie?

  • @codydavis2871
    @codydavis2871 Před 3 lety +1

    I love this. I had no idea about the hardware_concurancy function in C++. This makes me want to look at thread control more closely with C++

  • @geehaf
    @geehaf Před 3 lety +3

    Soooo good. Thanks Dave.

  • @JonC341
    @JonC341 Před 3 lety

    Another great video brother!

  • @jurjanbrust
    @jurjanbrust Před 3 lety

    Great video as usual. Also received the famous Dave garages coffee mug! Is it an idea to post a picture of the mug together with some led projects of the viewers.

  • @SIRBOB102
    @SIRBOB102 Před 3 lety +9

    you need to use proper linux not windows subsystem for linux as wsl has aditional performance penalties due to translating sys calls to windows sys calls

    • @DavesGarage
      @DavesGarage  Před 3 lety +8

      That's not how a hypervisor works. It doesn't translate calls, it exposes hardware!

  • @axlslak
    @axlslak Před 3 lety +11

    I tried your program on my 9980XE cpu. Funny thing, I get 6000 passes inside a VM (qemu/kvm) and 5200 on bare metal. My cpu has 18 hyperthread cores, clocked at 3.06 GHz. Used gcc (10.3.0). Only have linux, both as host and as guest. Gentoo to be exact. I also added mtune/march to gcc arguments according to my cpu. That alone is giving about 200-300 extra passes :)

  • @DrakiniteOfficial
    @DrakiniteOfficial Před 3 lety +49

    I think that releasing the executables would be great! That way, people can test this stuff on a lot of different systems.

    • @Pracedru
      @Pracedru Před 3 lety +1

      All the compilers can be downloaded for free.

    • @gfrewqpoiu
      @gfrewqpoiu Před 3 lety +1

      There is a link to the code in the description of the video.

    • @Damaniel3
      @Damaniel3 Před 3 lety

      You know somebody out there has a 16 or 32 socket Xeon Platinum system somewhere that wants to run this benchmark on a few hundred cores. Do it for science!

    • @joshua43214
      @joshua43214 Před 3 lety +3

      I am sooo tempted to take it to work with me and run it on our new cluster just so I can get one of those "what the hell are you doing?!?" emails from the admin :)

    • @andrewdunbar828
      @andrewdunbar828 Před 3 lety +1

      @@Pracedru Not all systems like to install the available compilers, or not all freely available compilers like to install on some systems. They can be complicated and I've run into multiple problems on both Windows and Mac. Not on Linux though (-:

  • @kindanyume
    @kindanyume Před 3 lety

    Nicely doe Dave esp the honesty with stats something thats all too rare from many sources

  • @Nusremmus
    @Nusremmus Před rokem

    Very interesting. Thank you again for a very informative video in the most efficient manner possible. :)

  • @wompastompa3692
    @wompastompa3692 Před 3 lety +8

    TL;DR
    I scripted a primality test. It's pretty boneheaded but was fun.
    After watching your previous vids on this, I wrote a very rudimentary C++ script that checks whether a given number is prime. It does this by brute force checking the modulus of the number and all potential factors (2 and all odds) up to the square root of the number. It took ~17 seconds to verify that the primality of 18,446,744,073,709,551,557 (largest prime less than 2^64) on my Ryzen 5 2400G. I then decided to try to add threading. My implementation is pretty basic and probably full of bad practices because I have no experience, but it works. Basically, it creates a vector of futures and each future checks a range of the possible factors. Each future then returns either 0 if it finds a factor or 1 if it doesn't. I then sum up each element in the vector and if the sum is the same as the number of threads, then the number must be prime. Otherwise, the sum is less and at least one of the futures found a factor, so the number must be composite. Using 7 threads on the same processor to check the same large prime, it takes ~4.4 seconds. All in all, it was a fun little project to work on, thanks for inspiring me to try working on something.

  • @hansangb
    @hansangb Před 3 lety

    Your outtro is some of the best out there!!! LOL

  • @yoav62
    @yoav62 Před 3 lety

    Hello Dave, my favorite "benchmark" is calculating the sum of harmonic series up to limit: S=1/1 + 1/2 + 1/3 .... such series does not converge and the number of items increases by ~3 when increasing X3 when S increase by 1. So with S=25 can occupy a fast computer for ~60 sec. I wrote such programs on VAX/COBOL, Fortran and Turbo-pascal in addition to C. Suggesting to drag race these DOS versions for these compilers with a benchmark. thank you for this great channel.

  • @redpillsatori3020
    @redpillsatori3020 Před 3 lety +8

    Unless you need some high-end, proprietary software like FCP, or are into PC gaming, there's no reason not to switch to an entry-level distro of Linux like Linux Mint or Ubuntu, even if you're a "noob".

    • @SeralthSparro
      @SeralthSparro Před 3 lety

      Honestly at this point pop_os basically is a the king of entry level. It's absolutely insane what modern linux distro are in terms of entry level useability!

    • @SpaceTimeBeing_
      @SpaceTimeBeing_ Před 3 lety +2

      People stick to windows because that's all they know, since it's what that came with their machine, somebody should help them install a completely new OS, they'd never switch by themselves.

    • @DebuggerKnight
      @DebuggerKnight Před 3 lety

      mx linux ftw. debian stability with up to date packages + no systemd

    • @redpillsatori3020
      @redpillsatori3020 Před 3 lety

      @@SpaceTimeBeing_ ..right. If I have one big criticism of Linux is that they have yet to make it easy for people to install or try out.
      I have to give credit to the Raspberry Pi Foundation tho. Their new software for installing distros on SD cards has worked well for me

    • @SpaceTimeBeing_
      @SpaceTimeBeing_ Před 3 lety

      @@redpillsatori3020 Um most Linux distros can be tried without installing, they just run from USB sticks. Linux actually is far more easier than any other OS to try and test out. It is also extremely quick to install, some distributions take less than 10 minutes for the entire process.
      What I was referring to is the fear of installing a new OS, also when switching to a different OS some things may not work right away too.

  • @dagbruck
    @dagbruck Před 3 lety +7

    For this kind of test I can imagine that the overhead of WSL compared to native Linux is very small, due to virtualization support in modern hardware. I have seen that on other virtual machines as well.
    One issue worth investigating is heat generation, and if that might cause the CPU to throttle down, skewing the results.

    • @sablanex
      @sablanex Před 2 lety +1

      It's running for 5 seconds, so I doubt it.

  • @sammyfromsydney
    @sammyfromsydney Před 3 lety +46

    Any time I see a graph with the origin not at zero, I suspect I am being manipulated.

  • @reemontel8036
    @reemontel8036 Před 3 lety

    Awesome series!

  • @delulu6969
    @delulu6969 Před 3 lety +29

    Dave reads papers to solve a problem, not Stack Overflow. Noted.XD

    • @carlosmspk
      @carlosmspk Před 2 lety

      Good stack overflow answers display their sources which tend to be papers, so, you can still start in stack overflow...

  • @charleswoodruff9013
    @charleswoodruff9013 Před 3 lety

    Hey Dave, love your videos! Can you talk about state machines and statecharts? Thanks.

  • @mrright1068
    @mrright1068 Před 3 lety

    Keep going down this vein it is very interesting.

  • @Hadw1n
    @Hadw1n Před 3 lety

    I love those videos so bad :D always have a tiny grin when see videos like these. Greetings from Germany.

  • @tomtravis858
    @tomtravis858 Před 3 lety

    Nice! Thanks for this video.

  • @Borsting89
    @Borsting89 Před 3 lety

    Damn, youre getting some good use of python here as well. Love your videos. The quality is top notch and knowing that it is produced by a software dev veteran proves that.

  • @oddolavssn8343
    @oddolavssn8343 Před rokem

    I just love how an 'old' (don't worry, I'm older than you!) retired Windows developer, can be so open-minded about Linux. Before you know it, Dave, you'll start using Linux as your daily driver. ;-). My own PC experience started with DOS 3.0, and I've used Microsoft until I finally ditched Win10 about 18 months ago. Then I've been 'distro-hopping' for a year, until I finally settled with Linux Fedora FXCE. The only thing I really miss from Windows is Pinball. Pinball was to me many hours of great fun, and I got quite good at it too!

  • @Gundwn
    @Gundwn Před 3 lety +4

    would be cool to see this in .NET using the Parallel library for a comparison. you can specify the MaxDegreeOfParallelism too if you want to compare different CPUs and cap threads to make it a fair fight.

  • @DouwedeJong
    @DouwedeJong Před 3 lety

    Dave, I used to work in market data. We worked with intel to get data through computers as fast as possible, while managing state and adding value like doing calculations. We had the challenge that we would want one equity traded on multiple exchanges and all its derivatives (futures, ETFs, CDN,) send to one algorithm. We eventually had to do core binding, because you would have the danger that the OS queue would switch the task to another core, and then the associated cache had to be re-exchanged by the QuickPath bus. This caused delay and as the market keeps coming in (we used FPGA for the that) you eventually get interrupted and have to put the data in buffers.
    The most effective eventually was working with red-hat on linux (we could compute the O/S to match the hardware), we worked with Microsoft but the core-binding 'guarantee' was more a most favorable flag rather than absolute. At the time red-hat needed a break to get into banking platforms, so they invested heavily in this, Microsoft's engineers was far more knowledgeable on these problems, but they seemed to have an internal problem with other departments which made them lose the business. This was 2005 to 2012, at the time hypervisors was all the rage.

  • @techboy6788
    @techboy6788 Před 3 lety +213

    I don't even need to watch this video to know that it's excellent.

  • @cowboyfrankspersonalvideos8869

    My partner, a system annalist, used to have a T-shirt that said "If all else fails, manipulate the data"

    • @orkhepaj
      @orkhepaj Před 3 lety +1

      thats wrong, always manipulate the data and you dont even need to fail then

    • @cyborgedude
      @cyborgedude Před 3 lety

      @zag
      You do that and you'll get caught

    • @cowboyfrankspersonalvideos8869
      @cowboyfrankspersonalvideos8869 Před 3 lety +1

      @@cyborgedude He never did,. It was an internal company joke T-shirt he received for his 15th anniversary party with the company

    • @gm2407
      @gm2407 Před 2 lety

      Statistics is all about data contextualisation. So you never manipulate the data, you mearly consistantly apply the returned result in context at the required periodical point. If the context is not helpful you change the context for which you review the data or you add more context apply it consistantly with the existing data. You cant argue with statistics only with the interpretation or the lack of context. However it becomes rationalisations vs expected behaviours.

  • @richardrisner921
    @richardrisner921 Před 3 lety +1

    I appreciate how he includes an advertisement for task manager in every video

  • @ahmadsalaah
    @ahmadsalaah Před 3 lety +1

    I love this content so much I learn new things & make me excited to code 💗💗

  • @mrcrackerist
    @mrcrackerist Před 3 lety +40

    Nice video Dave, any chance for a non WSL comparison? :)

    • @DavesGarage
      @DavesGarage  Před 3 lety +39

      Well, I think I need to compare native to WSL2 to show whether or not there's any performance hit from running within the hypervisor!

    • @reeman2.0
      @reeman2.0 Před 3 lety +20

      @@DavesGarage Of course there is, you're running windows AND Linux at the same time, and we've all seen the amount of system resources windows likes to hog when seemingly idle.

    • @FarrellMcGovern
      @FarrellMcGovern Před 3 lety +5

      I, too, would love to see a native set of benchmarking...as well, you might also try benchmarking different Linux distros. I have run a number of distros, using the same windowing manager, KDE Plasma, and have found that the Arch-based Manjaro feels much faster than Mint, which is Ubuntu/Debian-based. I don't have any numbers, and I don't know if that is just the windowing manager or the underlying Linux implementation. Of course, a full slate should also include a RHEL version, Debian, and probably Slackware, since it is the least encumbered distro out there.

    • @AllForMarketing
      @AllForMarketing Před 3 lety +1

      iirc TLB misses are heavier on hypervisor since you have to go through one more indirection to find the physical address.

    • @beefbroccoli5489
      @beefbroccoli5489 Před 3 lety +1

      WSL2 isn't quite just "linux is a vm" either. It's using `vmmem` to dynamically allocate / manage resources at run-time, and despite it's name, this also includes the cpu!

  • @donaldpepper6411
    @donaldpepper6411 Před 2 lety

    This video is EXCELLENT. Do you intend to do any more videos on testing linux and windows, in different ways?

  • @ashishpatel350
    @ashishpatel350 Před 3 lety +10

    Finally someone that actually explains and understands on how to properly benchmark a system.
    Unlike most of the reviewers

    • @airgliderz
      @airgliderz Před 3 lety +4

      But in the end benchmarking only matters running the programs you utilize.

    • @CallousCoder
      @CallousCoder Před 2 lety +1

      @@airgliderz exactly, you need real life examples. Blender for example I run on Windows if I have heavy CUDA raytracing because the Nvidia drivers are well optimized on Windows. If it’s OpenGL only Blender out performs on Windows (in most renders, not all).
      And more importantly than speed is ease of use. As a developer I adore Linux because of having all the tools there are installable with a mere single cli command when I need some library. (Windows finally gets a package manager).

    • @airgliderz
      @airgliderz Před 2 lety

      @@CallousCoder nope. Never did never will. Though would be cool to have a Democrat government job you get raises regardless of job performance, retirement and can't get fired. Democrat ruin everything. Appears you are a Democrat.

    • @CallousCoder
      @CallousCoder Před 2 lety +2

      @@airgliderz WTF are you on about?!

  • @roberthowell8267
    @roberthowell8267 Před 3 lety

    One of my new favorite channels

  • @Pjs75
    @Pjs75 Před 3 lety

    Brilliant. It wasn’t just the threads that were working at blinding speed!

  • @jimmygeorge243
    @jimmygeorge243 Před 3 lety

    Big fan of your videos and man your voice is money.

  • @ari-mcbrown
    @ari-mcbrown Před 3 lety

    core-flex incoming @08:35 XD... I see you upgraded the camera? And OMG what lens/focal length are you using, the effect is awesome :) .... 4k@60fps, awesome... wonder how long that took to render.

  • @PressThatButton
    @PressThatButton Před 3 lety

    I am likely not the first person to say this, nor will I be the last. I did not realize until today that your intro music is from "Life's Been Good" by Joe Walsh. How brilliant. Amazing video, as always, Dave. Please keep them coming! I'm just starting to learn Python and it's opening up a whole new world for me where I feel like I can actually control a little piece of the world around me. Thank you for the constant inspiration.

  • @danknemez
    @danknemez Před 3 lety +1

    Great video as always! Should probably give native Linux a shot at this too :)
    The 64 thread limit comes from Windows' processor groups infrastructure, which behaves somewhat like NUMA nodes to software, not sure whether the reasoning for 64 is deeper than this but it simply seems to be that Windows only uses a 64bit uint for affinity masks, and since by default each process only gets 1 affinity mask (due to legacy reasons), it effectively limits the process to 64 threads.
    This actually holds even if you set the thread count MANUALLY over 64, Windows will simply not schedule any thread from the process outside of its 64 thread "group" unless it explicitly indicates it with SetThreadGroupAffinity.

  • @mdxggxek1909
    @mdxggxek1909 Před 3 lety +7

    what about the performance on native linux instead of wsl?

  • @robcab3308
    @robcab3308 Před 2 lety

    love your videos!

  • @perwestermark8920
    @perwestermark8920 Před 3 lety +18

    I would like to see MinGW gcc compiler for Windows so we get both gcc and Clang tested on both platforms.

  • @PheonixAsh1983
    @PheonixAsh1983 Před 3 lety +2

    great vid. I was quite surprised by the result, has Windows moved towards a fairer scheduler in recent years? If you bump the thread priority up does that alter your findings greatly? Also, just for information, what did you have plugged into the computer, io cards and external peripherals?

    • @RomanMlejnek
      @RomanMlejnek Před 3 lety

      it's not even Linux but WSL (LSW if they actually called it by what it does)

  • @Banner1986
    @Banner1986 Před 2 lety

    I'm far more excited than I should be to see how the output varies with the 3d cache of upcoming zen3 chips.

  • @jmasl7
    @jmasl7 Před 3 lety

    Hello Dave. These videos are great - keep them coming please.
    Something I'd be really interested to hear your insight into would be about the Windows Explorer (once called 'File Manager'?) and why it always seems to have this problem of the menu that pops up when I click the right mouse button sometimes taking a very long time to appear. It's a problem I've seen 'fixed' several times over the years (decades?) but it always seems to keep coming back. I kind of suspect the problem might not actually be in Windows itself but rather in the menu handlers that various bits of software add when they are installed, but couldn't Windows just ignore the ones that are slow to respond and show a menu quickly?

  • @slippydouglas
    @slippydouglas Před 3 lety

    10:27 _“Makes that comparison a much more of an Apples to Apples comparison.”_ Nice under-the-radar pun.

    • @slippydouglas
      @slippydouglas Před 3 lety

      Just in case anyone didn’t get it, Apple didn’t invent Clang/LLVM, but they have contributed many man-hours to it, growing it from a little-known university project to one of the best compilers currently available- so Clang/LLVM is often thought of as “Apple’s compiler”.

  • @deadpersimmon
    @deadpersimmon Před 3 lety +1

    I have found your channel recently after watching a lot of Ben Eater and his surprisingly (for me) successful attempts to build a working computer from basically nothing. Perhaps, if you find yourself searching for something to cover in your future videos, I would like to suggest the following topic, the logical next step: history of operating systems and OS design.

  • @imyasharya
    @imyasharya Před 3 lety +2

    5:02 It reminded me of Sieve of Eratosthenes. But you said to repeat till the square root of upper limit. What's the upper limit here?

    • @MichaelPohoreski
      @MichaelPohoreski Před 3 lety

      Whatever the max number you want to test if prime.
      For example if you want to find primes between 1 .. 100 you only need to test if each is number is prime by seeing if odd numbers between 3 and sqrt(100) = 10 --> 11 even divides into that number. That is, test if each odd number is divisible by 3, 5, 7, 9, 11.
      You _can't_ test between 3..9 since 9*9 is only 81, you need to go to the next odd number 11 since 11*11 = 121 which is > 100.

  • @willboler830
    @willboler830 Před 2 lety

    7:55 in, my thoughts without looking too much into it is a hybrid approach: parallelize for the first few iterations when it's worthwhile, then fall back to single core for the remaining primes.

  • @iZodux
    @iZodux Před 11 měsíci

    There's something about the way you talk that reminds me of Norm Macdonald. It is glorious.