Other Optimizations for the Media Temple (dv) Base

Other Optimizations for the Media Temple (dv) Base

Some additional memory usage reductions I’ve made, after applying these configuration changes to my VPS at MediaTemple.

Limiting number of Plesk PSA connections

When you go to your Plesk administration page, you’re accessing a special webserver over SSL. The webserver process is httpsd, and it’s larger than the stock httpd process, using up another precious 30MB.

To reduce its memory usage, I’ve played around with reducing the number of clients it spawns and keeps around to 1. It never actually seems to drop below 2, but at least it doesn’t balloon up.

The Plesk-safe way to do this is to create a file /usr/local/psa/admin/conf/httpsd.custom.include and add the following overrides:

MinSpareServers 1
MaxSpareServers 1
StartServers 1
MaxClients 1
KeepAlive On
KeepAliveTimeout 10

This reduces the number of services that are running to a minimum. Note that if you have other people running Plesk control panels, you may run into login problems and sluggish behavior if you reduce the # of servers by too much. In general it’s just me on my server, so I keep the numbers low.

Check that everything is ok with:

/usr/local/psa/admin/bin/httpsdctl configtest

Type free to see how much used memory there is before you start, then restart the Plesk webserver (gracefully) with:

/usr/local/psa/admin/bin/httpsdctl graceful

Type free again to see if you’re using less memory.

Disable Spam Assassin

SpamAssassin is a service that filters for spam on incoming mail, and each instance uses 21MB. I’m using other spam-prevention methods, so I’ve turned it off.

  • To disable it in Plesk: Go to Server:Services Management and click the red STOP icon.
  • From the shell: Type /etc/init.d/spamassassin stop from the shell.

To disable it permanently, remove execution permission from the spamassassin script by typing chmod a-x /etc/init.d/spamassassin…you can always add it back by change the - to a + in the chmod command example. Note: I haven’t tested this recently by restarting the server with the shutdown -r command…I think it works.

Disable DNS Services

If you’re not using DNS on your (dv), then you might as well turn it off as it uses a smidgeon of memory.

  • To disable it in Plesk: Go to Virtuozzo:System Services and click the named hyperlink. Click “stop service** and “disable autostart”.
  • From the shell: Type /etc/init.d/named stop. You can also remove the execution permission from the named script to prevent it from starting on a server reboot.

In case you’re wondering if this will take your server down, note that Media Temple already provides DNS for your server, through the Media Temple AccountCenter. The DNS server settings in Plesk are for specialized applications that go beyond simple hosting. Your subdomains will not stop working.


The good folks at Media Temple have researched these tweaks themselves, and have released an official unsupported advanced method of doing it the right way! Awesome! :-)