Live data from Hacker News

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

randomascii.wordpress.com

101–110 of 320 posts

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

#101
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…

This isn't meant to be an especially religious comment, but I regularly switch back and forth between OSX and Windows 10 and wanted to make mention of the differences. I also use Ubuntu fairly regularly but only over ssh so I'll discount it from this comparison. Both OSX and Windows 10 do suffer from UI lag but, in my experience, it is far worse on Windows 10 to the point where I have come to absolutely detest Window…

Ubuntu w/Gnome is possibly the worst offender. I actually like Gnome a lot but anytime I leave my PC on for more than a day the UI gets incredibly sluggish. Just moving windows around gets choppy and there is a annoying pause whenever I click the application launcher (happens even without the animation).

I've also found macOS provides the smoothest experience. I haven't found W10 that bad, but I haven't used it that extensively. I really only boot into Windows to play games these days.

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

#102
post #92
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…

More cores, more RAM, more cache, more concurrency will help create higher total throughput but usually also mean higher latency because of increased context switching, natural need for more resource locks, increased delay in searching/reading larger stores like cache & RAM, and, higher latency penalties when there are cache misses and/or applications that require write-through policies. Things like faster clocks (wh…

All the concerns in your comment are real, but they can be boiled down to one simple fact: Moore's law is dead.

Our processors are now not advancing nearly as quickly as people can create solutions for them. Case in point - Virtual Reality, which has technically been on the market for years, but out of reach for most users.

If processors are not improving, everything else slows down. Graphics, games, and the internet ten years from now will look pretty much the same as it does today.

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

#103

Malwarebytes and McAfee cause this. Something to do with updating policies.

Those do cause a lot of problems in general, but this particular issue had a different root cause. He traces it all the way back from the symptoms in the article. Worth a read!

Actually the reason might be the same, those programs also scan allocated memory space of user programs.

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

#104
post #76
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…

The "C++, threads and locks" programming model is inherently performance-unpredictable, since a high priority thread can't interrupt a low priority thread holding a lock to a contended resource. The field has made progress in "figuring out" the general problem in the form of other programming models but that stuff is not close to gaining popularity on the desktop. Things like STM, lockless peristent data structures,…

The C++ (and many other languages) model of threads and locks have clearly proven overly complex and bug prone. It's incredibly easy to write software with race conditions and incredibly difficult to debug.

The best advance in recent years, is recognizing that most latency is due to network access, and using single-threaded, but asynchronous models like in javascript. It definitely does not remove race conditions, but makes them much easier to understand and debug.

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

#106
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…

Priority inversion.

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

#107
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…

Could this be because many programs are still single threaded (eg. javascript on the browser), but multi-cores workstations usually have a lower performance per single-thread?

The article states that this problem actually came from service workers (and how MS allocates pages so V8 can spawn this them). Service workers are specifically designed to circumvent issues regarding UI lag from a single thread..

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

#108
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…

Almost all UI programing is single threaded. If the main thread is blocked for more than 10-16ms, then frames start dropping and the UI is unresponsive for that time. Add locks and you add many more causes for the main thread to be blocked beyond pure computation.

Not just UI programming, almost all programming is single threaded. What programmer wants to deal with threads, really? They only do because they need to get more performance out of a chip.

And that leads us to the real problem. Chips are not advancing at the rate they should. Additional performance gains come from adding multiple chips to the same die, not making the chips faster. This forces programmers to think about parallelism, which makes everything harder.

In the mid-90s, chips were improving so faster that you wouldn't need to consider special tricks, you could just wait 3 or 4 months and a chip would come out that handled your application.

Now single processor performance is basically at a standstill and it's up to the software developer to spread work in parallel to make things faster.

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

#109
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…

This isn't meant to be an especially religious comment, but I regularly switch back and forth between OSX and Windows 10 and wanted to make mention of the differences. I also use Ubuntu fairly regularly but only over ssh so I'll discount it from this comparison. Both OSX and Windows 10 do suffer from UI lag but, in my experience, it is far worse on Windows 10 to the point where I have come to absolutely detest Window…

This is strange. I run a 6 year old PC with win 10 on it. It has 4GB of RAM. I use an SSD and an M.2 drive. The thing is snappy as hell. I face zero lags, jitters, or switching delays at all. I get the feeling that writing things to disk is causing delays.

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

#110
Hi Bruce. This is a fantastic article, but I needed to read it twice to understand everything. Very dense in information, and sometimes the order of things make it hard to follow. Sometimes you tell us what you did (e. g. modified the virtual memory scanner) before telling us why (what CFG is, how it works), which was confusing.

> It turns out that reproducing the slow scanning from the sampling data was quite easy.

This was the first thing that went over my head. Going from one stack trace to reproducing it is quite the jump. Maybe add a sentence "The interesting part of this trace is NtQueryVirtualMemory, which is used to scan process memory." Might be obvious to you, but for me that trace was "just a bunch of Windows stuff" at first.

Post reply on HN