Is My Server Running in Performance Mode?

In the earlier days (up to OS X Lion 10.7), Server Admin had an option to “Dedicate system resources for high performance services”.

This option is no longer available in the GUI, but it still exists on the command-line.

NOTE: If you are using OS X 10.11 El Capitan or greater, you will need to disable SIP (System Integrity Protection) first.

Check if your server is running in performance mode with

serverinfo --perfmode

If you find its NOT, its generally a good idea to enable it as performance mode tunes the system to run as a server.

You can do so by issuing:

serverinfo --setperfmode 1

When done, reboot.

8 replies
  1. johann
    johann says:

    This page https://support.apple.com/en-us/HT202528 seems to indicate that one can turn it on by setting the boot-args NVRAM variable and then restarting for OS X El Capitan 10.11 and later.

    I have done so but serverinfo –perfmode still says it is off.

    Maybe I need to reset NVRAM and do it again. Is serverinfo still accurate in High Sierra?

    Is there any other way to see if perfmode has been enabled?

    Reply
  2. jeff
    jeff says:

    Correction.. much easier to run:
    sudo nvram boot-args

    If it returns “boot-args serverperfmode=1”, then its enabled at boot.

    Reply
    • johann
      johann says:

      I don’t think you need the “sudo” to check the nvram boot-args

      So there is no way to know if it has actually been set other than trusting that the mode has been invoked at boot? What parameters are different in serverperfmode=1 mode compared to not being in serverperfmode=1?

      I am having trouble with a High Sierra file server with about a dozen client machines. Client AFP and SMB is very very slow to login (takes 60+seconds to make a connection) and to display folder info, but it mostly seems to bog down with more than 5 or so clients. I was hoping that perfmode would make it speedy for all. It has not seemed to do so unfortunately.

      Reply
      • Jeff Johnson
        Jeff Johnson says:

        Perf mode increases limits allowing the Server.app processes to use more memory, open more files, etc.
        It takes a really busy server to exceed the default limits.

        I believe you are looking at a client-side issue which started with mavericks.
        Say you have 10 folders at the top level of a sharepoint. The finder recurses those folders and prefetches metadata for files/folders within those 10. I’ve never found a description about how far it goes, but I know that the number of files/folders and speed of the connection play a big factor.

        Fortunately Apple addressed this in 10.13.
        https://support.apple.com/en-us/HT208209

        Most likely, this one command run on each 10.13 client will resolve this.
        defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE

        You’ll be be pleasantly suprised 🙂

        Reply
        • johann
          johann says:

          Thanks for the suggestion Jeff.

          I had seen that article but had thought it was exclusive to SMB, and we are seeing this behaviour in AFP as well. Confusingly, the behaviour is not consistently poor – early in the AM and late at night, when none of the office workers are working, things seem to be pretty reasonable, which would seem to indicate it was based on server load rather than individual client settings.

          I will certainly give it a try. Is this a per-user setting or a per computer setting?

          Reply
          • johann
            johann says:

            I’ve just used VPN and remote destop to control a machine at the office. It connects to the server in a few seconds, and displays the folder contents almost instantly, using SMB or AFP (maybe SMB is marginally faster).

            defaults reads for DSDontWriteNetworkStores says “no such thing” so it hasn’t been set one way or another.

          • Jeff Johnson
            Jeff Johnson says:

            The issue is most apparent on WAN(slow) links.

            Apple’s KB mentions SMB, but AFP, SMB and WebDAV will all be significantly faster.
            I think they excluded AFP because its officially deprecated.

            The setting can be per user or per device, depends how you use the defaults command.
            man defaults

            I’ve pushed this preference out to ALL 10.13 users with several companies, its completely eliminated their complaints.

            In my testing, AFP performs best.

            Would be great if you post results with the pref set ON(1) and OFF(1)

          • johann
            johann says:

            Hi Jeff,

            I’m not sure this will get nested properly as a reply to your message. Right now (10:47pm local time) both LAN and WAN connections to the server by way of AFP or SMB are both perfectly fine, with the LAN connections bringing up the directory listings about as fast as directory listings from the internal hard drives.

            The problem has cropped up when the server is serving more than about eight LAN clients, and generally gotten better when the number of clients has dropped below five. This makes it seem like it has to do with server load, but as you said, server load should not be an issue for numbers this low.

            Additionally, right after the server was restarted while setting this whole “perfmode” stuff, and there were only one or two file sharing clients, the system was again as slow as molasses to display folder contents.

            Most of the clients are not in fact running 10.13 – a bit more than half are at 10.12 and there are a few at 10.11 even. All of them are experiencing the same slow folder listing issues.

            I’ll certainly try DSDontWriteNetworkStores on all clients – it doesn’t seem like it could have any negative consequences.

            Thanks for your time!

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply to Jeff Johnson Cancel reply

Your email address will not be published. Required fields are marked *