Posts Tagged by Slug
|06-Jul-2011||Posted by Sonia Hamilton under Clustering, Slug|
A nice post from Jake on the SLUG list where he asks about a small clustering setup:
I’m setting up some new hardware for a client of mine. Basically 2 new Dell PowerEdge R210 IIs – nice and small and they seem quiet enough for an office (unlike the original R210). Anyway, quad core xeon, 2x 1Tb 7200RPM drives, 8gb ram (~$1500 each btw). The machines will be used as VM hosts (kvm) for a handfull of guests, file/domain server (ebox), PBX (piaf), mail server web server, “magic windows only application” server etc. As the guests run everything in the ofice some kind of HA is needed.
The questions. How should I setup my disks?
I’m tossing up between, (all the below assume a small raid 1 partition for /, this is for the storage pool) RAID 1 with mdadm giving me 1 disk read speed but the ability to read 2 streams. RAID 1 with mdadm and fancyness giving me 2x read speed for a single stream, but normal behaviour for multiple streams and 1x write.
RAID 0 with mdadm 2x read, 2x write and trust DRBD to look after my data ;->
no RAID, set up as 2 separate drives use DRBD to look after data and get “more spindles” into the mix (so say file server lives on one disk and mail server on another)
What deb based distro should I use for my host (or present a *really* compelling argument for something else)? I would use ubuntu as i’m most familiar with it but the recent debacle with unity has really hurt my confidence with them.
Should i go to debian and if so which version?
each server has 2 gbit ports on it.
team the nics, then run a vlan for drbd and another for regular coms
dedicated nic for drbd and one for general coms.
Any other suggestions or gotchas to look out for?
I have my own answers to these questions, but I’d really like to hear any advice from the crowd (its like “the cloud” but open source and P2P ;->)
|05-Apr-2011||Posted by Sonia Hamilton under Lisp, Python, Slug|
(apologies to slug planeteers for the duplicate info).
A very interesting post from André Pang about some issues he came across with lamdas and closures in Python. Well, interesting to me because I’m playing with Lisp and Python at the moment…
Some links from his blog, in case the original post ever disappears:
- the question and responses on stackoverflow
- an example of the perils of Python’s scoping rules with for/while/if
- Wikipedia – differences in semantics of closures
A nice snippet of code to remind me of the issues:
def callback(msg): print msg funcList= for m in ('do', 're', 'mi'): # funcList.append(lambda: callback(m)) funcList.append(lambda m=m: callback(m)) for f in funcList: f()