Beruflich Dokumente
Kultur Dokumente
1 –
multiple daemon processes
on one host
Physical node
• darwin.ics.uci.edu
• darwin.ics.uci.edu:0
• % messengers –n darwin.ics.uci.edu:0
• Binds the daemon process on CPU 0 on darwin
• Can comment out the code to bind daemon and
multiple daemon processes can still run on one
host
Daemon binding to a CPU ?
• Benefit:
– Extend the data-CPU affinity to the processor/core
level – might speed up the program if accessing local
cache is significantly faster than accessing shared
cache or memory and if the OS is not smart enough in
scheduling (more later)
• Drawback:
– Multiple threads in the same daemon are restricted to
one CPU
• Whether bound or not, can utilize multiple CPUs
Bind daemon
• int bind_daemon(unsigned int cpu_id) // for Solaris
• {
• int ret;
• [2000 1 1] 38 30 29
• [3000 1 1] 130 104 101
• [3000 2 10] 131 87 109 ?!
• [2000 2 1] 38 183 !!!???
• Blk on host 1 2 3 4 5 6 7 8 | 9 10 11 12 13 14 15 16
• Cyclic on CPU 1 3 5 7 | 2 4 6 8 | 9 11 13 15 | 10 12 14 16
• Cyc on host 1 3 5 7 9 11 13 15 | 2 4 6 8 10 12 14 16
• Cyc on CPU 1 5 9 13 | 3 7 11 15 | 2 6 10 14 | 4 8 12 16