Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Disable unneeded Directory Access Services for speed bump' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Disable unneeded Directory Access Services for speed bump
Authored by: g_nix on Jun 12, '03 05:27:31AM

The startup items don't do anything if the service is disabled - they are simple shell scripts which check to see if the service is enabled, and if so, start it. Once the StartupItem script for a service has run, memory is only consumed if the service was enabled, and has started. StartupItems have no connection to the kernel. They are the OS X equivilant of Linux init scripts.

To check if the service in question is really running (and thus consuming memory) run top, process viewer or ps, and look for smbd and nmbd (samba) httpd (apache) or AppleFileServer (AFP filesharing)

By removing kexts, I assume that you want to remove the likes of smbfs.kext. This is not part of samba, but as previously stated a filesystem driver for the kernel. Removing these won't necessarily improve speed, because these aren't programs as such, but rather just collections of routines which the kernel calls upon when it requires them. Removing them will reduce the memory footprint of the kernel, but only by a matter of a couple of hundred K per kext, which won't have a significant effect on performance.

You can inspect the memory usage of each loaded kext by running (sudo or as root) kextstat (kmodstat on 10.1). This will show the name, address, size and memory usage of each module. By doing this, you should also be able to see that the smbfs kext is only loaded after you have attempted to mount an smb share.

There will always be more loaded kexts than on a Linux system, because the darwin kernel is designed to be completely modular, whereas modules in Linux were conceived to make a monolithic kernel more compact.

The Darwin kernel isn't monolithic, and AFAIK cannot be compiled as a monolithic kernel. Any kexts required to make the kernel work at boot time (disk and display drivers, etc.) are wrapped up into a file called Extensions.mkext, which is loaded into memory at the same time as the kernel, so that the kernel can access these devices.

Tampering with apple supplied kexts is a dangerous activity because it may cause upgrades to fail, or produce an inconsistant kernel.

For more info about how the kernel and darwin layers work, check out http://www.opendarwin.org/en/faq.php

Gavin



[ Reply to This | # ]