Path: utzoo!mnetor!uunet!lll-winken!lll-tis!mordor!sri-spam!ames!pacbell!att-ih!cuuxb!dlm From: dlm@cuuxb.ATT.COM (Dennis L. Mumaugh) Newsgroups: comp.unix.wizards Subject: Re: Sticky bit -- To set or not to set. Message-ID: <1768@cuuxb.ATT.COM> Date: 25 Apr 88 23:12:23 GMT References: <13085@brl-adm.ARPA# <3571@gryphon.CTS.COM# Reply-To: dlm@cuuxb.UUCP (Dennis L. Mumaugh) Organization: ATT Data Systems Group, Lisle, Ill. Lines: 37 In article <3571@gryphon.CTS.COM# sarima@gryphon.CTS.COM (Stan Friesen) writes: #In article <13085@brl-adm.ARPA# "oread::barbanis"@coins.cs.umass.edu writes: ## ##Is there any reason at all to have the sticky bit on in an executable? ##Or, to put it differently, under what circumstances should it be set? ##(circumstances such as program size, hardware/OS, program usage ##pattern, etc.) # ...... # The sticky bit should be set *only* for very heavily used programs #that are not in continuous use. It is intended to help reduce the startup #overhead of major system utilities, like vi, especially moderately large ones. #WARNING: setting the sticky bit uses up swap space and RAM, so make sure you #have enough of both to handle ALL sticky programs plus any normal user program #mix that you can foresee. Thus on most systems only vi/ex and perhaps the #shells need or should have the sticky bit set. On some turnkey systems it #might be useful to make the main user application sticky as well. The sticky bit is ONLY meaningful for swapping machines. On demand paging it doesn't make much sense. It was used because the "text" for a program was scattered on the disk (as a file). It was fully loaded into core (no partial loads on swapping). The text would then (we hope) be copied onto the swap disk as one contiguous image. Hence loading it from swap was much faster (if the disk driver and hardware allowed a single transfer). With demand paging the disk file is page aligned and the pages are swapped in from the file system as required and not placed on the swap/page device unless modified. Hence the sticky bit isn't of much use. Also VERY heavy programs such as shells never need the sticky bit. Consider the shell. It is always in use. Hence its text is around. -- =Dennis L. Mumaugh Lisle, IL ...!{ihnp4,cbosgd,lll-crg}!cuuxb!dlm