212 points · by tobiasrenger · 9y ago · 73 comments
(Still pining for Snow Leopard :-)
I ran 'kexstat' via the terminal to check out what kernel extensions I had that might be causing the issues. The only third party extensions I had were VirtualBox and Avira. Uninstalled Avira and now things are buttery smooth.
As a counter-anecdote, I have a rMBP 2012, and I haven't encountered any major bugs (no kernel panics, hangs, lag), though I have seen a few minor glitches (Safari tab bar didn't draw properly, only saw this once). On balance I'm happy with the upgrade however, my system feels more stable and faster as a whole, fixed a few issues from Sierra.
Of course make sure you report the issues to Apple.
When I scale the external monitors’ resolution from 1920x1080 Retina to 2560x1440 Retina per monitor, macOS lags heavily and freezes. Sometimes, after a few minutes, it recovers and seems responsive. Then I drag a window and it becomes unresponsive again to the point where it won’t recover and only a hard reboot helps.
Upside: With Metal 2 the fan stays quieter. I can use two 4K screens and won’t get deaf from a jet turbine on my desk. Before High Sierra I connected at most one 4K screen and occasionally disconnected it because the built-in dedicated graphics card got really hot and caused the fan to run at high speeds.
https://twitter.com/stroughtonsmith/status/91239022851777331...
Edit: SuperDuper is also a fair alternative to CCC, don't work for either, I forgot bombich owns CCC.
Something was changed in the rendering and CALayer is often nil during viewDidLoad. I assume it will break lots of apps that render custom UI elements.
VMWare Fusion + Bootcamp, however...
Some have reported success when using that scenario. Unfortunately not everybody has been that lucky, so far it is unclear why.
Restarted back into bootcamp Windows 10 minutes later.
I'll be back next March to poke around some more.
I can't see MacOS existing in 1-2 years in its current form. Apple will unify everything and move to ARM.
I almost see this as a fact at this point.
Speed in MB/s
HFS+ HFS+ Encrypted APFS APFS Encrypted
1M write 498 473 490 (-2%) 444 (-6%)
1M read 6896 6815 6860 (-1%) 6827 (0%)
4k write 486 477 485 (-0%) 445 (-7%)
4k read 2734 2709 2599 (-5%) 2545 (-6%)
While there is still some performance degradation between HFS+ and APFS, it's within a single digit now. Speed in MB/s
HFS+ HFS+ Encrypted APFS APFS Encrypted
read 513 513 508 506
write 477 460 478 432
The earlier results of 7 GB/s are quite impossible with the Samsung Evo Pro 850 -- those max out around 500 MB/s. So my earlier test results are invalid. The new test results mostly show that both file systems can saturate the disk's raw throughput.-- update
On my internal Apple SSD (PCI-Express) I've created a partition for testing. I've kept "Blackmagic Disk Speed Test" running for a few minutes and took an average of the tests. The results are in favor of APFS, beating HFS+ by 3-17% in throughput.
Speed in MB/s
HFS+ HFS+ Encrypted APFS APFS Encrypted
read 2400 2240 2700 (+13%) 2400 (+7%)
write 1900 1930 2000 (+5%) 1980 (+3%) Speed in MB/s
HFS+ HFS+ Encrypted APFS APFS Encrypted
1M WRITE 1375 1373 1372 933
1M READ 2446 2340 2162 1304
4K WRITE 852 797 502 378
4K READ 2106 1486 2156 1001
https://news.ycombinator.com/item?id=15333754If crypto is part of the syscall path, then you definitely pay with latency. If you can push IO to a worker thread then you can release the user call faster. This also requires tuning the read-ahead cache more aggressively.
It could also be a change in crypto algorithm, unaligned page IO, or any other overlooked IO latency problems.
30-40% in a stress test is significant. but if I'm not editing 4k videos perhaps, where would I notice this?
Even amongst us programmers who use horrible inefficient IDEs and make horrible inefficient electron apps, disk speed isn't really a noticeable bottleneck right now?
Even a convoluted local environment to simulate a server environment with a ton of microservices wouldn't really be affected much by this
Or, to put this another way: Do you have an SSD? Why?
a benchmark is just a repeated process which is not reflective or real world use except in very small narrowly tailored applications
The Apple Store genius flipped out and was like "why are you doing this?", called me a "fan boy" and just was in general disbelief that somebody would be upgrading a boot volume. He sort of dropped comments throughout our interaction about just how bad an idea this was. It made me feel weird about making the decision.
Is that actually true? I’d heard that Apple had reversion instructions for those running the High Sierra beats on a system with a Fusion Drive, which they dropped support for in the final release.
Let's say you have a disk that is formatted with filesystem S (for "Source"), and you want it change it to filesystem D (for "Destination").
Let's assume for now that S is not encrypted. Let's also assume that we have a fair amount of scratch storage available somewhere not on the disk we are trying to convert. (I'll address removing this requirement later).
One approach is to make something that given a list of files, including metadata, and a blank disk, can create a D filesystem on that disk and then copies the files to it.
You also need something that given a file on S can give you a list of the block numbers that hold that file's data.
That's an S to D copier, not an S to D in place converter, but it is useful for testing your understanding of D. Once you are confident that you know how D works, you can then make a new version of your D copier.
The new version doesn't actually write anything out to the blank disk. Instead, it writes instructions for making the disk out to a file in scratch space. For blocks that would hold metadata (e.g., inode blocks on Unix filesystem), it records in the scratch space what their content would be and where they would go on D.
For blocks that would hold file data, you write into the scratch area the list of where that data resides on S, and where that data would go on D.
What you end up with, then, in the scratch space is essentially a set of block by block instructions for copying S to a blank disk and ending up with a D filesystem, where instructions are either "copy block X from S to block Y of D" or "Fill block Y of D with the following literal data".
So to do an in place conversion, just follow those instructions, but with S and D the same, right?
NO!!!!! That would likely totally trash things, because it is quite possible that a source block in one instruction may have already been overwritten as a destination in an earlier instruction.
What you first need is something that goes through the whole list of block copy/fill instructions and figures out an order they can be done in that is safe.
It is possible that there is no such order. In that case, you also need some free space that can used for temporary storage. Given some free space you can always find an order for the block copy/fill that works.
The free space can either be on another device, or if S is not full you can find and use its free space.
Anyway, once you do all this, you end up with a simple list of data move/fill steps that will convert S to D in place. You just have to figure out how to actually execute them. The tricky case is when S is your system disk so you cannot un-mount it. Your OS might get very unhappy if you start converting it in place, and you also have to worry that it might write things to it in the middle of the conversion that could corrupt it.
Probably best would be to do the conversion booted from something like a Linux live CD.
I said earlier that you needed some separate scratch space to store the information for the new filesystem. If there is free space on S you can probably use that.
This comment is getting long, so I'm going to cut it off here. In a reply to it I'll toss in a couple of implementation tricks that can be useful, especially if D is a proprietary filesystem that you do not have a complete spec for and so cannot make your thing that figures out where to write D metadata and file data.
If you do not have a good spec for D, a kludge is to make a virtual disk driver. Make a blank D volume on that virtual disk. Then you can copy everything from S to D, except you replace the actual data for each file with blocks of the form: <signature> <block # on S> <some constant fill pattern>.
For each block written that does NOT match that pattern, your virtual disk driver actually does save the data somewhere. For blocks that do match that pattern, it just records what block on S they came from.
From the information gathered by the virtual disk driver you have enough information to construct a D file system from the S filesystem.
If you do not have an operating system that understand both S and D (common in dual boot scenarios), you can still do the above, but first you have to have a step where from the OS that understands S you run something that makes a pseudo dump of S. For example, a modified version of tar. This modified tar would act like normal tar, except instead of copying the actual file data, it would just make a list of disk blocks.
Then you switch to the OS that understands D, and you can use your virtual disk driver and the output from the modified tar to make the virtual D filesystem and gather the necessary information.
Note that this only has a chance if D does not care about the actual contents of files. If D does care, for example maybe it stores a checksum of the file in the metadata, then we are screwed because we do not have the original data in this scenario. Whether or not this can be worked around depends on just how much we know about D.
When you are ready to do the actual conversion, you face the question of where to run it. If S is not your boot volume, you might be able to get away with dismounting it and doing the conversion under your normal operating system.
When we were playing around with something like the above in the late '90s (part of a project considering making a PartitionMagic competitor, although we didn't get much past the experimenting stage before management decided the market was too small, PartitionMagic was too dominant in it, and their patent was scary and so cancelled the project) we were leaning toward using a Linux live CD (for everything, not just the actual copying).
You probably want the code that actually goes through the block copy/fill list and executes it to have some sort of fault tolerance that allows it to pick up where it left off if something interrupts it such as a power failure.
- directory blocks that describe the directory structure and, for each file, where to find this data on disk.
- data blocks that contain actual file data.
- free space.
Chances are you don’t need to touch the data blocks, and you have the free space as scratch space. All you have to do is to write a new set of directory blocks for the new disk format, and then delete the set of old directory blocks. If the on-disk format is flexible enough w.r.t. the location of directory and data blocks and you’re somewhat lucky, you can mostly write the new set of directory blocks in existing free space on the source disk.
That would lead to an intermediate state where the source disk still has the old format, but has one extra file that contains most of the new directory structure.
The final, risky part then is fairly small: overwrite the disk’s root blocks so that the system sees the disk as having the new file format with the new directory structure.
If the disk formats use different disk blocks as first starting points, you can even have a disk that can be used in either format (IIRC, that was possible with FAT and HFS. FAT has its master directory block in sector 0, HFS has it in sector 2)
You could also have a preprocessing step where you rearrange files on the source disk so that the free space is arranged optimally for holding the directory structure for the new filesystem.
Speaking of rearranging files...another fun technical problem is doing a (mostly) portable disk defragmenter. Given one filesystem/OS dependent function,
block_addr * blocks_for_file(char * pathname)
which given a file returns a list of the addresses of the disk block addresses of the blocks that contain the file, and a filesystem/os dependent function that can set the metadata (ownership, permissions, etc) for one file to be the same as another file, you can write a defragmenter where everything else just uses portable functions, such as C stdio. It won't be quite as good as a defragmenter that knows filesystem internals and does low level writing directly to the disk, because the (mostly) portable defragmenter cannot easily move directory blocks around in a predictable way. Still, you can get most files defragmented.You can first build a map from files to disk blocks with the blocks_for_file function. You can also map the free space by filling the free space with files and using blocks_for_file to map those. When filling the free space to map it, you should fill it with many one block files rather than a few large files, for reasons that will soon become apparent.
Then suppose you want to move fragmented file X to blocks B, B+1, B+2, ..., B+N-1, where N is the size of X in blocks. First you find all files that overlap [B, B+N-1]. For each file Y that you need to move out of the way you do as follows (remember, earlier we filled up all the free space with small files, so right now the disk is full):
1. Delete just enough of our free space filler files to free up enough space for Y.
2. Copy Y to Y.new, including copying ownership and permissions.
3. Delete Y.
4. Rename Y.new to Y
5. Fill up the space that was freed in step #3 with one block files.
After you have done this with each file that overlapped [B, B+N-1], all of those files now reside in the original free space, and [B, B+N-1] is covered with small files you created. You can now delete those files, leaving the disk with just enough free space to let you make a copy of X, which will end up in that free space and be consecutive. You can then delete the original X, and fill the newly free space with more one block files, and we are back where we started, but with X defragmented.
Repeat for every other file you need to defragment.
What I like about this approach is that you defragmenter doesn't have to know anything about how the underlying filesystem works.
Going the other way, defragmenting when you do know intimate details of the filesystem, there is also a very cool albeit probably impractical approach to defragmenting.
First, you figure out where everything currently is and where the free space is.
Then, you have to peek at the filesystem's in-memory data structures to find all the state that it keeps at runtime concerning allocation.
You need to know enough, and grab enough runtime data, that you can do all of the following:
1. Accurately predict where a file copy operation will place the new file,
2. Accurately predict how that will change the internal state,
3. Accurately predict how file deletion will change the internal state.
These all have to be good enough that given the state of the filesystem (on disk and in memory), you can look at proposed series of copies and deletes, and correctly predict what the final layout of the disk will be.
When you can do that, you can in theory then write a defragmenter that looks at the state of the disk and the in-memory state, decides how it would like the disk to be arranged, and then writes out a shell script that accomplishes that entirely with a long list of cp, rm, chown, and chmod commands (or the equivalent if you are not on a Unix or Unix-like system).
APFS looks very promising, it's hard to let Apple use me as a live beta tester.
You at least patch your system right? Being behind did Equifax no favors.
There are also numerous incidents mentioned by Google Peoject Zero, if you read through their macOS disclosures.
It’s definitely unsafe from a security standpoint to run anything other than the latest release.
Being a major release behind (and staying patched) is something I picked up during using windows for far too long.
Once you have an environment you rely on more than having the latest, it makes a case for having a personal vs working device.
Usually the way they do it: Apple Store requires apps to work with this new feature on the latest iOS, or nothing gets approved. For the IDE to access these latest features, Xcode needs to be upgraded to the latest version. For Xcode to upgrade to the latest version, your MacOS has to be the latest version. And sometimes, to upgrade to the latest MacOS version, your computer has to be a newer version.
Apple stock goes up. Apple Store employees counter your criticism about the new gimped device by pointing to the large sales orders.
You question your sanity as the Apple distortion field warps around you. "Maybe this is a good device....."
The number of sales orders caused by iOS developers whose hardware is too old to upgrade to the new major OS is going to be so small as to be meaningless.
Speculators gonna speculate and sales people going to say non-objective sales people things.
I never do major MacOS upgrades without doing a full carbon copy clone disk image to restore if things go sideways.
I tend to like these refinement updates, like Snow Leopard and Mountain Lion, but I have to say that APFS gives me pause. If Apple doesn't have enough confidence in it to deploy on anything other than SSDs, then it doesn't sound like it's fully baked.