9 ms·
Meltdown patch reduces mkfile(8) throughput to less than 1/3 on OS X
- saahtb 9y agoOne of the reasons Node developers hate Windows is because of how stupidly slow it is to open lots of files... This will teach them
- ghostcluster 9y agoI have a suspicion that APFS is partly to blame. When I saw benchmarks of APFS vs. HFS+ [0, 1], it appeared that Apple had managed to transition to a filesystem that is markedly slower at reads and writes than the 20 year old one it was replacing. [0] https://malcont.net/wp-content/uploads/2017/07/apfs_hfsplus_speed_comparison_small4.png https://malcont.net/wp-content/uploads/2017/07/apfs_hfsplus_... [1] https://malcont.net/wp-content/uploads/2017/07/apfs_hfsplus_latency_with_scale_from_zero-1.png https://malcont.net/wp-content/uploads/2017/07/apfs_hfsplus_...
- henrikeh 9y agoYet also transitioning to a filesystem with actual checks for integrity and many features which improve performance for, f.x. Time Machine.
- mpweiher 9y agoAs I wrote in the article, I already accounted for this. The raw combined performance degradation was 4x. APFS itself seems to be around 20%. Now that is somewhat rough, as APFS degradation may itself by non-linear. However, others have measured the pure APFS costs and they seem to be roughly what I saw: https://www.macobserver.com/analysis/apfs-performance-lags-hfs/ https://www.macobserver.com/analysis/apfs-performance-lags-h...
- tinus_hn 9y agoThat’s weird because the article states it works better on spinning media but it is only offered automatically on SSD.
- tinus_hn 9y agoCould you please disable that annoying behavior where scrolling slightly left or right swaps to a different article? It’s hard so imagine anyone actually uses that and it is extremely annoying.
- FreeFull 9y agoThat's a problem with the Blogger platform, it might not be possible to disable that behaviour without switching to something else entirely.
- vanderZwan 9y agoHave you ever heard of the expression "How do you know someone disables javascript on the internet through an add-on? They'll tell you"? No? Well, anyway, one draconic way to fix this is installing something like uMatrix or NoScript. This particular website works fine without JS.
- na85 9y agoThe web is better as a whole without js
- kristofferR 9y agoIt would suck if you had to refresh the page here on HN for every upvote.
- makecheck 9y agoEven if that is the case, you also have to account for situations where APFS requires far fewer writes entirely (such as, apparently, duplication of files). In a typical aggregate workflow it’s entirely possible that it’s still a better design.
- davej 9y agoCan someone who is more familiar with Meltdown speculate on this? Is this a quick fix and is it likely to be optimised over time and become less slow? Or is this the raw trade-off and current hardware will always suffer slow-downs to this degree. Can an OS be rearchitected in ways that would mitigate the performance loss?
- PeterisP 9y agoIt's a hardware issue, IMHO it'll be reversed after we get structurally re-engineered (i.e. a new generation, which takes a lot of time to get through all the pipeline from design to actual manufacturing) of CPUs, everything Intel manufactures in 2018 and possibly even 2019 will likely still have those issues.
- nuand 9y agoThe "fix" Intel pushed out this week is a microcode update that in my experience doesn't fix or address Meltdown at all. The update does however make Spectre slightly less reliable, so I'm going to assume that the microcode update has something to do with fixing, updating, or adding new controls to the branch predictor buffer. So absent a microcode update that outright fixes Meltdown, there will always be some level of slow-down for vulnerable devices. System calls now jump from user mode code to a stub kernel in "supervisor memory". The stub kernel then does a full context switch (touching %cr3 paging register and wiping a good portion of the TLB), and once the real kernel finishes, it does a full context switch back to the stub kernel. It's all terribly inefficient, and realistically it's unlikely that there will only be negligible performance impacts. It should also be noted that this "work-around" doesn't fix processor, it just makes it so that that there's nothing juicy in the supervisor memory. You may have to learn to live with this for a while. Even if it takes Intel a month to design and validate a fix for Meltdown, prototype and mass production turn around times mean that no customer will have a processor that isn't vulnerable to Meltdown until April-June 2019.
- deleted 9y ago[deleted]
- jsheard 9y ago> Can an OS be rearchitected in ways that would mitigate the performance loss? The performance loss comes from extra overhead on syscalls, so it could be sidestepped by allowing programs to do more work per syscall. At its simplest that could mean adding more syscalls that perform the same operation over an arbitrarily long list of inputs (like linux's sendmmsg) but I would like to see kernels take inspiration from modern graphics APIs that allow arbitrarily long lists of arbitrary operations to be batched and executed with a single syscall. GPUs had this stuff figured out years ago.
- Nhadatdanang 9y agohttps://www.facebook.com/BDSGiaReTaiDaNang/ https://www.facebook.com/BDSGiaReTaiDaNang/
- deleted 9y ago[deleted]
- raimue 9y agoThe headline is completely bogus. The author switched both the filesystem from HFS+ to APFS and the Meltdown patch was applied. This effect cannot be attributed to just one of them without further testing.
- netgusto 9y agoI applied the patched on both my systems (iMac 2013 core i7 on Sierra under HFS+ that was upgraded to High Sierra for the occasion, and a MacBookPro 2017 already on High Sierra under APFS), and I can confirm that both my systems are seriously and objectively slowed down, 4 days after the patch now. From what I could observe, applications taking the most serious hit are electron based (like VSCode, that went from smooth as silk to mildly sluggish) and Safari. Docker on mac has also taken a hit, although I couldn't quantify it objectively.
- mastax 9y agoInteresting. I had thought about game load times. Most use large agglomerations and shouldn't be too affected. Some games do load small loose files and would be slowed significantly. I suppose the same applies to desktop applications. Most use a large executable with maybe a few dlls. Electron and Python applications that ship as source or bytecode will be much more affected.
- jaaames 9y agoOk so I'm not completely insane, everything felt like molasses this week and that's why.
- throwawaysecops 9y agoThen it's no coincidence that insanity is slowing things down to effect the ongoing illusion of security.
- mpweiher 9y agoYou did read the bit where I accounted for APFS, right? And also that the raw, combined difference was 4x, not 3x?
- jondubois 9y agoI wonder if the inefficiency of the meltdown patches will incentivize cloud providers to lower the price of large instances that have a high CPU core count (relative to small instances with low core count). At the moment, the price of instances goes up linearly relative to CPU core count - Maybe in part because the performance overhead of virtualizing a single 32-core machine into 16 2-core machines had been minimal. But now that the performance overhead of virtualisation is higher (due to isolating the CPU cores being more expensive), maybe it's more efficient to lease entire CPUs (with all of their cores) without the patch (and associated overheads).
- tedunangst 9y agoIf performance is better, why would they charge less instead of more? Why apply the discount to the more desirable product?
- bobwaycott 9y agoMy initial guess would be to align pricing with expected performance, which has now degraded, right? I don’t expect it to happen, but I can see customers like myself being unhappy with paying—just for example—for an 8-core VPS whose performance now matches what previously was 4-core performance. So, I don’t think anyone would expect them to charge less for a higher core count than lower core count, but adjusting prices downward to match performance wouldn’t be upsetting.
- jondubois 9y agoYes exactly. To clarify my point; this vulnerability only affects you if you're sharing a physical machine/CPU with other users (isolated by a virtualization layer)... So if you choose not to share your physical machines/CPUs with other users then you are not exposed to that vulnerability and ideally you also shouldn't need to get these patches and their associated performance overheads. Virtualization already has some known minor performance overheads but now these patches will add even more overheads. Can cloud providers keep pretending that 4x 2-core virtual instances are as performant as a single physical 8-core instance?
- olfactory 9y agoIronically, Meltdown sort of retroactively nullifies the progress we had been thinking of as Moore's Law.
- ageofwant 9y agoI find it really unhelpful that these 'threads' are being hyped with little reference to any sort of thread model, reasonable attack vector or probability. I do not want the kernel on my Arch laptop patched and slowed down to mitigate against issues that does not reasonably exist in the context of a laptop user. By all means patch my browser that runs random js. I'm not in the habit of downloading and running untrusted binaries - those that do have far greater problems than Meltdown or spectre already. Of course I want it patched on AWS, and my bank's backend machines, but you are now forcing me to continually pay, hour after hour, for insurance against a thread that I'm happy to not worry about. Do not steal my cycles to pay for 'security' I do not require.
- tedunangst 9y agoIt's probably a trivial modification to disable KPTI for root owned processes.
- eecc 9y agoOr signed binaries that don’t execute user provided code, although there is still the potential to turn a local buffer overflow into a VM breakout... don’t think VPS provides will take that risk
- megous 9y agoNot sure why you're downvoted. It's a perfectly reasonable trade off. I'll be searching for ways to disable most of these mitigations too after the dust settles. I rarely run untrusted code, and for that I can probably find a way to run it securely depending on the perceived threat. A lot of what I do on my main computer is syscall heavy, and I don't like 25-50% performance hit.
- tzs 9y agoYou could switch to TempleOS. :-) Meltdown is a much smaller (but not zero [1]) security risk on TempleOS than it is on Windows or Unix and Unix-like systems. [1] At first one might think there is no risk, because TempleOS runs everything at ring 0 in a single address space so anything that might be exposed via Meltdown is already wide open. That would be true in the case of running untrusted binaries. Where Meltdown would still affect TempleOS is in in the case of trusted binaries being exploited via techniques such as return oriented programming. Meltdown could make more "gadgets" available in the binary, increasing the chances that someone could make it read something it otherwise would not have read.
- Bitcoin_McPonzi 9y agoJust as a reference point, I didn't see any measurable slowdown on mkfile (New-Item) throughput on Windows 10 after applying the patch. I suspect this may be more of a filesystem issue. I also tried this: $f = new-object System.IO.FileStream c:\temp\test.dat Create, ReadWrite $f.SetLength(8GB) $f.Close() with no speed difference on a patched and unpached system
- busterarm 9y agoAs stated elsewhere, this may be because of architectural choices in MacOS that are affected by Meltdown. The file system drivers run in their own process.
- luckydude 9y agoSo I'm not a Windows expert but I've done file system work. If windows is reasonably smart it will support files with unallocated blocks. Setting the length to 8GB is not the same as writing 8GB in any reasonable file system. I'd retry with a script that actually writes the data.
- cmurf 9y agoNTFS and APFS support sparse files, HFS+ does not.
- gok 9y agoThis is an utterly pathological test case. mkfile makes a lot of syscalls which do very little work. Heck you could have made the batch size 1 byte; that would really show a slowdown!
- nodesocket 9y agoSuch a blantely non-real world and sythetic benchmark.
- macrael 9y agoIs this fix the KAISER fix that is mentioned in the Meltdown paper? That sounded like it removed the kernel from processes address space, where did it go?