MacOS – High load on OS X Server

macosserver.app

I'm running OS X Server (5.2 on 10.12.2) on a Mac Mini late 2014 with 8GB RAM and 2.6GHz i5.
The load is always around 3.5 – 6 even without any application running. Even in top as root, I cannot see any process that uses lots of CPU time.

The server runs some services in our office of 10 people.

  • File Sharing for 1 NFS host
  • Calendar & Contacts
  • Profile Manager with VPP and DEP (MDM) for 10 phones and macs
  • VPN for the admins (so maybe once a week a login)
  • DNS for the local network with 1 zone
  • Open Directory for MDM and another backup NAS

Time Machine is backing up the server but other than that there is no software or service running.

I'm pretty sure it started with the latest Sierra and OS X Server update or at least I never saw it happen before.

system.log looks normal with some launchd messages from quicklook every 5 minutes but nothing unusual other than that.

All other logs look normal with no continuously repeating error message or something like that.

iostat looks normal:

iostat
           disk0               disk2       cpu    load average
KB/t   tps  MB/s     KB/t  tps  MB/s  us sy id   1m   5m   15m
24.68   16  0.39     5.99    0  0.00   1  1 97  3.18 3.98 4.20

and last but not least the top line from top

Processes: 423 total, 2 running, 421 sleeping, 1223 threads                                                                                                                                                                                                        17:30:02
Load Avg: 4.23, 4.08, 4.16  CPU usage: 0.24% user, 1.21% sys, 98.53% idle  SharedLibs: 256M resident, 46M data, 60M linkedit. MemRegions: 43391 total, 3896M resident, 175M private, 585M shared. PhysMem: 7872M used (1886M wired), 318M unused.
VM: 1090G vsize, 621M framework vsize, 91454(0) swapins, 116522(0) swapouts. Networks: packets: 32147266/24G in, 47494932/42G out. Disks: 1354379/36G read, 1681454/35G written.

Any ideas where to look or what happens?

Edit: To clarify, there are no running processes explaining the high Load averages. And in my experience something like this could come from corrupt memory or hdd.

uptime
19:35  up 2 days,  6:19, 3 users, load averages: 5.17 4.96 4.54 

Is there anything else to look than the logfiles?

All my linux based SMP servers run on loads of 0.xx and I'm a bit afraid that there is a bigger problem somewhere.

Best Answer

That load seems quite normal to me for server. 98.53% idle CPU seems quite excellent for a light server load. There's no point in direct numerical comparison the macOS load average of the Mach Kernel with linux, AIX, BSD or other UNIX since the underlying architecture is different here.

What does translate to traditional UNIX system is counting active threads and watching overall CPU utilization. With more than a thousand threads being actively run (maybe a third are inactive enough to be marked "sleeping"), I wouldn't try to tune or change anything if I saw that on any of my hundreds of production Mac and OS X servers.

If you're really curious, I would run top -u -s 60 and let the system reach neutral (in iostat the 15m average you show is higher than the 1m average, which means the CPU usage is trending lower - when the three values are about the same, that's a good neutral to measure). Also, run sysctl hw.logicalcpu so you can normalize the value you see to the cores that are available. Even when your load is higher than the CPU available, it might not be a problem if your constraints are for IO, network or elsewhere than the CPU.

What are the top 5 CPU using processes when you have a slow refresh on top? Those will be causing the most load in your situation in all likelihood.