sticky bit

Malaclypse the Elder dwc at homxc.ATT.COM
Fri Jan 13 05:07:59 AEST 1989


for swap based systems, behrokh samadi has written an
expert system performance tuner for unix system v called
tunex.  one of the things it does is go through accounting
files and determine which programs would have benefited
from sticky bitting (this is a straightfoward calculation
so no "expert" is really needed).  i believe that this
program has found programs that would benefit from the
sticky bit that most system administrators ignore.

on demand paging versions of unix system v, it is true
that sticky bits no longer do the same thing.  but there
are benefits that are not related to i/o.  we have found
that sticky bits seem to reduce the paging overhead.  this
is because either the shared regions are kept around or
the mapping list that maps pages to file blocks (remember
on the 3b2, pages are 2k and file blocks are typically 1k)
are kept around.  i haven't gotten around to figuring out
which is the actual reason.

also, for non page aligned programs (magic number 410),
the sticky bit will result in the text being written out
to swap space.  although no longer contiguous, it still
has the benefit of 1 I/O to read in a page instead of 2 I/Os.

the only "definition" of sticky bit that i know of is
that it is a bit to identify non-overlapped but commonly
used programs.  the operating system can use this infomation
in any way to improve performance.  any problems are simply
implementation.

one note: i would prefer to see such information kept in
the a.out header instead of a file bit since there is really
much more information that would be useful and the file system
could probably use that bit for other things.

danny chen
att!homxc!dwc



More information about the Comp.unix.wizards mailing list