I often receive questions from colleagues and customers about guidelines to apply on a system after the installation of Solaris.
A lot of people keep installing the "Entire distribution", which gives you ~4 GB of binaries and libraries, most of which you will never use. With the size of the actual disks, this is not a problem anymore.
The less known part of this is that there are some applications that are started by default, and that require a lot of memory... And that are never used in a server. Stopping these applications can reduce the memory used by Solaris and will give you more space to run your applications.
If you have Solaris Zones running on it, you multiply this amount of memory used by the number of zones, and this time, there is a big impact. Same thing when you have ldoms and you need to adjust the memory assigned to each domain. Also, if you don't put a sysidcfg file before you start the zone for the first time, the "Secure By Default" is not active and the questions is not asked during the zone identification.
Solaris 10 allows you to install the OS with the "Secure By Default" option. On OpenSolaris, this is the default mode. With this mode, all the non-secure services are disabled and some others remain enabled, but listening only on localhost. More information about the "Secure By Default" option can be found at http://opensolaris.org/os/community/security/projects/sbd/sbd_design/
Even in the "Secure By Default" mode, there are a number of applications that are enabled and in most of the cases, they are never used.
The following example is done in a Solaris Zone, just after the installation. After the first boot of the zone, the memory footprint is quite important:
ZONEID NPROC SWAP RSS MEMORY TIME CPU ZONE |
So by default, there are 32 process running and 228 MB of RAM used.
After activating the "Secure by Default", things don't change too much
|
root@jco# netservices limited root@global# prstat -Z ZONEID NPROC SWAP RSS MEMORY TIME CPU ZONE |
Still 24 process and 218MB of RAM...
Taking a look to the services still running, there are a list of them that can be safely disabled. The zone is intended to run an application, and all the rest is not needed. Services like the graphical login or the webconsole are rarely used. Here is a list with an example of services that can be disabled:
|
svc:/system/filesystem/autofs:default |
After disabling it, the zone is now running very light:
|
ZONEID NPROC SWAP RSS MEMORY TIME CPU ZONE |
With this little tuning, the memory overhead of using Solaris Zones is reduced.
cool
Posted by Text on October 04, 2009 at 08:37 PM CEST #
I agree with your list of services to be disabled for most scenarios. As far as what "Secure By Default" is meant to do, it is oriented towards reducing the number of services that can be accessed remotely (not actually disabling them).
Posted by Bill Hathaway on October 05, 2009 at 04:04 PM CEST #