Today's typical developer main PC at home is a P4 or AMD screaming fast
iron. These new programmers actually miss the resource limiting
constraints of a Atari St, Amiga 3000, Commodore 64 or even a 8088 Intel
PC with only 640 kbyte RAM. For sake! Even Bill Gates once said the 640
kb RAM limit would never be exceeded.
Nowadays, besides RAM abuse, CPU cycles are really abused in god
forbidden ways and methods. For e.g. pcmcia and hotplug to work, its
common practice that inside a startup script the kudzu program is called
several times in a row. Next if one counts inside /etc/rc.d/init.d
directory the number of "sleep 1" calls, one finally understands why that
P4 3.0 GHz hotrod iron is still slower at booting up as my old pentium
P75 with RedHat 4.2 :
[root@tinker init.d]# grep sleep * | wc -l
So booting might at least take 30 seconds extra due to sleep commands.
One might check /etc/init.d/functions where the sleep command is used
inside a loop! Why not use the usleep command? This command uses a
microsecond as its time unit instead of a whole second. My solution would
be to replace all sleep shell scripting commands with usleep and put 2 or
3 zeros behind the number of seconds . so one would replace :
sleep 1 ==> usleep 1000
1 second ===> 1 msec
Your Linux machine and its scripts might boot/run a 1000 times faster
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds