very slow server performance

Good afternoon,

I have a very slow performing Mac server, and will be thankfull for any tips to find and solve the cause.

Sometimes I have to wait 30seconds to a minute for a response


I am running a late 2012 Mac mini with 2x 1TByte disks under high Sierra with the latest server SW.

Services used are file server, web server (Joomla, Webtrees, JAlbum), mail server, ssh, remote control (headless server, normally)


HDone is system disk and has the file sharing data and is 50% full

HD2 has the data for web services and is 20% used


Disk utility tells me all is fine


HW check tells me all is fine


Etrecheck gives me results varying from good to slow performance. It also tells me of 2 suspected utilities, one is a very simple script I wrote myself and is running only once per 24 hours. The other is a ftp server utility, because Apple removed the ftp server from High Sierra.


With System monitoring the processor cores are 85-99% idle, same when using „top“ in the terminal then there is a changing nr of processes that are stuck (5-55). normally only 3-5 processes are running the rest is sleeping.


Memory is only 4 out of 8 GByte used


Hardly no network activity shown on system monitor and also not on my router


Virus scan with bitdefender say my system is clear.


Reinstalling the OS and server and restoring the data from a much earlier point in time makes it working OK for a few days. Then slow again. I have tried this twice now.


I would be gratefull for any suggestions on how to find the cause and how to solve it.

I am not an IT professional, just an interested experienced user.

Thanks

MAC MINI SERVER (LATE 2012), OS X Mountain Lion (10.8.5)

Posted on Feb 19, 2018 7:47 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 21, 2018 1:23 AM

First thing I think of when I hear of a slow performing mac server - especially when everything else appears to be OK as it appears in your case - is DNS. Maybe you just forgot to mention it but I don't see it in your list of services. If this is the only server on your network I would expect it be configured and running. Configuring DNS correctly (especially if its a mail server) is fundamental to how well it works and performs. Everything (including simple file sharing) depends on it.


What is the result of the following command:


scutil --get HostName


Notice the double hyphen. You may be asked for the local admin password (which you won't see being typed) before the command will run. Once you have the hostname (I would expect something like "mailserver.yourdomain.yourtld") run these two commands:


host yourservername.yourdomain.yourtld


Which should return the fixed IP address you assigned to your server when you first configured it. Follow this with:


host thefixedIPaddress


Which should return the server's hostname.


If the above does not behave as expected or gives a different result then sort out your DNS asap and hopefully the poor performance should improve. The other things you mention may also be contributing? Etrecheck is fine but I would only use it (if at all) for the client OS, not server. The ftp utility may also be suspect? FTP still exists as a service but its command line only as all Apple did was to remove the simple GUI it used to provide. If you must have FTP then Rumpus is a much better alternative - which may be the utility you mention?


Hopefully this may help?

Similar questions

4 replies
Question marked as Top-ranking reply

Feb 21, 2018 1:23 AM in response to Henk_CH

First thing I think of when I hear of a slow performing mac server - especially when everything else appears to be OK as it appears in your case - is DNS. Maybe you just forgot to mention it but I don't see it in your list of services. If this is the only server on your network I would expect it be configured and running. Configuring DNS correctly (especially if its a mail server) is fundamental to how well it works and performs. Everything (including simple file sharing) depends on it.


What is the result of the following command:


scutil --get HostName


Notice the double hyphen. You may be asked for the local admin password (which you won't see being typed) before the command will run. Once you have the hostname (I would expect something like "mailserver.yourdomain.yourtld") run these two commands:


host yourservername.yourdomain.yourtld


Which should return the fixed IP address you assigned to your server when you first configured it. Follow this with:


host thefixedIPaddress


Which should return the server's hostname.


If the above does not behave as expected or gives a different result then sort out your DNS asap and hopefully the poor performance should improve. The other things you mention may also be contributing? Etrecheck is fine but I would only use it (if at all) for the client OS, not server. The ftp utility may also be suspect? FTP still exists as a service but its command line only as all Apple did was to remove the simple GUI it used to provide. If you must have FTP then Rumpus is a much better alternative - which may be the utility you mention?


Hopefully this may help?

Feb 21, 2018 5:24 AM in response to Antonio Rocco

Thanks a lot for taking the time to look into my problem, I really appreciate it.

Actions taken

-- Stopped server
-- Connected Display and Keyboard (Normally run headless via VNC)

-- Started with Cmd-R; ran disk utility on both disks — OK
-- Reset PR-RAM OK

A few weeks ago I did extensive hardware testing via pressing D during Startup no problerms detected.

-- Reinstalled OS, after installation — 30min plus to boot, stopped the process.
-- Restored backup from earlier date when it still was running more or less OK

-- Booted, system is running OK, Filesharing is working fine, (not part of server anymore of Server under High Sierra)

Server not yet “started” after restore

Ran:
MyDomain:~ admin$ scutil --get HostName

Answer: myDomain.com (Do not want to publish my domain name)

Ran:
MyDomain:~ admin$ host MyDomain.com

Answer: MyDomain.com has address 178.193.XX.XXX (my IP4 address from provider)
MyDomain.com mail is handled by 10 MyDomain.com.

Repeated the command without .com:

Answer: the correct local IP address

Plus a whole set of local IPV6 addresses.

Ran:
MyDomain:~ admin$ host thefixedIPaddress

Answer: Host thefixedIPaddress not found: 3(NXDOMAIN)

Is there a problem with the local domain name MyDomain and the Internet name MyDomain.com?

I am running my server behind a router with NAT. Local server IP address is static in the router, Server machine uses DHCP, and port forwarding is set in the router.

According to Activity monitor mds and mdworker takes the most cpu (up to 89%) but system is still responding fine.

mdsworker went away, is probably Spotlight being active.

File sharing is running OK and is responsive (tested via a client)

Started server
It made its automatic configuration.
After start, web, and mail services are running OK.



I disabled DNS services. like you suggested. Note: DHCP is and always was off that service is provided by my router, also the router gives its own address for DNS services.

Also switched off Open Directory services (Only 3 clients on my file server network.)

Services are now again running OK, I wonder how long it will take before a problem occurs again.

Virus checking (BitDefender) also did not find any malware. (I have checked several times during the last few days)

I am using a FTP server from

pyftpdlib

I will replace it with rumpus server. (FTP its only needed on local network to read out my heating system and to let the security camera store its images.

Now it seems to be running fine, but this happened before, and got worse later-on.

I will inform in a few days about the results.


Feb 23, 2018 12:44 AM in response to Antonio Rocco

Hi Antonio,


Thanks for your reply.

I wil study it and experiment with the settings.


Presently DHCP and DNS services are provided by my router.

On the local network Filesharing is accessed via Bonjour, from the internet via VPN.

Web, VPN and mail services from the server are accessed only from the internet.


Outgoing (SMTP) mail is relayed via my providers mail service.

At the moment (after my last restore) everything is still working. I only noticed that mail receiving and sending is a bit slow but working.


Because in the coming weeks I will be on a business trip, I will come back when I have done some more experimenting.


Thanks again.

Feb 23, 2018 12:38 AM in response to Henk_CH

I never suggested you disable DNS services. You should enable it if your server is the only server in your LAN.


It makes no sense not to publish your domain as your mail server is already broadcasting. Potentially the whole world knows it. At the very least all the domains you send email to and receive email from (including spam) will know it. I can see by the results of the commands your server (as suspected) is wasting time trying to resolve its hostname to its IP address and vice-versa. OS X server needs to do this so as to maintain its reliability and robustness as well as not having an identity crisis, hence the slow performance.


Basic fundamental requirements for OS X server are: A fixed IP address - must always be fixed, never DHCP assigned - and a correctly configured DNS service. If this is the only server on your network then it must be running DNS not only for itself but also for your clients. You should add the server's own IP address as the DNS server in the DNS servers field in Network Preferences on the server. You should also add it to the Router's DHCP service so as your clients get it as well. You do this once the DNS Service has been set up and enabled.


Don't ever use .local for the tld. ie: your server's hostname must not be: myserver.mydomain.local. The .local suffix is reserved for Bonjour services. Bonjour is a zeroconfig broadcast/discovery service for private networks. All macs use it to announce and discover themselves on a LAN.


In the Forwarders section of the DNS service add an external DNS server or servers. Google's DNS servers are reliable and are what most use.


It's easy to be confused by DNS but, put simply, if your server is behind a router then private DNS services must be established. This is not the same as what your domain registrar provides. They handle the external (WAN) DNS service for your domain. Private networks are handled by you as no-one else will do it. A router does provide DNS services. All it does is hand out its own IP address for external DNS hostname resolution. It does not provide name-to-IP-address resolution to anything private on your LAN. These things are absolutely key to the 'health' and 'good working performance' of your server. Without it and regardless of how many times you restore/rebuild/restart your server, you'll end up back at where you are now. Get this bit fixed asap and your problems should disappear.


You don't necessarily need Open Directory (it it was me I would enable it as it can provide so much more than what you have now) but if in the future you do, then DNS is absolutely fundamental to how it works. So you'd have to do it anyway.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

very slow server performance

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.