This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
deb-mbse/html/misc/usleep.html

64 lines
2.6 KiB
HTML
Raw Normal View History

2003-11-08 21:02:35 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2001-10-22 17:33:55 +00:00
<HTML>
2002-02-17 13:24:26 +00:00
<!-- $Id$ -->
2001-10-22 17:33:55 +00:00
<HEAD>
2003-11-08 21:02:35 +00:00
<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">
2001-10-22 17:33:55 +00:00
<TITLE>System load and the usleep() call.</TITLE>
2003-11-08 21:02:35 +00:00
<LINK rel=stylesheet HREF="../manual.css">
2001-10-22 17:33:55 +00:00
</HEAD>
2003-11-08 21:02:35 +00:00
<BODY>
2001-10-22 17:33:55 +00:00
<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
2003-08-15 20:05:34 +00:00
hardware type, (Intel, Sparc, Alpha etc) how long GNU/Linux will really suspends
2001-10-22 17:33:55 +00:00
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-&gt;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-&gt;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>
2001-10-22 17:33:55 +00:00
</BODY>
</HTML>