1834551 Members
4187 Online
110069 Solutions
New Discussion

chmod +t

 
SOLVED
Go to solution
U.SivaKumar_2
Honored Contributor

chmod +t

Hi.

Does chmod +t (save text in memory)on all the executables of a application , increase the Performance of that application ?.

regards,
U.SivaKumar
Innovations are made when conventions are broken
6 REPLIES 6
Bill McNAMARA_1
Honored Contributor

Re: chmod +t

Text in memory?
I would presume that's something to do with chatr.
The +t of chmod is the sticky bit permission bit.

Later,
Bill
It works for me (tm)
James R. Ferguson
Acclaimed Contributor
Solution

Re: chmod +t

Hi:

Yes, setting the sticky bit of an executable can improve performance. From the man pages for 'chmod(2)':

If an executable file is prepared for sharing, mode bit S_ISVTX prevents the system from abandoning the swap-space image of the program-text portion of the file when its last user terminates. Then, when the next user of the file executes it, the text need not be read from the file system but can simply be swapped in, thus saving time.

Regards!

...JRF...

Ravi_8
Honored Contributor

Re: chmod +t


Hi, Siva

chmod +t is used to give sticky bit permision, not to save memory.
never give up
U.SivaKumar_2
Honored Contributor

Re: chmod +t

Hi,
sorry , it saves text in swap space. This is
what I learnt , the sticky bit on a file tells the operating system that the file will be executed frequently. Files like this are kept in swap space even when they aren't being executed. Although this takes up swap space it greatly reduces the time it takes to execute the program. Programs such as vi have the sticky bit turned on by default.

regards,
U.SivaKumar

Innovations are made when conventions are broken
T G Manikandan
Honored Contributor

Re: chmod +t

sticky bit on a directory
will allow only the super user or the owner of the file to delete it.


sticky bit on a file will put the file in the cache.
setting a sticky bit on a file which is accessed frequently..



Thanks
T G Manikandan
Honored Contributor

Re: chmod +t

Mine is wrong

//*
If the sticky bit is set on a regular file and no execute
bits are set, the system's page cache will not be used to
hold the file's data. This bit is normally set on swap files
of diskless clients so that accesses to these files do not
flush more valuable data from the system's cache. Moreover,
by default such files are treated as swap files, whose inode
modification times may not necessarily be correctly recorded
on permanent storage.
*//