Live data from Hacker News

24-core CPU and I can’t move my mouse

randomascii.wordpress.com

121–130 of 509 posts

Re: 24-core CPU and I can’t move my mouse

#121
post #20

I grew up on the Commodore 64 (1 Core, 1 hyper-thread :-), almost 1 MHz clock freq, almost 64 K usable RAM). The machine was usually pretty responsive, but when I typed too quickly in my word processor it sometimes got stuck and ate a few characters. I used to think: "If computers were only fast enough so I could type without interruption...". If you'd asked me back then for a top ten list what I wished computers cou…

It's all just trade offs. However fast or powerful your machine is, software will use as much of that resource as possible, up to the point where it occasionally interferes with input (but not too much or you'll switch to something else).

There's a talk by Guy Steele 'growing a language', he says that ideally a language should shrink as it gets smarter semantics.

Re: 24-core CPU and I can’t move my mouse

#122
post #49

We've come to the point where building the browser from scratch takes more than building the OS itself.

Interesting metric actually. Building Windows takes 12 hours [1]. It's a bit harder to find metrics on Linux. You can build the kernel in 60 seconds apparently [2] but that is not a complete operating system.

[1] https://stackoverflow.com/questions/226377/operating-system-... [2] http://www.phoronix.com/scan.php?page=news_item&px=MTAyNjU

Re: 24-core CPU and I can’t move my mouse

#123
post #57

He's also written some stuff regarding Visual Studio perf. https://randomascii.wordpress.com/2014/04/15/self-inflicted-... Close to my heart as I use Visual Studio all day. Horrid piece of software. I'll probably get downvoted for this.

I live in two worlds at the moment - supporting and maintaining a large PHP application (for which I use phpStorm) and developing .NET applications (for which I, obviously, use VS). I've been a VS user for nigh-on 10 years now and always found the experience really fantastic. I think it's certainly more coherent that the IntelliJ-based IDEs (which, to be fair, are also very good). Anyway, I'm genuinely surprised to s…

VS for .NET is a different beast than VS for C++, the latter being a far less tool-friendly environment. There's also the point that newer versions sometimes improve a lot over older ones, but licensing costs may keep people on older versions for too long (that, and the fact that with large C++ projects an upgrade is rarely straight-forward). This then ends up with people hating VS when all they've used is VS2008 on C++.

Not that I don't have any complaints (although those may very well be due to certain extensions), but I've always found VS to be much more responsive, stable, and featureful on the .NET side than C++; much of that certainly due to complexities of the respective languages.

Re: 24-core CPU and I can’t move my mouse

#124
post #78
post #61

Earlier quoted context omitted.

> Damn, are we doing this wrong? Yes: Not isolating different modules sufficiently to allow you to avoid including most headers when compiling most modules. Patterns to do this in C++ has been well understood for two decades: Strict separation of concerns coupled with facades at the boundaries that let all the implementation details of the modules remain hidden. Yes, it has a cost: You're incurring extra call overhea…

While what you're saying might be true, I can't help but think about Pascal units and say: "It didn't have to be this hard! We solved this problem 40 years ago!"

Sorry, it's the same in Delphi (Pascal successor). The compilation time goes up exponentially as number of units goes up. Compilation of 2.000 files (750.000 lines) takes about 20 minutes.

Re: 24-core CPU and I can’t move my mouse

#125
post #45

Full disclosure: I work for Google on Chrome. A Chrome build is truly a computational load to be reckoned with. Without the distributed build, a from-scratch build of Chrome will take at least 30 minutes on a Macbook Pro--maybe an hour(!). TBH I don't remember toughing out a full build without resorting to goma. Even on a hefty workstation, a full build is a go-for-lunch kind of interruption. It will absolutely own a…

> Damn, are we doing this wrong?

Not using modules? Yeah I know C++'s made the mistake of not using them since the beginning and it is a long road until they are here (202x ?).

However Google was showing their modules work at CppCon 2016, so I guess Chrome does not make use of clang modules.

Re: 24-core CPU and I can’t move my mouse

#126
post #118

Earlier quoted context omitted.

These numbers don't seem abnormal; I recall building Safari many years ago, and having multi-GB of intermediate products shrink down to a 30MB executable (plus a few hundred MB of debug symbol). So, I have a thought: if we're spending all this time to compile functions (particularly template functions) that are just thrown away later, why are we performing all our optimization passes up-front? Surely, optimization pa…

Doesn't link-time code generation already exist (at least on MSVC, I think). It makes the linking step so much more expensive, though, which sucks for incremental builds.

Ah, yes, I knew I had to be missing something! Needing to support incremental builds are what makes C++ compilation so frustrating. I wonder why this is so difficult though - dependency tracking should be a thing that can carry through the link stage. Just track what files a given function depend on, and only recompile/recodegen functions that have changed. Of course, it still sucks massively if you change a header file, but that's why you separate the header from the implementation of the methods :)

/LTCG also doesn't seem to parallelize well - last I checked it still ran all the codegen on one core. Maybe that's different now?

Re: 24-core CPU and I can’t move my mouse

#127

Earlier quoted context omitted.

Unfortunately that's not feasible for highly performance-sensitive projects like browsers or games.

The 90/10 rule still holds. Sometimes it's even more skewed.

Even Knuth talked about it being a 97:3 rule[1] and according to some it's gotten more skewed since then[2]

[1] http://sbel.wisc.edu/Courses/ME964/Literature/knuthProgrammi...

[2] http://blog.cr.yp.to/20150314-optimizing.html

Re: 24-core CPU and I can’t move my mouse

#128
post #61

Earlier quoted context omitted.

> Damn, are we doing this wrong? Yes: Not isolating different modules sufficiently to allow you to avoid including most headers when compiling most modules. Patterns to do this in C++ has been well understood for two decades: Strict separation of concerns coupled with facades at the boundaries that let all the implementation details of the modules remain hidden. Yes, it has a cost: You're incurring extra call overhea…

Unfortunately that's not feasible for highly performance-sensitive projects like browsers or games.

> Unfortunately that's not feasible for highly performance-sensitive projects like browsers or games.

Bullshit. Code needs to be compiled, but it isn't required to build everything from scratch whenever someone touches a source file.

Additionally, not all code is located in any hot path.

Re: 24-core CPU and I can’t move my mouse

#129

I was wondering what ETW is, and found in one of his other posts: ETW (Event Tracing for Windows). He seems to be one of the main contributors of https://github.com/google/UIforETW Seems to be quite useful. --- About the post: tl;dr: NtGdiCloseProcess has a system-wide global lock which is used quite often e.g. during a build of Chrome which spawns a lot of processes. This problem seems to be introduced between Windo…

As a Windows outsider, I'm puzzled why programs used as part of the Chrome build system (which I'd expect to only use console I/O) are using APIs that cause interactions with the GUI? By analogy, is this not like gcc redundantly setting up a connection to the Xserver each time it is run?

(I'm making an assumption that NtGdiCloseProcess is part of the GUI API (GDI == Graphics Device Interface) which is why it may interact with the GUI message passing.)

Re: 24-core CPU and I can’t move my mouse

#130
post #85

Earlier quoted context omitted.

It seems to have improved these past years but beach balls used to be comically widespread on OS X. I'm not at all convinced OS X is in any better shape than Windows. And OS X certainly doesn't have anywhere near all the kick ass monitoring tools that Windows as, such as the ones shown in this article.

You do know that OS X have DTrace?

And then with DTrace - instruments! https://developer.apple.com/library/content/documentation/De...
Post reply on HN