[MUD-Dev] Re: lurker emerges

Petri Virkkula pvirkkul at iki.fi
Sun Aug 9 22:39:54 CEST 1998


>>>>> "Chris" == Chris Gray <cg at ami-cg.GraySage.Edmonton.AB.CA> writes:

Chris> In general, I think its clear that threading will only actually increase
Chris> your speed if your system has multiple CPUs. You may well choose to use

	That's only true if your program is CPU bound. If the program
	is I/O bound then count of physical disks is more relevaant
	factor. In a mixed case I would use (this is only a guess)
	x+2*y as formula for optimal thread count (x is count of CPUs
	and y is count of physical disks), count of physical disks are
	multiplied with 2 to keep disks busy all the time.

Chris> threading for other reasons (e.g. on WIN32 you often have no choice).
Chris> Threading has overhead over non-threading, and there isn't anything you
Chris> can do about that.

	Don't forget that non-threading has overhead too: if there is
	multiple file descriptors then select'ing and going through
	fd_sets can burns CPU time too.


	Petri




More information about the mud-dev-archive mailing list