<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 13, 2011, at 12:26 PM, Mode7James wrote:</div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000"><br></font>Speaking of load bearing, is there a way for Erlang to read the cpu load of<br>a machine or machine that a node is run on?<br></div></blockquote><div><br></div>Take a look at the cpu_sup module.<br><br><blockquote type="cite"><div>Also, regarding linked-in drivers:  I hear that if they crash, then it<br>brings the entire VM down.  Is this just in case there is a bad piece of<br>code?  If they are this unstable, then why are they used in production<br>environments?  For something like an MMO server, I'll want extremely low<br>latency between the Erlang side and my math & physics side - but I also need<br>it to be stable so if something messes up or crashes, it doesn't bring the<br>entire system down.<br></div></blockquote></div><div><br></div>Yes, a linked in driver runs in your VM's process space, so if it crashes it can bring the entire VM down.<div>They're not inherently unstable, its just that you're running (possibly buggy) native code inside your VM</div><div><br></div><div>I would suggest you implement your logic in Erlang first, and only if it turns out you need better performance, think of native code.</div><div>In many cases you won't need to. Also, in many cases tweaking the algorithm will bring you a whole lot more performance gains than going native.</div><div><br></div><div>Mihai</div><div><br></div></body></html>