(RADIATOR) explanation of hyperthreading on freebsd performance (multi-insta nce radiator)

Tariq Rashid tariq.rashid at uk.easynet.net
Tue Nov 23 08:06:44 CST 2004


i know radiator is not a threaded server. however we can run multiple
instances on the same hardware.

recent hardwarwe is capabale of what is known as hyperthreading, which gives
the illusion of 2 cpus from one. we can even have 2 physical cpus to give
the illusion of 4 logical cpus. the rough figures are that you get about
150% work from a hyperthreaded system which is being taken advantage of
fully (not always in opractise). 

this is a topic not well documented so i'll make a go of it and perhaps
people from the list can correct me or confirm my explanation.

however - my own experiements on freebsd 4.7+ (4.8, 4.10) have shown that
(radius request handling) performance actually degrades with an SMP kernel
on dual xeon's with hyperthreading (HTT) enabled. there is a sysctl in
freebsd which supresses the migration of processes to a second logical cpu,
keeping the processes on the first logical cpu. this was enabled by default
by the bsd team, i think. the results of "top" confirm this.

what appears to be happening is that when there are 2 logical cpus and only
one is allowed to take processes, the effective throughput is 60-70% of that
of a normal single non-htt cpu. hence the performance drop. why is this? the
2nd "logical" cpu is busy executing "idle" instructions. it is not halted. 

recently i have looked again at the matter and found that it is beneficial
to allow the second logical cpu to "halt" when idling. this return the 1st
logical cpu to 100% throughput. effectively. this is the same as disabling
hyperthreading. this "halt on idle" is enabled by another sysctl. 

i have not repeated my experiments with this "halt on idle" systl, but it is
reported to improve performance for both cases - when single threads are
run, they are run at 100% and when the worload is busy, both logical cpus
are used and the effective throughput is up to about 130%. 

 Does anyone have any experience of this? any insights or clarifications? 

 Does freebsd 5.3 handle HTT scheduling better (affinity, prevents resource
sharing clashes)? Linux 2.6?

Tariq

--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list