Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

airlied

macrumors 6502
Original poster
Jul 8, 2011
382
59
Sorry for posting here. I know it's not totally related to Catalina but let me finish please.

After getting Catalina beta 8 upgraded, I clicked 'update' of xCode from App Store. The download took few minutes however the installation progress took way longer than I thought.

It took 2 freaking hours to get installation done. However I noticed that the process 'installd' took about '5-30%' CPU power during the process, and the disk wrote/read at about 1-5MB/s. BTW my Mac is late 2018 MBP 15'.

My question is: Why took soooo long?

Why doesn't CPU just 100% kicked in and finishes it within like 5 minutes? Why couldn't my SSD read/white like 200MB/s at all time?? I know random access speed is not as good as sequence speed, but 1-5MB/s is insanely slow!!

I know if CPU and SSD work like crazy my mac would be very laggy, but what's the point of getting a high end machine if they don't run fast enough when needed?
 
  • Like
Reactions: danallen

oatman13

macrumors regular
Feb 14, 2013
233
72
Sorry for posting here. I know it's not totally related to Catalina but let me finish please.

After getting Catalina beta 8 upgraded, I clicked 'update' of xCode from App Store. The download took few minutes however the installation progress took way longer than I thought.

It took 2 freaking hours to get installation done. However I noticed that the process 'installd' took about '5-30%' CPU power during the process, and the disk wrote/read at about 1-5MB/s. BTW my Mac is late 2018 MBP 15'.

My question is: Why took soooo long?

Why doesn't CPU just 100% kicked in and finishes it within like 5 minutes? Why couldn't my SSD read/white like 200MB/s at all time?? I know random access speed is not as good as sequence speed, but 1-5MB/s is insanely slow!!

I know if CPU and SSD work like crazy my mac would be very laggy, but what's the point of getting a high end machine if they don't run fast enough when needed?
There is something called QoS (Quality of Service) and it can be applied to threads on a process. If you don't know what a thread is, you can sort of think about them as separate programs doing work inside of a process. For example, a video game has a thread for rendering to the screen, another for networking, and perhaps another for physics logic however all of this happens in one process.

So when you are installing an application, installd which does the install has multiple threads doing work. Since Apple doesn't want its process (installd) to slow down any other processes you are using, it lowers the QoS on its threads doing work. This makes it so that watching a YouTube video will not lag while installing Xcode. In addition, QoS on threads can also slow things down to keep a computer running cool, or if you are on battery.

You can actually tell the kernel to boost the priority of a process in terminal. Though be careful, as doing this will keep the process boosted until you set it back to 0 or reboot your Mac.
sudo renice -20 -p `pgrep -x installd`

You can check the "niceness" of a process by running:
ps -l -p `pgrep -x installd`

When running the 'ps' command to check the niceness you'll also notice the PRI "Priority" section, where 4 is the lowest and 79 is the highest. This won't change as you don't have control over it but the "niceness" that you set will synthesize a higher priority in the kernel.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.