Live data from Hacker News

24-core CPU and I can’t type an email

randomascii.wordpress.com

61–70 of 320 posts

Re: 24-core CPU and I can’t type an email

#61

Earlier quoted context omitted.

What OS do you have in mind? Apparently OSX locks are fair, but the downside is that this may reduce throughput. Linux locks? I have no idea and would be interested to know. I suspect that occasionally fair locks would be ideal, but I don't know if they can be implemented efficiently.

pthreads don't guarantee fairness. futexes, the underlying locking primitive on Linux and the driver of the glibc implementation, don't either. Futexes do support priority inheritance, so you can use process priority safely. You might drop priority after releasing a lock to ensure some other thread gets a go, and as long as you control the priority of the other contenders, that can work well. Basics of futexes are he…

Ironically, priorities as a way of "giving control" to another thread only work if you have a shortage of CPU cores. On my 24-core workstation I can normally run all runnable threads, regardless of priority. The implications are non-obvious.

Re: 24-core CPU and I can’t type an email

#62
post #57

Earlier quoted context omitted.

I'm confused about your suggestion. I work on the Chrome web browser on the Windows platform. If we want to allocate memory we, ultimately, need to call VirtualAlloc. I could work on Chrome for Linux, but then this bug on Windows might never get found or fixed. I am satisfied with my choices, despite the occasional glitches.

They failed to distinguish between "I use the Chrome browser on Windows to get work done" and "I work at Google, making Chrome for Windows". Human languages, what are you going to do?

Good point. How's this:

I modify the source code of the Chrome browser in order to make the final PE files that are compiled from the aforementioned source code work more efficiently.

Re: 24-core CPU and I can’t type an email

#63
post #29

> This is because Windows locks are, by design, not fair Get better OS; problem solved.

People on this website, in systems programming communities, and in articles about performance are constantly telling people not to use fair locks because they're slower, arguing that the overhead of fair locking is far too high for the problem it solves, which (they say) practically never occurs anyway on modern machines. It's hard to blame people for taking them up on it.

Re: 24-core CPU and I can’t type an email

#64

Earlier quoted context omitted.

What OS do you have in mind? Apparently OSX locks are fair, but the downside is that this may reduce throughput. Linux locks? I have no idea and would be interested to know. I suspect that occasionally fair locks would be ideal, but I don't know if they can be implemented efficiently.

pthreads don't guarantee fairness. futexes, the underlying locking primitive on Linux and the driver of the glibc implementation, don't either. Futexes do support priority inheritance, so you can use process priority safely. You might drop priority after releasing a lock to ensure some other thread gets a go, and as long as you control the priority of the other contenders, that can work well. Basics of futexes are he…

Fairness is expensive. A lock must go to the thread that is eligible to get that lock according to fairness, even if another ineligible thread is executing on a CPU and is ready to grab that lock. The ineligible thread is forced to block, and the ineligible one may have to be woken up and assigned to a CPU. Until the eligible thread is dispatched and grabs the lock, multiple cores may wastefully go through a thread switch due to hitting that lock instead of just grabbing and releasing it.

Re: 24-core CPU and I can’t type an email

#65
post #46

I just kind of figured we'd stop having UI lag by now. I work on a 24 core workstation with 64GB of RAM and things lag all the time. Not slow to complete, like jittery key entry and non-responses. Haven't we figured out thread prioritization by now? Can't we make sure something draws 60 times per second while things are going on in the background? My Android Studio build should be totally isolated from my inbox. I kn…

I have a core i5 with 32gb of factory oced ddr3 ram that is faster than many ddr4 ones

My machine randomly has input delay or mouse even after new install...

Re: 24-core CPU and I can’t type an email

#67

Earlier quoted context omitted.

pthreads don't guarantee fairness. futexes, the underlying locking primitive on Linux and the driver of the glibc implementation, don't either. Futexes do support priority inheritance, so you can use process priority safely. You might drop priority after releasing a lock to ensure some other thread gets a go, and as long as you control the priority of the other contenders, that can work well. Basics of futexes are he…

Ironically, priorities as a way of "giving control" to another thread only work if you have a shortage of CPU cores. On my 24-core workstation I can normally run all runnable threads, regardless of priority. The implications are non-obvious.

Yes because if you have a shortage of cores, you have more threads that are blocked or in a run queue. When you have threads queued, that's when prioritizing works: you need a backlog of waiting threads in order to choose the "best" one to proceed. If threads have cores, the prioritizing loses value.

Re: 24-core CPU and I can’t type an email

#68
post #57

Earlier quoted context omitted.

They failed to distinguish between "I use the Chrome browser on Windows to get work done" and "I work at Google, making Chrome for Windows". Human languages, what are you going to do?

Good point. How's this: I modify the source code of the Chrome browser in order to make the final PE files that are compiled from the aforementioned source code work more efficiently.

Or how about

"I work at Google, making Chrome for Windows".

Re: 24-core CPU and I can’t type an email

#69
post #46

I just kind of figured we'd stop having UI lag by now. I work on a 24 core workstation with 64GB of RAM and things lag all the time. Not slow to complete, like jittery key entry and non-responses. Haven't we figured out thread prioritization by now? Can't we make sure something draws 60 times per second while things are going on in the background? My Android Studio build should be totally isolated from my inbox. I kn…

Didn't BeOS get this right?

I too wonder why UI threads are still so obnoxiously tied to... everything else. Put UI in the fast lane! (At least until some bug tries to make a bajillion calls a second)

Then I remembered how much more complicated it is to write proper multithreaded GUI code :P

Re: 24-core CPU and I can’t type an email

#70

Earlier quoted context omitted.

I usually append /h/ to the URL (/mail/h/) and get a HTML version. It can work even without JS and it has classic design with small rows that works well on my small screen. No Material Design and no huge elements with large offsets.

I just tried that, and noticed promotions in the inbox, the non-HTML version separated the "primary" from the "promotions". Are they merging them to keep HTML version annoying?

The HTML version is the legacy UI from a few generations ago, before features like inbox categories were implemented.
Post reply on HN