News for hackers. Stuff that matters.
Re:24-core CPU and I can’t type an email by habosa on Friday August 17, 2018 @01:44AM (#17780548)
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 know this is a bit orthogonal to the article and that I'm certainly not well informed about Operating Systems these days, I'd love to get schooled in the comments.

Re:24-core CPU and I can’t type an email by bartread on Friday August 17, 2018 @02:25AM (#17780685)
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 Windows 10. It's particularly bad on the login/unlock screen, which often takes multiple seconds to even appear when you get back to your machine - frustrating when you're in a hurry.

With that said, some of it is certainly application specifically. Office 365 Outlook, for example, is particularly egregious in this regard: switching between windows, or between mail and calendar is awful. Microsoft Teams also regularly hangs for multiple seconds when switching between teams, or between chats. Extremely aggravating.

Re:24-core CPU and I can’t type an email by harperlee on Friday August 17, 2018 @09:08AM (#17782511)
One thing can't wrap my head around: if I receive a big (10Mb) email through a slow connection, Outlook completely freezes until the email has finished downloading. I'm talking, not even rendering correctly, and showing white rectangles instead of drawing components. How on earth can this not be a tested use case? Is there no separate thread to connect to the Internet?
Re:24-core CPU and I can’t type an email by samirm on Monday August 27, 2018 @09:47AM (#17851453)
Don't know for certain, but the issue might be that it's using the same thread to scan the attachment and hang, rather than download it and hang.
Re:24-core CPU and I can’t type an email by c3534l on Friday August 17, 2018 @04:28AM (#17781182)
A brand new laptop I bought this year can't run Windows 10, the system is basically unusable. Not a cheap laptop, either, it was one of the more expensive ones. It runs Ubuntu no problem. All of Microsofts products seem to have latency issues, and I still can't figure out for the life of me why it takes longer to open a file in Visual Studio or in Word on my gaming desktop than it does to load a current year $60 video game. I wish designers focused what they call "gamefeel" in video games: how quickly, clearly, and satisfyingly does the program react to user input.

Edit: on the other hand, computers do start up a heck of a lot faster than they used to.

Re:24-core CPU and I can’t type an email by bumholio on Friday August 17, 2018 @09:08AM (#17782513)
I'm typing this on a 5 year old netbook that had cost me $300 back then with 2GB, which I later upgraded to 4GB. It runs Windows 10 very smoothly, it's my living room TV computer for browsing, torrenting (up to 1080p) etc. At this time I'm running Firefox, Chrome, VLC and uTorrent seeding and performance is decent, certainly not "unusable".
Re:24-core CPU and I can’t type an email by smolder on Friday August 17, 2018 @09:49AM (#17782797)
Notably not running visual studio or MS office.
Re:24-core CPU and I can’t type an email by merinowool on Friday August 17, 2018 @09:48PM (#17786476)
It is probably all the spying /s
Re:24-core CPU and I can’t type an email by cordite on Friday August 17, 2018 @02:43AM (#17780756)
OSX capturing and buffering the password input on the login overlay is definitely nice, compared to windows 10 dropping inputs until it is ‘ready’ for the last 2 characters of my password.
Re:24-core CPU and I can’t type an email by exikyut on Friday August 17, 2018 @03:47AM (#17781013)
Thanks to PAM on Linux, "<hostname> login: " is printed by an entirely different set of processes than the "Password: " that follows it.

At least in Windows you aren't at a TTY that echos everything to the screen by default until PAM has hauled itself (and its umpteen libraries) off the disk (yes people still have 5400RPM HDDs :D), initialized, and put the terminal into no-echo mode...

Re:24-core CPU and I can’t type an email by arendtio on Friday August 17, 2018 @04:10AM (#17781115)
I wonder why so many are talking about SSD vs. HDD in this discussion. From my experience on Linux it doesn't really matter if you have enough RAM. Yes, booting from a SSD is faster, but once everything is loaded the system mostly works on top of the RAM (waiting for FS sync is rare).

I don't know much about the situation on Windows but at least on linux your HDD is hardly going to cause lags if you have a well configured hardware setup.

Re:24-core CPU and I can’t type an email by AnIdiotOnTheNet on Friday August 17, 2018 @07:37AM (#17781993)
> Yes, booting from a SSD is faster

Laptop users are many, and they care about boot up times. Especially since Linux power management is still awful.

Re:24-core CPU and I can’t type an email by polkadotted on Friday August 17, 2018 @08:35AM (#17782293)
This is a blatant lie that needs to stop. I've been using linux exclusively on laptops for more than 10 years. The first 5 with the HP EliteBook like, currently with Lenovo X1 line.

On my current X1 Yoga 1st gen, I do regularly get almost 1.5x the uptime on battery compared to windows 10.

We got a batch of X1 Carbon 6th gen, which are "optimized for windows 10", where the S3 sleep state was replaced by the S0I3, which is OS-assisted. The X1 Yoga with S3 can both suspend and resume faster than windows 10, despite not having S0I3 (and has longer battery lifetime to booth).

And by fast I mean that by the time the lid is up, the OS is ready. By contrast, windows 10 seems to always shuffle for several seconds after resume, even on the carbon 6th gen.

So please...

Re:24-core CPU and I can’t type an email by arendtio on Friday August 17, 2018 @03:07PM (#17785018)
I am not sure if I would categorize it as a lie. I think it is unprecise and probably misleading. I have very little expertise on the subject but from my perspective, it is more like a driver/support problem. If everything is supported (e.g. some Laptops, but also Smartphones) Linux has quite a good energy footprint, but there seem to be many devices out there which do not have good support (at least out of the box).

One of the problems here is that power-draining can happen by different components. Quite popular are graphics chips, but other components can be part too. For example, a friend of mine has problems with his device waking up from s2idle during transport. That is not exactly what you would expect in such a discussion, but from a users perspective, he has less time to work with his device given his usage pattern.

For me, this isn't much of a problem as I prefer working on a desktop, but I wouldn't accuse someone of being a liar just because he had a bad experience with power consumption on Linux.

Re:24-core CPU and I can’t type an email by drewg123 on Friday August 17, 2018 @10:04AM (#17782886)
My wife just got the Carbon 6th gen. There is an ACPI patch to restore S3. See https://delta-xi.net/#056. Once you've got the patched dsdt.aml, I highly recommend not following their directions, and just loading the file in grub by creating /boot/grub/custom.cfg with the line:

acpi patched_dsdt.aml

This has the advantage of not requiring any manual intervention every time your kernel is updated. The downside is that if you try to dual boot W10, it will BSOD on boot with an ACPI error. To overcome this, take the original dsdt.aml and load it in a custom (not auto-probed) menu entry for windows. You can just clone the auto-probed line, and add before the chainloader line:

acpi old_dsdt.aml

Re:24-core CPU and I can’t type an email by polkadotted on Sunday August 19, 2018 @04:25AM (#17793243)
I already did it, and I'm really glad I can do that since I have no use for S0I3 and I'd rather have the extended battery lifetime. However on windows there's no way to disable this sleep mode, and the laptop has consequently lasts way less when put to sleep in Windows 10, even compared to the 3rd edition (which we also have so that I can compare). How does this put linux in power management, huh?

Sadly, the 6th edition of the Carbon also runs waaay hotter than the 3rd, and I did notice occasional coil whine which was previously absent. When running normally the kernel writes regularly about thermal warnings. It seems that power and heat management is not well managed in this edition, and I see similar reports for the x1 yoga 3rd gen.

Re:24-core CPU and I can’t type an email by rocho on Friday August 17, 2018 @11:04AM (#17783346)
I get 6-8 hours out of my Zenbook with ArchLinux. Nowhere near the touted 9 hours of the specs, or the 12+ of the Macbook.

My system is exceptionally lean. I run bspwm and the radios are always off except WiFi. Still, I feel like I could get a lot more from this laptop. I cannot (and I certainly wouldn't want to) install Windows on dual boot to make a comparison though.

What distribution do you use?

Re:24-core CPU and I can’t type an email by polkadotted on Saturday August 18, 2018 @05:23AM (#17787646)
How can you compare two different laptops? I'm comparing windows and linux on the same laptop.

I personally use debian unstable with a tiling window manager (awesomewm) without a specific DE. However, I generally setup Mint for all my colleagues on the same laptop lines, and there's one colleague running Arch. We all have very similar battery lifetimes.

Re:24-core CPU and I can’t type an email by dpkgreconfig on Friday August 17, 2018 @12:40PM (#17784077)
Have you tried looking for offending processes with powertop?
Re:24-core CPU and I can’t type an email by AnIdiotOnTheNet on Friday August 17, 2018 @09:16AM (#17782559)
Today on Linux Evangelism 101: using a single anecdotal experience as proof that something works right always.
Re:24-core CPU and I can’t type an email by polkadotted on Saturday August 18, 2018 @05:19AM (#17787631)
Sure, however I really like to see what downvoters have to say. The "power management is bad" is pretty generic, isn't it?

High-end laptop lines (Dell, HP, Lenovo) have actually pretty good linux support, they are almost always intel i5+ cpus with integrated graphics which are all very similar. There is next to zero setup required in almost any case. This is known. The drivers are tried and tested. I've never experienced any random "power management issue". Suspend/resume/battery consumption/acpi is working perfectly fine. What else does qualify for "power managment"??

I've been supporting a team of 20+ people with these lines in a mixed environment, and linux since more than a decade was always basically plug and play.

There have been some quirks in some models, which generally required some tweaks in the kernel boot line, to fix issues with backlight tweaking.

Re:24-core CPU and I can’t type an email by mwcampbell on Saturday August 18, 2018 @01:13PM (#17789441)
> High-end laptop lines

Sure, but Linux really ought to shine on the low-end laptops.

Re:24-core CPU and I can’t type an email by polkadotted on Sunday August 19, 2018 @04:17AM (#17793207)
Linux shines also on low-end laptops as long as you're still decent hardware. Nowdays it's still generally an intel core with integrated graphics, memory and I/O controller, so the result will be pretty much the same. Old, good laptops work even better than brand new editions of current laptop lines.

But this doesn't save you from crappy hardware, which is why this kind of argument is a non-starter for me. How well does current windows editions work on low-end crappy laptops that sell for the lowest tier? Not great. These laptops have plenty of little issues on windows as well.

Maybe better than linux, because the drivers have way more work-arounds than linux has.

Have you ever seen the internal linux quirks table to work around buggy and downright horrid hardware? That's what you get with those. If it works at all is thanks to the patience of people that put in the time to work those issues around. I frankly do not blame linux if it doesn't work well with such hardware.

Re:24-core CPU and I can’t type an email by johnchristopher on Friday August 17, 2018 @04:07AM (#17781104)
> Thanks to PAM on Linux, "<hostname> login: " is printed by an entirely different set of processes than the "Password: " that follows it.

Ah! So that's what's going on :D.

Re:24-core CPU and I can’t type an email by exikyut on Saturday August 18, 2018 @12:11AM (#17786820)
On FreeBSD, at least, you can tinker with the sshd to switch between PAM, to get "Password: " and some other sshd-internal mechanism, which prints "<whatever login you just typed>'s password: " instead. Kind of cute.

And you can always run strace -f on whatever handles login (getty, logind, systemd, etc), drop to a TTY and login, to see all the stuff that gets loaded.

Re:24-core CPU and I can’t type an email by tomaskafka on Friday August 17, 2018 @09:20PM (#17786405)
Really? It works for someone like this? Damn you Apple, not for me :(.

https://news.ycombinator.com/item?id=17786400

Re:24-core CPU and I can’t type an email by cordite on Sunday August 19, 2018 @05:12PM (#17796205)
That's only if it doesn't come from suspended sleep. If it has to actually pseudo boot, it drops.
Re:24-core CPU and I can’t type an email by Tobba_ on Friday August 17, 2018 @06:54AM (#17781793)
On Win10 you need to have enough swap space on an SSD; HDD I/O has totally kneecapped latency, seemingly due to blind usage of NCQ (AHCI driver got replaced from Win7), so it chokes out entirely when combined with the even more broken swap manager.

"Enough" meaning "infinite", because you're going to have something leaking all that memory. Task manager doesn't even show memory usage by default (add the "commit size" field), only the working set (and the swapping is insanely aggressive, so memory leaks just don't show up). Nobody seems to actually check that; even built-in stuff like Windows Update leaks pretty badly.

Oh and the memory accounting doesn't even work.

Re:24-core CPU and I can’t type an email by goombastic on Friday August 17, 2018 @02:55AM (#17780804)
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 by jcelerier on Friday August 17, 2018 @03:08AM (#17780866)
I had a friend telling me "check out my new computer it's so snappy!" once and the darn thing was so slow it made my hands shake from the stress. Can't believe anyone on the internet telling they don't have any lag.
Re:24-core CPU and I can’t type an email by herewulf on Friday August 17, 2018 @03:48AM (#17781020)
Every time we get snappier hardware, we just add more software bloat. I pretty much run two kinds of GUI apps (on Linux with a lightweight, tiling window manager): web browsers and terminals. My terminal apps are always very snappy, the web browsers not so much. I'm of the opinion that the computer should wait for me, not the other way around. Doesn't seem to work out that way with "modern UIs".
Re:24-core CPU and I can’t type an email by barrkel on Friday August 17, 2018 @05:26AM (#17781435)
I run a 6 core desktop with 32G, and 1TB M2 SSD, and after an upgrade from Windows 7 to Windows 10 last Christmas, input lag in mintty terminals was dramatically worse. Even just holding down a key and observing the stream of characters at 15 per second or whatever my repeat rate is, it glitches and stutters.
Re:24-core CPU and I can’t type an email by x3sphere on Friday August 17, 2018 @02:44AM (#17780758)
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 by pja on Friday August 17, 2018 @04:38AM (#17781222)
There's a bad memory leak in gnome-shell which was found & fixed back in March, but the Ubuntu devs still haven't merged the full fix into Bionic for some reason: https://bugs.launchpad.net/gnome-shell/+bug/1672297

Edit: Having tried in on my laptop, installing the gjs + libgjs0g version 1.53.3 debs from http://gb.archive.ubuntu.com/ubuntu/pool/main/g/gjs/ onto a bionic install seems to work fine. Worth trying if this bug is affecting you?

Re:24-core CPU and I can’t type an email by ealexhudson on Friday August 17, 2018 @03:07AM (#17780859)
I'm running Gnome and for the most part it has been excellent; Linux in general, though, still has a lot of trouble maintaining good UI speed at the same time as I/O throughput. I'm on Fedora, and dnf/rpm is an excellent example - even though I'm on an SSD, I can tell when something is updating in the background because stuff will lag for a little while. It feels like this has been a problem forever, and while it has definitely improved over time it's still not really possible to say, in a simple way, "I care more about interactivity than other stuff, prioritise that" (as far as I know, anyway).
Re:24-core CPU and I can’t type an email by jcelerier on Friday August 17, 2018 @03:12AM (#17780888)
> while it has definitely improved over time it's still not really possible to say, in a simple way, "I care more about interactivity than other stuff, prioritise that

that's not what mainline kernel optimizes for, you have to use liquorix or another kernel (https://liquorix.net/)

Re:24-core CPU and I can’t type an email by raarts on Friday August 17, 2018 @03:33AM (#17780965)
You would assume that big guys like RedHat would already have done this for you.
Re:24-core CPU and I can’t type an email by renox on Friday August 17, 2018 @06:35AM (#17781723)
RedHat's business is servers' support: it's quite logical that the desktop they provide is as much as possible similar to the server's configuration because developers will test on their workstation.. So no, I don't expect that RedHat will do this.
Re:24-core CPU and I can’t type an email by ben-schaaf on Friday August 17, 2018 @03:14AM (#17780896)
I've found alt-f2 then r (ie. restarting gnome) puts it back in as good a state as a fresh boot. Sometimes my extensions won't load and this also restarts those.
Re:24-core CPU and I can’t type an email by x3sphere on Friday August 17, 2018 @03:22AM (#17780924)
Just tried this and it works great. Much better solution than rebooting. Thanks!
Re:24-core CPU and I can’t type an email by suspectdoubloon on Friday August 17, 2018 @04:23AM (#17781162)
This doesn’t work under Wayland. Is there a way to something similar on Wayland.
Re:24-core CPU and I can’t type an email by Grimm665 on Friday August 17, 2018 @10:03AM (#17782878)
Using Fedora 27 with Wayland, I have not found a way to do this other than logging out and back in :/
Re:24-core CPU and I can’t type an email by EdiX on Friday August 17, 2018 @03:59AM (#17781071)
You should try cinnamon. There's no accounting for taste, but after using gnome 3 for three years I tried cinnamon (version 3.6, older versions weren't good) and I found it better across the board.
Re:24-core CPU and I can’t type an email by KozmoNau7 on Friday August 17, 2018 @06:31AM (#17781699)
I've been very happy with Cinnamon for a while on Mint 18.x, and since I upgraded to Mint 19 last night, Cinnamon is even better. It's just a bunch of small improvements all over, that just make the overall experience that much better.
Re:24-core CPU and I can’t type an email by Frenchgeek on Friday August 17, 2018 @04:56AM (#17781298)
Tried it with for my now very old netbooks (because 1024x600 is low-res now), kept it on my desktop machine because it's simple, out of the way and fast.
Re:24-core CPU and I can’t type an email by SmellyGeekBoy on Friday August 17, 2018 @05:37AM (#17781482)
I love Cinnamon and run it on a few machines, and as soon as they sort out mixed DPI support I'll be switching back from Gnome on my main machine too. It's been a while since I've tested actually...
Re:24-core CPU and I can’t type an email by pantalaimon on Friday August 17, 2018 @04:54AM (#17781287)
I just stayed with Mate with Compiz (Ubuntu Mate) and my desktop is still as snappy as it was during Gnome 2 days.

I've recently given KDE Plasma a try and was really impressed by it's speed and smoothness.

I think it shows when your desktop does not rely on interpreted langues so much.

Re:24-core CPU and I can’t type an email by Vogtinator on Friday August 17, 2018 @05:57AM (#17781559)
KDE Plasma is written mostly in QML, so JavaScript.
Re:24-core CPU and I can’t type an email by mih on Friday August 17, 2018 @10:14AM (#17782940)
Mostly? Nope, just the UI elements. Much of the heavy lifting is done by KDE framework and Qt libraries (C++).
Re:24-core CPU and I can’t type an email by mcdevilkiller on Friday August 17, 2018 @04:25PM (#17785408)
AFAIK it gets compiled AOT to C++ code. Technically, should be pretty fast out of the box.
Re:24-core CPU and I can’t type an email by amelius on Friday August 17, 2018 @02:55AM (#17780809)
I have the same problem at home. Oddly, my computer at work doesn't have this problem. Both run Ubuntu with Gnome.
Re:24-core CPU and I can’t type an email by tomaskafka on Friday August 17, 2018 @09:18PM (#17786400)
I should probably make a video of me opening an i7 2017 Macbook Pro with 16 GB RAM and waiting 3-5 seconds until the system allows me to type the password (also, I sometimes switch to Czech keyboard, and High Sierra has a bug where it randomly shows one input language as active in a top right but actually uses a different input language in a password field - this happens in about half of login attempts).

This isn’t how it used to be. Sigh.

Re:24-core CPU and I can’t type an email by mrguyorama on Friday August 17, 2018 @02:24PM (#17784757)
Meanwhile my experience is opposite. I use Windows 7 at home and OSX for work. My personal machine is responsive, zippy, and most important of all, predictable

Meanwhile, my SSD filled work mac bogs down in completely unpredictable ways, with weird antivirus scans that I cannot control somehow destroying javascript performance, and needing to be rebooted more than weekly to stay functional in multiple ways. I was similarly dissatisfied with OSX in the mid 2000s when I used it at school. I just don't get it

Re:24-core CPU and I can’t type an email by Steve44 on Friday August 17, 2018 @06:08AM (#17781604)
At work we've recently moved from XP to Win7 and they seem to perform about the same for heavy office use.

I'm playing with a Win10 machine at home, the CPU and RAM is far in excess of our work machines but it is so slow to use. It seems to regularly become unresponsive, programs take ages to start, it seems to be continually working away in the background doing 'nothing'. It's a truly horrible experience.

Re:24-core CPU and I can’t type an email by awiesenhofer on Friday August 17, 2018 @06:20AM (#17781646)
i really like office 365 but the most productive thing i ever did was get rid of it on my work machine and install office 2010 again. it's just so much snappier there is no comparison. (although i also tried office 2003 for a day and boy it's blazingly fast. on a modern system you don't even see the startup screen, not to mention any input lag.)
Re:24-core CPU and I can’t type an email by coding123 on Friday August 17, 2018 @02:27AM (#17780695)
Just curious, is that windows machine possibly not on an SSD? My windows 10 rig opens a profile faster than my MacBook
Re:24-core CPU and I can’t type an email by jjeaff on Friday August 17, 2018 @02:59AM (#17780831)
Ya, I just built a new windows 10 rig. I went for single core speed over more cores (i7 8086k) for the very reason of stamping out any UI lag.

It's buttery smooth and I get no noticeable lag. Exactly 7 seconds from power button to login screen on a cold boot too.

Re:24-core CPU and I can’t type an email by bartread on Friday August 17, 2018 @03:15AM (#17780899)
A fair question, but both SSDs so it's definitely not that. Since we're on hardware differences though the Macbook Pro is 3 years old and has a quad-core i7, whereas the Windows 10 laptop is 1 year old and has a dual-core i7. I'm not in love with having only dual cores but I don't think that's the issue either.
Re:24-core CPU and I can’t type an email by awiesenhofer on Friday August 17, 2018 @06:10AM (#17781615)
its not about opening the profile its about getting to enter your password from a locked screen - i love my w10 machine and its quite snappy when logged in but every unlock has this half-second or so lag until it lets me enter my password - i suspect the animation of the appearing login-form but who knows...
Re:24-core CPU and I can’t type an email by SmellyGeekBoy on Friday August 17, 2018 @05:33AM (#17781459)
Windows 10 is really inconsistent. I have it running in a VM on a Fedora host and it's snappy as hell. Also on a pretty basic office-spec Celeron, but then running it on a new Ryzen 7 sometimes it lags. I don't think it's directly related to the performance of the hardware, there must be something else going on.
Re:24-core CPU and I can’t type an email by rasz on Friday August 17, 2018 @06:39AM (#17781736)
Windows 10 has all kids of debuggers enabled on millions of computers, MS calls this telemetry :) Go to Management and check out startup event trace sessions. Those are the source of mysterious >hundreds of megabytes of logs written to disk per day.
Re:24-core CPU and I can’t type an email by mattip on Friday August 17, 2018 @03:02AM (#17780842)
Virus and malware checks could be slowing things down
Re:24-core CPU and I can’t type an email by zaarn on Friday August 17, 2018 @03:11AM (#17780879)
It's simple: Bad Engineering is cheaper.

Just today on Patreon, I was going through a creators posts. After about 100 posts or so the page was barely usable. Animations took minutes to complete, loading more posts took 30 seconds and Firefox (Chrome quit after 80 posts when Linux' OOM decided that the fun was over) was struggling to repaint the view port, lots of white areas. At the end other applications were severely lagging too both because Patreon's webshit was pulling 80% of all cores when doing nothing on the page and the Linux kernel was shoveling everything into ssd swap like crazy. Animations didn't work at all (likely if I waited 60 minutes it would have shown the first frames) and clicking on links to open in a new tab took about 15 seconds until the JS behind the scenes completed.

It's simply shitty design that there is no obvious way to say "show all posts from January 2016" and jump back month by month. Or atleast UNLOADING posts I've long scrolled past.

I have 8 Cores and 32 GB of RAM at my disposal, a website has no excuse to have that much of a shit performance. Especially when it's a platform where lots of money flows.

But hey, it's cheaper this way.

---

The issue is not thread priorization. Or processes. Your mail app and android studio are both competing for resources and either android studio will lag because the mail app is running on all the CPUs or the other way round. The OS doesn't have a way to tell which is more important and trusting applications to tell is not really reliable (devs will just say "I'm the most important").

A real partial issue is that a lot of modern apps are not engineered to save resources. They just take what they need and the user better provide enough CPU and RAM to do it. There is no sense in self-limiting in a lot of modern apps.

Frontend devs should wake up to the reality that they aren't running on the only instance of the chrome browser with only one tab open. There is other apps around too. There are other browsers around too. Sharing resources gives the user a better experience than just taking them all for yourself.

Re:24-core CPU and I can’t type an email by mikekchar on Friday August 17, 2018 @08:50AM (#17782388)
What's weird is, I have 8G (edit: it did say megs -- of course I have more than that :-) ) of memory and no swap. Never OOMed this machine in 3 years of development work. My colleagues run out of memory constantly. Sometimes I wonder if there isn't some other problem that isn't obvious. I run a very tight ship -- nothing runs on my machine that I don't know about. I'm going to go have a look at the Patreon page and see what happens...

Edit: Apart from being able to confirm the less-than-stellar performance problems, I had no trouble with memory at all. Chromium hovered at about 2G of memory. It fairly aggressively garbage collected as I browsed different sections and different creators.

Re:24-core CPU and I can’t type an email by tntn on Friday August 17, 2018 @11:37AM (#17783579)
In the scenario described in the article, where was the bad engineering? It seems to me that the developers of each component (Chrome, OS, other processes) did things that, while perhaps not perfect, are quite reasonable, and definitely not exceptionally bad. Only together did they interact in this undesirable way.

This case isn't some web app that uses infinite memory; the contended resource is a lock.

Re:24-core CPU and I can’t type an email by oso2k on Friday August 17, 2018 @02:36AM (#17780725)
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 (which is why we now have dynamic, turbo clocks, aka Intel Turbo Boost), lock-free schedulers, and O(1) (constant-time) schedulers. However, notice that we have few CPU SKUs that go above 4GHz or 5GHz? Why don't we have 10GHz, 25GHz or 50GHz CPUs? It's because silly things like heat, cross-talk, speed of light, and physics at nano scale get in the way. Higher clocks would improve latency. Also, applications can improve their latency if they're written to take advantage of multiple cores, their workloads are inherently parallel or mostly parallel, manage their own thread/process scheduling, and use lock-free work stealing schedulers. CPU OEMs have proven developers prefer the manage all this complexity AND also calculate their ILP (instruction level parallelism) for them. Intel's Itanium failed because it required explicitly declared ILP (from compiler and/or developer) which can be tricky especially when most CS literature/education materials, programming languages, software constrains itself to using simplistic single thread of execution mental/computer models.
Re:24-core CPU and I can’t type an email by speedplane on Friday August 17, 2018 @02:44AM (#17780763)
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 by CodeWriter23 on Friday August 17, 2018 @03:45AM (#17781007)
If we had an operating system where every system call used an async calling interface, the type of spinlock latency observed in this article would be greatly reduced. It wouldn’t bring Moore’s Law back but it would make the most of what CPU resource we have.
Re:24-core CPU and I can’t type an email by bennofs on Friday August 17, 2018 @05:01AM (#17781324)
Wasn't the lock in the article kind of async? From my understanding, the problem was not the wait time on the lock alone, but that the lock is not fair: so even if you asynchrounously locked, someone else (in this case the WMI scan) can get the lock everytime before you get it so you are blocked a long time (you cannot continue with this particular operation until you get the lock, even in the async case).
Re:24-core CPU and I can’t type an email by CodeWriter23 on Friday August 17, 2018 @12:41PM (#17784083)
In the article, they illustrate a poor design choice. Or probably more likely, a continuation of the programming practice utilized elsewhere in the kernel. That being, slap a lock on any resource contention. That practice is necessitated solely by the need to support a linear calling interface. Even if this particular issue were to be fixed through queuing instead of locking, the existence of locks elsewhere will still become an issue in a given use case.

My point is, by design, an operating system that has a fully async interface can dispense with locks altogether. Resource contention is then properly resolved through queuing. The OS can then strictly enforce a priority scheme on its various queues, preventing an opportunistic thread from dominating the system. Or enabling higher priority requests to be serviced first. But that decision is made intelligently, not as a result of optimizing to minimize context switching.

Re:24-core CPU and I can’t type an email by speedplane on Saturday August 18, 2018 @02:13AM (#17787147)
Don’t see the fundamental difference between locks and queues. In a system that uses locks, the kernel can still internally use queues to grant some lock requests before others.
Re:24-core CPU and I can’t type an email by CodeWriter23 on Saturday August 18, 2018 @03:56AM (#17787386)
The fundamental difference is this. With locking, when a thread’s time slice expires while holding a lock, the dispatcher switches to a different thread and no other thread can gain that particular lock until the dispatcher resumes the thread holding the lock.

No locks means this can never happen.

Re:24-core CPU and I can’t type an email by speedplane on Saturday August 18, 2018 @01:49AM (#17787075)
If every OS required async calls, it would require every developer to learn async programming. They probably wouldn't learn it properly, and you'd end up with more race conditions and bugs than if async was optional.
Re:24-core CPU and I can’t type an email by CodeWriter23 on Saturday August 18, 2018 @07:11PM (#17791374)
Closures/blocks really make it a lot easier to follow the flow of async coding.

Async style enforces a kind of minimalism that in my opinion simplifies the problem space overall. Obviously, one has to learn different approaches to problem definition and solution to embrace event-driven coding.

To me, in the comparison of linear programming handling an exception when your call stack is 5 levels deep (or maybe 3 in a different use case), having to bubble the appropriate handling at each of those levels, versus async where in your closure you have a 4-line if/else construct that fires off one event for success and a different event for failure, async wins the simplicity competition every time.

If race conditions are an issue, events should be dispatched through a single-threaded finite state machine dispatcher for resolution. Such events can fire up multiple worker threads to do their bidding, but when state changes, that goes through the dispatcher which inherently resolves all races.

Re:24-core CPU and I can’t type an email by oso2k on Friday August 17, 2018 @02:10PM (#17784649)
This has nothing to do with Moore's Law or improving processors directly. If anything, this is a software optimization problem. Half of what I mentioned was locks and schedulers, which are directly software problems. Layer on the fact that a helloworld application in most languages and frameworks is 100s of KB to dozens of MBs, and you have really, really, unoptimized software. 30 years ago, lots of software was written in Assembly and some C. But software has gotten fatter and slower at a much much faster rate than hardware has gotten faster/more parallel since the industry introduced ILP, caches, multi-stage instruction pipelines, etc. with the Pentium/5x86 class microcomputers & processors. Most people never learn to write multi-processing, multi-threaded, multi-programming, event-driven, decentralized or distributed applications. The model that browsers and most languages & frameworks provide is usually inherently sequential and single processing.

If web developers never learn to write multi-processing, multi-threaded, multi-programming, event-driven, decentralized or distributed applications the web will forever look like it looks today.

Re:24-core CPU and I can’t type an email by speedplane on Saturday August 18, 2018 @01:44AM (#17787062)
> This has nothing to do with Moore's Law or improving processors directly. If anything, this is a software optimization problem.

This is such a contradictory sentence. The whole point of Moore's law was that software developers could do what they want, freed by limitations of hardware because in 18 months, when their product was ready for launch, the hardware became capable enough to handle it.

Forcing developers to focus more and more on performance (via threading, distributed systems, and custom die co-processors), rather than innovating new applications, is a huge shift. It's like the hardware developers gave up, and tell the software developers that it's in your hands now.

Also, comparing a hello world program 10 years ago to today is a meaningless comparison because no one uses hello world to do anything. A better example would be Excel in 1998 and Excel in 2018. Sure today, it's a 500 megabytes instead of a just a handful, but it does quite a bit more (for better or worse).

Re:24-core CPU and I can’t type an email by oso2k on Saturday August 18, 2018 @02:13PM (#17789735)
You don't understand Moore's Law. Moore's Law says nothing about software devs doing what they want or processor speed or even hardware capabilities or qualities. It's about the manufacturing capability and integration by semiconductor fabs. Specifically, "Moore's law is the observation that the number of transistors in a dense integrated circuit doubles about every two years.' [0]. Hardware engineers never gave up; they're the reason your bloated apps takes 60 secs to startup instead of 3600 secs.

[0] https://en.wikipedia.org/wiki/Moore%27s_law

Re:24-core CPU and I can’t type an email by exikyut on Friday August 17, 2018 @03:51AM (#17781033)
The internet, sure. But GPUs will figure out new ways to parallelize, which is not dead yet.
Re:24-core CPU and I can’t type an email by sgift on Friday August 17, 2018 @04:13AM (#17781129)
The problem is not that we cannot parallelize hardware. The problem is that the software making use of it is lacking. 24 cores is plenty, but if most software only uses one core even more cores won't help.
Re:24-core CPU and I can’t type an email by speedplane on Saturday August 18, 2018 @02:18AM (#17787159)
GPUs can just do fast matrix multiplications in parallel, but it’s up to the developer to reframe their software into matrix multiplications. For some applications it’s great, but for most it isn’t realistic.

Also if General processors are now hitting a wall, it’s only a matter of time before GPUs do.

Re:24-core CPU and I can’t type an email by brucedawson on Friday August 17, 2018 @01:53AM (#17780578)
I'll go into more details in part two, but part of the problem would have reliably disappeared if I had been running a single-core CPU.

Locks are hard.

Re:24-core CPU and I can’t type an email by raattgift on Friday August 17, 2018 @04:54AM (#17781286)
> Locks are hard.

Yes, especially when the OS does nothing to help a backing-off contender acquire a resource that is greedily dropped and contended by another thread.

> I'll go into more details in part two

Great! In anticipation of that, I have a couple questions:

> but part of the problem would have reliably disappeared if I had been running a single-core CPU

Single-core or single-thread? Does the atomic instruction switch to the other HyperThread generally?

Do you see the same symptoms if you have a sufficient number of other unrelated CPU-intensive threads trying to run that the OS will want to deschedule the aggressive contender thread(s) from time to time?

The ways to deal with this that come to mind are the aggressive contender thread(s) sleeping from time to time, or yielding in hopes the decision about waking up the thread recovers some fairness lost by the decision about which lock waiter win. Perhaps one could just put the lock's cache line on as equal a NUMA footing as it can (a flush, for instance) so the aggressive contender has a chance to lose a race. However, having to reason about cache coherency protocols (differing from vendor to vendor and even same-vendor model to model) seems like a huge headache that anyone would want to avoid if possible. Is a fix described in the long crbug discussion?

Re:24-core CPU and I can’t type an email by brucedawson on Friday August 17, 2018 @10:39AM (#17783118)
On a single-core/single-thread Windows system the problem would be avoided because when the waiting thread is signaled it gets a priority boost. With just a single core this boost means that it gets to run instead of the other thread. With multiple cores it gets to run as well as the other thread.

Making the locks fair or occasionally fair would solve this problem, but perhaps cause others.

I think that an appropriate CPU-saturating background task might have made my machine more responsive, which is deliciously weird.

Re:24-core CPU and I can’t type an email by tomc1985 on Friday August 17, 2018 @02:03AM (#17780601)
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 by rangibaby on Friday August 17, 2018 @02:34AM (#17780716)
I remember Safari in the iPhone 3G would ALWAYS scroll even if it meant showing a checkerboard pattern while the page rendering caught up.
Re:24-core CPU and I can’t type an email by tomc1985 on Friday August 17, 2018 @02:38AM (#17780730)
Safari did that for a while too
Re:24-core CPU and I can’t type an email by speedplane on Friday August 17, 2018 @02:56AM (#17780814)
I remember old Mac OS 9. If you started a print job, and held down the mouse holding down a click, the printer would just stop. The entire system wasn't properly multi-threaded.
Re:24-core CPU and I can’t type an email by dasmoth on Friday August 17, 2018 @03:53AM (#17781040)
That’s something that I remember people in my circle joking about at the time, but in retrospect maybe the joke was on us. User input should always be absolute top priority, and if that means something else has to stop then so be it.

(Although with 24 cores...)

Re:24-core CPU and I can’t type an email by speedplane on Saturday August 18, 2018 @12:54AM (#17786939)
To your point, I also remember working with early windows systems and when the network went down for a moment, the mouse and screen would freeze. Given the two options, Most would probably take the Mac.
Re:24-core CPU and I can’t type an email by AJRF on Friday August 17, 2018 @03:41AM (#17780997)
I've gone from Windows -> macOS -> Fedora running i3wm.

Totally agree that Windows is the worst of the bunch and its still a huge problem on macOS.

On Fedora+i3wm, when my desktop opens from the login it is "immediately" ready for input. I've tried to ask some people to compare between macOS and my laptop and they say they don't notice a difference, so I think people are conditioned to waiting with these little unconscious pauses they don't notice.

I wonder is there a way to do accurate and meaningful timings for responsiveness in these situations.

Re:24-core CPU and I can’t type an email by jakeogh on Friday August 17, 2018 @04:47AM (#17781262)
I got annoyed enough to auto -STOP every tab but the one in the foreground (using surf [with or without tabbed] and a bunch of X glue), coupled with JS disabled by default is very nice. It's got bugs, but I'll add the X plumbing to my version of surf sometime soon: https://github.com/jakeogh/glide
Re:24-core CPU and I can’t type an email by yjftsjthsd-h on Friday August 17, 2018 @08:24AM (#17782237)
Thanks, this looks really nice. How are you sending SIGSTOP to background tabs? (assuming its not built in to glide; I didn't see it mentioned in the README)
Re:24-core CPU and I can’t type an email by jakeogh on Friday August 17, 2018 @12:13PM (#17783831)
I should have elaborated more on the "it's got bugs", it's been awhile since I worked on it, I just looked through the bash plumbing I was using and now I remember what needs to be done, the big issue is copy and paste, since the owner of the current selection needs to be woken up when you paste.

This is so ugly I hesitated to post it, but here: https://github.com/jakeogh/glidestop

In the case of glide, having tabbed take care of all of that would be much easier, or even better it would be integrated directly into a "tabbed like" process that acts more like a windowmanager and does not necessary have "tabs". I'm thinking of a more generalized version to tabbed with a --notabs switch or something.

Re:24-core CPU and I can’t type an email by thoughtfunction on Friday August 17, 2018 @02:35AM (#17780721)
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.

Re:24-core CPU and I can’t type an email by speedplane on Friday August 17, 2018 @02:54AM (#17780800)
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 by fipple on Friday August 17, 2018 @03:54AM (#17781041)
> Chips are not advancing at the rate they should.

A weird interpretation of a singular event in the history of technology. No wheel maker complained because wood wasn’t getting twice as strong every 18 months.

Re:24-core CPU and I can’t type an email by speedplane on Saturday August 18, 2018 @01:02AM (#17786960)
Moore’s law and folks like Ray Kurzweil have for decades been driving the point that this isn’t a single event, but a trend that will continue indefinitely. I don’t buy it myself, but it’s now become conventional wisdom.

We’ve been taught for decades that chips will double in performance every 18 months (I know Moore said transistor count, not performance). It’s now turning out to be untrue. We think about the singularity all the time, but haven’t properly considered what will happen if technology improvements stall.

Re:24-core CPU and I can’t type an email by oblio on Friday August 17, 2018 @04:00AM (#17781074)
We need multi-threading to be super simple but for that we need mass adoption of new programming tools and techniques (and the corresponding mass-abandoning of old ones).

But good luck with that! You're fighting against the most powerful force in the universe: economics (more specifically sunk cost into existing investments). "Soft"ware is a lot "harder" once economics are taken into account.

Re:24-core CPU and I can’t type an email by jjeaff on Friday August 17, 2018 @03:02AM (#17780846)
That's why I opted for fewer cores but highest possible core speed. I can't stand any UI lag.
Re:24-core CPU and I can’t type an email by fulafel on Friday August 17, 2018 @02:16AM (#17780651)
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, and shared-nothing concurrency.

There are also attempts to make C++ & locks real-time friendly, but the programming model is already prohibitively hard wrt correctness, and the added complexity explosion from handling aborted locks would make it completely unmanageable.

Re:24-core CPU and I can’t type an email by speedplane on Friday August 17, 2018 @02:49AM (#17780782)
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 by devxpy on Friday August 17, 2018 @02:32AM (#17780713)
Yeah,the only sane way to do parallelism is message passing. (preferably using zmq)
Re:24-core CPU and I can’t type an email by larschdk on Friday August 17, 2018 @06:48AM (#17781775)
I don't think thread prioritization is the cause of the apparent lag. We've gone from mostly synchronous systems to highly asynchronous systems. Typing on a keyboard used to be a hardware interrupt that would also print instantly on the screen. Now it's a serial bus being polled every few milliseconds, followed by a buffer copy between kernel and user space, with a/several memory allocation and transfer of ownership to a GUI thread, that when scheduled may draw the character on the screen using a DOM that needs to be recalculated which requires accessing the memory allocator in the OS which is currently locked by your Android build.
Re:24-core CPU and I can’t type an email by daeken on Friday August 17, 2018 @01:51AM (#17780568)
I have a similar workstation (though 12 core I think) and recently I've thought about just running entirely separate VMs, each with dedicated cores and RAM. I'm sick of random slowdowns like you mentioned.
Re:24-core CPU and I can’t type an email by scns on Friday August 17, 2018 @03:39AM (#17780987)
I think qubes os could be a good fit for that workflow
Re:24-core CPU and I can’t type an email by feintruled on Friday August 17, 2018 @06:15AM (#17781633)
I remember back in the Amiga days, the processes for the GUI would be totally separate from the program logic. Add the pre-emptive multitasking and you would have GUI elements that would respond instantly always, even when the rest of your program was hung! Of course, the button callbacks wouldn't fire, but the button would appear to press, you could move windows, etc. Did a lot to reduce the perception of lag, whilst obviously introducing quite a few quirks of its own.
Re:24-core CPU and I can’t type an email by renox on Friday August 17, 2018 @06:42AM (#17781749)
The Amiga didn't have multiple address space so that's cheating.. I've never used an Amiga but BeOS was really much more responsive than either Linux or Windows but that was before SSD and multiple cores were available so maybe now the difference would be much less noticeable.. There is Haiku (in alpha or beta) but AFAIK it hasn't any native modern web browser..
Re:24-core CPU and I can’t type an email by waddlesplash on Friday August 17, 2018 @11:29AM (#17783537)
Depends on what you mean by "modern", I guess? https://www.haiku-os.org/files/get-haiku/webkit.png
Re:24-core CPU and I can’t type an email by renox on Sunday August 19, 2018 @05:37PM (#17796318)
WebKit is modern yes but it isn't really "BeOS native"
Re:24-core CPU and I can’t type an email by waddlesplash on Sunday August 19, 2018 @10:40PM (#17797397)
It uses native APIs for drawing, text layout, media playback, and HTTP. I don't know how much more native you want...
Re:24-core CPU and I can’t type an email by renox on Monday August 20, 2018 @09:08AM (#17799581)
WebKit wasn't designed for BeOS so I'm not sure that using native API to draw is enough to make it a real native BeOS..
Re:24-core CPU and I can’t type an email by Bjartr on Friday August 17, 2018 @10:22AM (#17782986)
You might find this study of computer latency across 40 years of hardware interesting

http://danluu.com/input-lag/

Re:24-core CPU and I can’t type an email by JTbane on Friday August 17, 2018 @09:10AM (#17782524)
>I just kind of figured we'd stop having UI lag by now

Software will always expand in resource usage as computing becomes faster. This ought to be an adage that more programmers should think about.

Re:24-core CPU and I can’t type an email by rambojazz on Friday August 17, 2018 @02:09AM (#17780620)
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?
Re:24-core CPU and I can’t type an email by askmike on Friday August 17, 2018 @02:53AM (#17780793)
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 by fouc on Friday August 17, 2018 @04:18AM (#17781147)
We probably need to be using a real time OS like QNX or other.
Re:24-core CPU and I can’t type an email by speeder on Friday August 17, 2018 @01:59AM (#17780590)
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 by devxpy on Friday August 17, 2018 @02:30AM (#17780707)
Are you using gnome?

And a slow hard disk is often the bottleneck, in case of windows.

Re:24-core CPU and I can’t type an email by ndesaulniers on Friday August 17, 2018 @02:53AM (#17780792)
Priority inversion.