64 lines
2.6 KiB
HTML
64 lines
2.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<HTML>
|
|
<!-- $Id$ -->
|
|
<HEAD>
|
|
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|
<META http-equiv="Content-Style-Type" content="text/css">
|
|
<META NAME="Language" content='en'>
|
|
<META name="author" lang="en" content="Michiel Broek">
|
|
<META name="copyright" lang="en" content="Copyright Michiel Broek">
|
|
<META name="description" lang="en" content="MBSE BBS Manual">
|
|
<META name="keywords" lang="en" content="MBSE BBS, MBSE, BBS, manual, fido, fidonet, gateway, tosser, mail, tic, mailer">
|
|
<TITLE>System load and the usleep() call.</TITLE>
|
|
<LINK rel=stylesheet HREF="../manual.css">
|
|
</HEAD>
|
|
<BODY>
|
|
<PRE>
|
|
usleep.doc
|
|
|
|
|
|
At some time when developping MBSE BBS I decided that background utilities
|
|
did't need full speed to do their jobs. BBS utilities under DOS needed
|
|
to run as fast as possible because you needed to bring the bbs down to run
|
|
these programs and users couldn't login during that time.
|
|
|
|
Starting with mball, the allfiles creator, I inserted code that does usleep(1)
|
|
after each 5 processed files. The 1 microsecond is not really the time the
|
|
program pauses, it's probably a lot longer. I think this depends on the
|
|
hardware type, (Intel, Sparc, Alpha etc) how long GNU/Linux will really suspends
|
|
executing the utility.
|
|
|
|
The program speed downgrade at the development machine that mball needed was
|
|
3 times the original exection time, while system loading stayed under 30%.
|
|
At that time the development machine is an 486DX2-66 with a Seagate ST32151N
|
|
SCSI harddisk.
|
|
|
|
The extra usleep code is only active if you run these utils with the -quiet
|
|
switch and when this is set in mbsetup. See menu 1->5.
|
|
With this switch, the program is mostly run by cron. If you onmit
|
|
this switch, this is probably when you start the program manually, it will
|
|
then always run at full speed, no matter what the setting in mbsetup is.
|
|
|
|
If you have a fast system or don't care that the performance of your system
|
|
drops because of background processing, you can turn this future off with
|
|
mbsetup in the global section. (menu 1->5).
|
|
|
|
Remember, if you have a PII-400 MMX or so with IDE disks, you may still have
|
|
performance problems and need to set that switch to yes. There is only one
|
|
way to find out if you need it.
|
|
|
|
Well, actually, I tested this on a Dell Latitude PII-266, setting the switch to
|
|
yes gave better performance then no. Why? The CPU has more time for the slow
|
|
IDE disk. With the slow switch on programs runs even faster then with the switch
|
|
off.
|
|
|
|
Michiel.
|
|
|
|
</PRE>
|
|
|
|
<A HREF="index.htm"><IMG SRC="../images/b_arrow.png" ALT="Back" Border="0">Go Back</A>
|
|
|
|
</BODY>
|
|
</HTML>
|
|
|