shell, perl, performance, parallelism, profiling, etc.

Jerry Feldman gaf at blu.org
Wed Oct 22 10:12:56 EDT 2008


On 10/21/2008 04:02 PM, Ben Scott wrote:
> According to everything I've ever read, Linux ignores the sticky bit
> on executables.  Wikipedia has a good summary:
>
> http://en.wikipedia.org/wiki/Sticky_bit
>   
The original reason for the sticky bit is because some Unix commands are 
so frequently used and small that keeping them in memory significantly 
improves performance, especially in a multi-user system.

I believe from my previous research on Linux virtual memory that 
commands will remain in virtual memory long enough to where the sticky 
bit is not needed. First of all the text (instructions and read-only 
data) are never copied to swap as they are mapped into VM from their 
physical location. older Unix systems used to copy the program to swap, 
then a newer technique was to load it into memory and mark it as dirty.  
Putting this in terms of the shell and Perl, because the shell (bash) is 
constantly being used, it is probably always resident in physical memory 
and never paged out. Perl, on the other hand may need to be loaded, 
causing a Perl script to appear to be slower than a shell script. 
Additionally, Perl compiles the script first. But, comparing a Perl 
script to a shell script is somewhat comparing apples and PCs. Perl 
incorporates the features of SED and AWK. So, if you were to create a 
shell script that used these features, you might find that Perl willl 
out perform BASH. Another was that you can look at performance is to use 
a C shell script on a system where the C Shell is not used as a login 
shell, so it is generally not resident.

-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB  CA3B 4607 4319 537C 5846


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20081022/001b76e4/attachment-0001.bin 


More information about the gnhlug-discuss mailing list