Live data from Hacker News

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

randomascii.wordpress.com

221–230 of 509 posts

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

#221
post #163
post #49

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

"We've come to the point where building the browser from scratch takes more than building the OS itself." It doesn't. It took ~5h to build a tiny (~150 MB) complete system (Linux kernel + Yocto based "OS") from sources on 4 core PC few years ago. With modern CPU, I guess, it might be 3h or so. On the side note, the build process generated >50GB of files.

If "OS" isn't restricted to *nix then we have ReactOS that builds in around 10 minutes!

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

#222

For my own amusement, when ever I get a new OS build on my machine, I'd open up a task manager and watch CPU load just by wiggling the mouse a lot or maybe simply pressing page up and down. I'm pretty sure it's always pretty easy to generate 25% CPU doing very little. Another thing would be just opening a local file from within a running application and wondering why multiple seconds and hence billions of CPU cycles…

I'm pretty sure it's always pretty easy to generate 25% CPU doing very little

not for me, just tried mouse wiggling, scrolling, page up/down in browsers/file managers on Windows 7, 10 and Ubuntu 16 and none of those have such behaviour. Likewise for opening a file dialog. And I didn't expect otherwise actually, what OS are you talking about?

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

#223

Earlier quoted context omitted.

Staying responsive (under load) is also still a work in progress on Linux: https://www.phoronix.com/scan.php?page=news_item&px=BFQ-Queu...

That is a disk scheduler and mostly for spinning disks. I haven't seen a stuck mouse cursor for a long time in linux.

I always found this peculiar about linux; even when the system is swapping hard and application windows/window managers completely freeze, the cursor always remains responsive and movement rendered without so much as a hitch.

I wonder if xorg has some sort of kernel support to enable this.

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

#224
post #218

Earlier quoted context omitted.

The heir to the Pascal/Delphi kingdom seems to be Nim[0], though it takes its syntax from Python. Compilation is impressively quick, even though it goes through C. [0] https://nim-lang.org/

Which is a language I absolutely adore, and am building a homomorphic encryption based product leveraging Hyperledger on a rather obscure 160 hardware thread POWER8 server; it can definitely work for real production tasks today, even if some parts are rough (and hell, C++ can be rough too). Parallel compilation on this machine is stupidly quick :)

Any pointers to what power hardware you are running?

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

#225
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.

FWIW I agree with you. Visual Studio looks like it was designed by fisher price, the whole thing takes up ~60gb of space, and if you're not running it on a high-end work station it's likely going to lag when editing large code bases. Not to mention it's closed source software.

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

#226

For my own amusement, when ever I get a new OS build on my machine, I'd open up a task manager and watch CPU load just by wiggling the mouse a lot or maybe simply pressing page up and down. I'm pretty sure it's always pretty easy to generate 25% CPU doing very little. Another thing would be just opening a local file from within a running application and wondering why multiple seconds and hence billions of CPU cycles…

I wonder if this accurately captures the time spent on the task. I am surprised opening a file takes that long. I primarily live in a Linux environment, but I also run some Java code for R&D data collection on Windows also. It opens 10-20 files on startup which does not lead to a perceptible delay. I have not measured exact performance, but if opening (all 20) took more than half a second or so I would have surely noticed this.

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

#227
I had the same exact problem. A machine that is overkill spec wise but the mouse and keyboard would freeze up every minute on the minute.

I tracked it down to my desktop wallpaper being on a rotation. Seriously... how bad does that have to be implemented in Windows to actually hang the mouse and keyboard?

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

#228
post #211
post #205

Earlier quoted context omitted.

Where can I learn more about it in a high level way instead of delving into source code? I am curious how it is done in a portable way across all OSes, specially crude system linkers and OSes without POSIX semantics. For example, I imagine this can be made via ELF sections, but not all OSes use ELF.

My guess: The trick is not to have "template instantiation" but "module instantiation" (aka Functors in OCaml). Now you can instantiate only once. For example, if the compiler encounters "List ", it would instantiate into the "List$Foo.o" file or not if it already exists. Java works similarly, except the files have the extension "class" instead of "o". More generally speaking: The trick must be to not generate identi…

You are focusing only on generics and missing all the module metadata and related module type information.

In module based languages, the symbol table is expected to be stored on the binary, either to be directly used by tools or to generate human readable formats (.mli).

So if one uses the system C linker, it means being constrained to the file format used by such linker.

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

#229
post #90

Earlier quoted context omitted.

Firefox is C and Rust, so I’m not sure there’s such a direct comparison.

C and Rust? Firefox looks like a ton of C++ to me: https://github.com/mozilla/gecko-dev

Primarily C++, but Rust is there as well. However it's mostly libraries which were extracted from gecko itself, so it's dependencies, not main codebase.

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

#230
post #208

Earlier quoted context omitted.

I used to be a C++ guy for 20 years, but won't go back unless absolutely necessary. I mean, it's tempting -- there are some cool new language features. I find that the abstractions are leaky, though, so you still have to understand all the hairy edge-cases. The language has gone insane. I'm 40 -- I want to get stuff done before I die, not play clever games to get around my language / system.

A bit older here. C++ has been by next loved language after Turbo Pascal, since then I learned and used countless languages, but C++ was always on the "if you can only pick 5" kind of list. Since 2006 I am mostly a Java/.NET languages guy, but still keep C++ on that list. Mostly because I won't use C unless obliged to do so, and all languages intended to be "a better C++" still haven't proved themselves on the type o…

> I dream of the day I could have an OpenJDK with AOT compilation to native code with support for value types

Check out http://www.scala-native.org/en/latest/

Maybe it will have value types after java gets them

Post reply on HN