This page has been robot translated, sorry for typos if any. Original content here.

Optimize Mac OS

Оптимизируем Mac OS

It's no secret that over time, the workhorse's work can slow down, some very seriously - but this is not a reason to scold a new update of the operating system or urgently get a nest egg and run to the store for a new Mac! You just need to clean up and clean the right gadget. Here are a few reasons that can slow down Mac OS X and how to solve common problems.

Firstly, it is desirable that you understand what you are doing and the "repair" does not turn into "dancing with a tambourine", therefore everything that is described here is devoid of shamanism and can be repeated with a standard set of OS commands. But since I'm a lazy person, I prefer to use graphical shells and programs, preferring not to pay for them honestly (i.e., free), and, with rare exception, buying them for a reasonable price.

START

First of all, you need to check the disk for errors in the structure of the disk itself and the system volume. Naturally, Disk Utility will help here, the first aid section is to check the disk. Please note that the disk check is performed when the physical disk is selected on the right, and to check the volume, you need to select (allocate) a volume (in general, Macintosh HD), these are two different checks and in order to correct errors you will have to reboot from external media and fix them same disk utility! I recommend periodically checking discs, for example, once a month - this will insure you from many problems!

Check and, if necessary, restore the "permissions" to the files.

Mac OS stores the default ACL (acces control list) and symbolic links, and also, if the developer provides his own, then they too.

For example, a violation of a simple link / tmp -> private / tmp can lead to system malfunction, and there are a lot of system links! Well, you will not sit for a day and restore them, plus ACL!

But also other programs install their own! Inquisitive ones can make a list, installed for example by the Adobe Master Collections package - believe them more than a dozen, but if you violate any, both applications and plugins can stop running.

That's why I put the restoration of "access rights" using disk utility in second place.

Why else might need this procedure? Yes, even after installing the "update" or program using the installation package. This is because sometimes even Apple makes mistakes in the implementation of the "installer", so others are forgivable ... The fact is that the installer gets root privileges and access to the root on demand, and there ... So, check and restore "Permissions" is not just fun.

Make sure that only those programs that we really need are loaded.

Unnecessary ones are simply deleted by clicking on "-" (minus).

Оптимизируем Mac OS

Less debris - more free memory faster computer.

Optimized software downloads - update the cache of downloaded programs!

In the terminal window:

sudo update_dyld_shared_cache -force

... or it can be done in any specialized program like Onyx ...

This command will rebuild the links to the used libraries in the "download cache" and remove invalid references to deleted or damaged ones.

Attention! The first reboot will take place a little longer than usual, as during the boot, the rebuilding and initialization of the cache will occur, but then you will avoid many problems.

Run the system scripts: Daily, Weekly, Montly

In the terminal window:

sudo periodic daily weekly monthly

... or it can be done in any specialized program like Onyx ...

After all, it is no secret that your computer is not always turned on, because almost certainly, when the system “decided” to execute these scripts - could your MacBook, for example, sleep with the lid closed, could it be like that? But by default they run at 3:15 am.

And what do these scripts do?

Well, not to go into details - delete (rewrite) the old system logs and update some system databases (for example, locate and whatis). In any case - "a woman with a cart - a mare is lighter."

Check the integrity of pref files

Broken delete and reinstall if necessary programs.

... this can be done in any specialized program like Onyx ...

At the same time, I usually delete the rest of the caches - fonts, print queues, browsers. Also for reasons of rational use of space and minimization of errors at work. Especially - it is important for those who like to install, and then remove the program (for example, trial).

We will get rid of unnecessary code and unnecessary languages.

I usually use CleanMyMac, but there are free counterparts in the AppStore. Although, if desired, and diligence can be done manually, but for many years I have been lazy to trust this tedious work to special programs - otherwise why should I have a computer?

Rebuild Spotlight Index

I work a lot with photos, videos and texts, which I take to the server as needed - therefore maintaining the current Spotlight index - for me, this is also the speed of work.

In the terminal window:

sudo mdutil -E / sudo mdutil -i on /

But before that I recommend changing (checking) the settings in the "System Settings" and removing unnecessary directories from indexing from the indexing (system settings-> spotlight-> privacy). Indexing will be more compact and will eliminate garbage.

Important! Do not turn off your Mac before the indexing is completed, otherwise, after switching on, the indexing may begin again.

Time machine

Very useful utility and highly recommended for use.

But think about whether you need "continuous" backup, because at this time both the processor and the network connection are used, which distracts the system from your tasks and needs.

For example, I copy only according to a schedule (on weekends at 12 o'clock in the afternoon), and for setting the schedule I use the old program TimeMachineEditor , which I advise you.

If the screen freezes, and when dragging a window, artifacts appear?

But this is all because your video card is forced to take on the "unbearable burden"! In Mac OS X, the entire desktop (Desktop) is stored in the memory of the video card - therefore, adjusting the "order on the desktop" will noticeably ease the load on your graphics subsystem. So stop cleaning up the table - first rake the Desktop!

Just all the folders (or clean up as much as possible) from Desktop to another place in your home directory. By the way, it will make life easier for MacBook as well, working on a battery and on a more "weak" card, and will reduce errors when switching graphics cards.

For the lazy type of me - there is a wonderful program. Folder Tidy By Tunabelly Software , which allows you to clean up the desktop and other folders, sorting everything out according to the given conditions quickly and accurately. Just do not forget to specify the destination folder, where everything will add up!

Оптимизируем Mac OS

Files open in Finder for a long time.

You have mounted a network drive, go to the directory where your photos from the holiday are in the amount of 500 pieces (and what is fotik digital!) And instead of a list of files with anguish, look at the "wheel of fortune" - a familiar situation?

And all because by default Finder wants to show you "thumbnails" of your files instead of icons. To avoid a painfully long wait - click on "CMD J" or in the "view-> show parameters" menu, remove the checkbox from the "show icon view" item

Оптимизируем Mac OS

Voila - you just have icons or a list of files without thumbnails and wait! Well, you can still click the "Use as standard" button, but then all newly created folders will look the same on local disks too. Although ... maybe this makes sense. It is worth noting that by removing this tick in one view mode - you do not automatically shoot it in other modes !

Her. in the view mode - the "list" or "columns" will also have to be removed!

Оптимизируем Mac OS

Well and the last - defragment a disk

This is especially important for those who work with video, photo processing and large archives. The performance gain is palpable.