All posts by richard

Linus VS Win Server TCO – The reality

While talking with a Collegue yesterday the issue of their server came up. The IT guy has, and I cant fault the logic, gone with Linux and Samba to power what is essentially a Windows Network. This would be an ideal situation except for a small number of flies in the ointment. At the most basic Level, drivers, are the first hurdle. Te Windows drivers include support for all manner of offload engines, acceleration technologies etc. The Linux drivers mostly lag way behind the Windows ones, but they are out there as a rule. Just to get the bare server up and running to snuff can take a while. So starting from a bare server we have a TCO at this point of £0 for Linux and £450 for Server 2012. Now if we run on from here assuming you just install and go you’ll already be having problems. You’ll be seeing performance hits on Network and RAID hardware, easilly fixed with drivers however we are now talking a good hour or two fiddling and faffing with the Manufacturer Linux drivers (if they exist) Bar just running a CD under Server 2012. Say your time is worth £50 an hour and the drivers arent quite right and thus a build from scratch is needed, two hours, we stand at £100/£450. From experienc 4/5 hours is closer to reality as there will be missing things you dont find. On top of that we now have to get Samaba working on this server, Domain config with Samaba isnt fun and the documentation is poor,  we can easilly have blown a day by now so thats 8 hours or £400 vs £450 TCO on the software side. Now heres the nasty bit. That Linux server could EASILLY take you up to a day to get working to a useable extent. The Windows server, from bare metal to running a domain, 2 hours tops. being far we will allow for that two hours so £400/£550. SO excellent you saved £100, probobly shaved a few days off your life too. Only its not done. As a rule AD and Windows *just* works at the basic level. You’ll now be looking at 5 mins per machine to connect the PCs.  Samaba, prepare for permission and authentication hell, possibly on a per PC basis. In short unless you are a Samba God you wont get it right first time and file permissions are the usual cause.  In short, the Windwos Side could be finished in 4/5 hours total from start to users loging in with Roaming profiles and you could Probobly have exchange going too in that time. With Samba you may end the day at ‘Almost works’ and I’ll fix the niggles tomorrow. This is a ‘bit of string’ situation but already there is a disparity here. The Windows server is done and working. I’ve gone home and am Reasonably happy about a productive day, the Samba installer is probobly not having such a good day.

Now lets look at he basics for what we might want to do with this server.

A small office I’m probobly going to want IIS for various tasks (It failry central to 2012 so not having it isnt an option TBH) SO I have a web server and a scripting engine out of the box. I have a pretty useable and simple to use user administrator and unless I install Server Core (and even then not neceserilly) I can manage users, groups, email routing, web setup, replication and indeed about 90% of basic office tasks and be done by the end of that first day.

Linux, well we’ve fixed Samba. I now have to Install Apache, almost certainly some flavour of PHP, probobly MySQL (We do on Windows anyway) and then start installing admin interfaces. Now most Distros do come with various bits and bobs there already, however you’ll find apps start asking for newer PHP versions, or extensions which need newewer (or older) versions, it can get knotty fast.

Its not unfair to say that the windows server would cost you about £800 and be done on day one. (I’m not factoring in Exchange cost, the reason being getting the same functionality for Linux is hell/impossible)

Linux wise we are at two days, so again £800 and will have a reduced level of functionality. Now theres another big trick there many miss. That extra day? Well theres your £400 but if this is a live or new setup you could be having to factor user downtime in there too so lets look at that.

Users cost less than consultants, how much yours cost is down to you but if we assume the following. You average user is on £25K There are about 250 working days per year, so thats anice easy £100 a day; for an 8 hour day thats  £12.50 and hour. Think of a small office of 10 users (Yes I’m keeping the maths simple) so thats costing you £125 an hour to pay them, now its about to go wrong…

On Monday you’ve scheduled a server upgrade, you are doing it yourself and lets say its a complete refresh and start over. Your users have been told no PC use (its a little contrived but it DOES happen in small business). So for Windows we were down for a day, thats £1000 in lost time. You know where this is going so we have £2000 on the other time. Its interesting to note that the extra £1000 would purchase a low end Windows server!

Its not hard to see the Linux Admin over a day behind. If thats so its all gone wrong now as the free server has cost heading on for twice the paid one.

Its not all gravy though, troubleshooting MS products can be an issue, debugging and logging with MS products can be lousy and that can slow down finding some issues. There is a very twisty mindset required sometimes, that said. MS will help you if you call (within defined limits)

Its all up and running and now we need to think about day to day use. Adding a new printer and sharing it can be done quite feasably in a few minutes on a Windows server and this includes making sure users get to it with no work from them, dirver issues etc. The whole thing can certainly be comfortably wrapped up pretty fast. Linux offers no such mechanism and indeed its even possible that there are no native drivers for you printer, with a USB device this could mean a lot of work.

So to sum up, think long an hard about what you want to do. If you have plenty of time and it has not associated value (You need to look at the way you use your time!), want to use older hardware, maybe only want the absolute basics of a Windows network  and have low blood pressure then go for it. There are situations it is exactly the right tool. If it *has* to work then it may be significntly cheaper to go Windows.

Now to stop the flames, we normally deploy both. In fact we often use Samba for slave/backup operations and most of our sites do have at least one dedicated Linux system. Some things *do* work much better, often the server will be providing a web backend or database services to Windows (Access can use MySQL). Right tools for the right job. I also know I’ve simplified a LOT in here, but the numbers do stack up if you sit down and work your project out on paper you’ll see similar results, at best the Linux option may well cost you as much and deployment methodology can make a big difference but its unlikeley the TCOs will ever be better than eaqal and the £0 TCO of Linux is a myth for business. Businesses rely on saving money as a rule, if Linux were a magic bullet Windows would have no market.

 

OSS Rant AKA Its been a month since I last tried to make an OSS app work

Well those of you who know you will know that I live by the rule, right tool for the right job. Sometimes though it turns out the ‘tools’ arent exactly what you expect.

My expcectation of a application is simple

Install

Setup

Run & Use

Windows does this pretty well but sometimes Windows isnt the right tool, in this case I have a little ARM8 system I want to use. This means Linux. SO OS installed, RDC on there, X setup, all going well. Now todays challenge is Sat Nav. After some diggin it turns out I want Navit. Theres an Android APK for it so I decide to try it on my phone first. The reviews arent great and centre on UI issues, pretty typical of a lot of OSS apps is a poor GUI that makes sense to the Devs or was an afterthought. If this works I’ll be doing major overhauls on the GUI so I dont care too much. Download it and install it, so far so good. OK, it needs maps so off we go to get the built in downloader….oh dear

To say is demented is not doing the full horror justice. On the surface it *seems* ok. Scroll down, Select UK and off it goes. Its a big file so I decide to do something else so the phone doesnt sleep, big mistake. The second I try and drage the status bar down the download aborts. and then wont restart. I try the England maps and try again, Menu key this time..blam, download abourts, wont restart just saying theres an error. Off I potter to the maps folder and remove the temp files. Its happy again I start the download again (350Mb) and go back to doing what I was doing. Blam, it dies again, this time because of a wifi glitch. Once again I have to clean out the folder and try again. in fact 8 times it took to get the map and then I had to do it again. Select a dowloaded map, touch the screen and it removes it, no confirmation dialog or warning it’ll do this!!! FFS Guys!

Map is downloaded and supposedly installed, excellent, only nothing happens. In fact the app does sweet FA untill the phone gets a fix. It doesnt tell you this, just shows a white screen with half the icons missing until you tell it to look or find an address (I wont start with the search function!)

Once its up and running it does look like what I need. however there is this complete lask of finesse. You dont have to look far to find this elsewhere. Two big ones, Apache and Samba, ok text based setup but high Voodoo can make more sense for some tasks. The config interfaces are inconsistant leaving mines for newcomers to step on for no reason.

Here’s someone else’s explaination of Apache…hate_apache

There is a lot of OSS stuff that *just* works. Its sadly outweighed by the crud. I say crud but in my experience if you can make these apps work they normally do what they say on the tin and do it very well.  It seems there are a few routes to trouble.

1) I need to do X, I made it work, now to share it with the world!
This seems to result in software thats way too closeley tied to the dev’s hardware, often has no docs or what is there is poor and MAN is it easy to break. If I’m going to throw something open to the world I *always* make a point of putting a good amount of testing/error checking in there and at the very least make sure it runs on something else other than my desktop.

2) Feeping Creatureism
This is an easy one to fall to and anyone that writes software has seen it and done it. You start with an app to draw an OSD on a screen. Just a bit of green text at the bottom is all you need. Halfway through you realise you could put it anywhere so you code in that, then you think about graphics, so in that goes, then you could allow color changes so in that goes. The basic requirement at thi point doesnt actually work and often ends up being a rush to make it all work just well enough and projuces code rife with odd bugs, kludges and spaghetti code. Your simple program is now many Mb ond requres a degree in quantum mechanics for anyone else to follow.

3) Boredom
You’ve written your app now you want to play. Maybe you did the right thing, made the basic app work avoiding 2) and you want to go add bits, thats great. However you’ve not documented anything and the UI makes sense to you and no-one else. You’ll go through 4 or five versions and then you’ll get bored and stop working on it. These tend to be the apps that people find and start jumping for joy because someone else is trying to solve that exact problem. This normally ends up with the app being impossible to configure/use or works so very nearly bar a tiny bug. Because the dev got bored that bug was never fixed and because they didnt document anything, no one else knows how to.

There are many, many more causes however a lot of this is mitigated under Windows and this does Linux a lot of damage. If I write two apps to do the same thing, the windows one will take a fraction of the time, it has a GUI, I rarely need to think about dependancies as *most* Windows systems are equal (I use Delphi so none of the DLL dependancy rubbish of VB/VC apps which *still* isnt resolved). Unless I’m hooked into something like a driver my code will run as it. The workflow in creating a Windows app makes it harder to produce an App with a useless GUI too. Under Linux I have to think about so much more, so many more steps. I need to think about depanancies and unless I’m mad and have forever Binaries arent going to work because every install is different. I could compile for Distro X version n but the next fork/version/update will likeley be different and will break it. This means testing becomes all but impossible too. I can test on Win XP/7/8/10/Server 2008/2012 inside of 15 minutes. They are all here as VMs and for most cases I can safeley assume that if it behaves with 8 and Server 2012 I’m going to be golden.

For Linux and OSS to be seen as a serious alternative this all needs to be addressed. Through design Android has *almost* solved the issue, if it wernt such a pain thats where I’d be going as a business for our embedded stuff (and we still may do)

 

Not just Computers

Its not just PCs here. In fact as time goes on the life expectancy of the PC market is getting shorter and shorter. When I started this lark after I left school we were an electronics and comms company and PCs were an afterthought (They wernt common either). As the market changes we’ve been going back to our roots and doing more and more custom kit, it helps differentiate us from all the other businesses in our sector and we get some interesting jobs.

In this case I had to design and build a 12V charger system to provide power for a Suction unit and Patient Monitor along with a standard car charger output. Simple job, simple solid contruction with as little to fail as possible. Thinking about it now I should have put a high output USB socket on there too but hey. Also we had to provide 240V to the Patient monitor and/or Infusion pumps, incubators or whatever. Also mounting them all and the suction unit and to finish fit a solid shelf for the Monitor which required making all manner of bracketry.

Its not just computers...
Its not just computers…

Happy with how it all came out really 🙂

Now, Given I’ve been pretty much out of circulation all week due to illness I have 9 Laptops to diagnose and fix tomorrow.

Sky+ HD HTPC/Media Centre Build PT 3

If you’ve not already read the other parts, you should : Part 1 Part 2

As already mentioned we need to do something about power. There are two issues here.

Firstly it seems the BIOS power on AC loss setting isnt quite right with the board I’ve chosen. For some reason the board doesnt always power up, this may be related to the aformentioned hardware issue with the board but it’d be nice to be able to do away with this setting. So first up we have a relay across the ATX power pins. When the board powers up it checks the state of the +5 rail to the board, if its not there after a short delay the atx power input is pulsed to start the board up. We’ll also as mentioned earlier, go play with the standby LED too.

Now the second issue is the power button. Depending on what is going on it needs to do different things. For example if the board is shut down it needs to send an ATX power up and bring the board up. If the board is powered then it needs to send a command to the driver to start the hibernation process. A simple state machine should do this with a flag set to notify the keypad routines that the power button is special.

One final idea, MCE and wondows do ocasionally deadlock. So the thinking is that I may add a ‘watchdog’ The panel controller pings the driver which pings back, if more than X pings go astray in a fixed period of time we will send a hard ATX power down.

Anyway, thats where we are at the moment. The boards were ordered today from OSH Park so we should have more to play with in a couple of weeks.

 

Sky+ HD HTPC/Media Centre Build PT 2

So if you’ve not looked already, go look at Part 1.

At this point I’v discovered that my mainboard is screwed, it wont reboot cleanly and after a lot of playing the board is at fault. Its a brand new board so thats off to the suppliers. In the mean time more fiddling with the front panel.

An hour with a multimeter, pen and paper and I have the matrix mapped out, a bit of experimentation with LEDs and I’ve confirmed the wiring. Time to break out the breadboard.

I chose to use a fairly high end PIC, the 16F870. Totally over the top for this BUT it leaves space for other things to go in there and importantly, unlike the 14 pin PICs I can use the ICD facility and I have at least two 8 bit ports. So the matrix is wired up to port b and we statr scanning. The code is pretty simple, it scans contantly in 1ms steps and looks for changes. If there is one the port is read yeilding the first 4 bits with the row being scanned and the lower 4 with the column thats active. Its crude but I just blast these out the serial port as raw scancodes rather than formatting. This does mean that if another keypad were used its just a software tweak in the driver to make it work (I may make the key vals customisable).

Now back to that power LED. Once the driver app runs it turns on the red standby LED and then wait for Media Centre to respond. When it does it switches the LED off and turns the green one on. Thats fine and dandy BUT if the machine is hibernating, if the driver crashes or something interrupts the boot you have no indication the box is doing anything. So we want that RED power LED on at power up and not needing to rely on the board booting. On top of that I’ve found the board doesnt always auto start AND the standby/power button needs handling.

First up I’ve thrown a handful of AND gates into the serial lines, this means I can now steer where the PIC’s serial goes. This means the first thing the PIC does is connect itself to the panel and turn that damn LED on. It then wires itself back to the serial from the PC and is hapy again at the same time making sure the inboud serial is shunted back to the front panel. The PIC can listen to this stream too but at the moment I have no use for that (It may get used for a watchdog) The driver now turns on both red and green LEDs giving an orange LED as the driver waits for MCE to start.

The PCB
The PCB
How it all connects up
How it all connects up

Next the power button and powering up the board….

 

Sky+ HD HTPC/Media Centre Build

Our Sky+ HD box had been getting more and more flakey over the last few months so we decided it was time to replace it. We dont actually have an HD subscription and we’ve been a long term customer so we phoned up and moved stuff about and managed to blag a free replacement box. So it arrives, is plugged in and ye-olde-faithful Samsung box is finally retired.

The thing then sat at the end of my desk for a week being used as a step-stool for Kevin and generally getting in the way. I opened it up out of curiosity and liberated the HD, this turned out to be royally screwed (ok I could have just changed the HD). There was an ungodly amount of dust in there and not really much else of use. So the question turned to what to do with it.

Knowing how locked down these are there was little point in trying to hack it, I’m not overly interested in breaking into it although its in theory possible to get a custom linux firmware in there (been done on older boxes) so its time to go in the in. However at this point I realised a standard micro ATX board would go in, with space to spare. It would make a nice replacement for the NEC PC that lives with our AV kit running Windows Media Centre. Three hours later its all running and does indeed fit perfectly. So some metal working and I have a Pentium G2030 in there, 64Gb SSD, 4GB of ram and a GF210 (I wanted this for HDMI out). We stream everything off a server so the small drive worked niceley. A quick visit to ebay and a 1U server PSU and PCI-E extender finished it all off.

This is a mix of pics from the first and second machine. Both are more or less the same excpet the lower scart hole has gone on the second and there is no GFX card in it. I also spent a lot more time on the rear panel as its for a friend. Mine was wiped with degreaser and sprayed with two coats of hammerite where as the second was sanded, filled, primered, sandeed… well you get the point.

My first unit running and the new one in progress...
My first unit running and the new one in progress…
Empty case, back off ready for the cutter...
Empty case, back off ready for the cutter…
Filling holes...
Filling holes…
Mock up rear panel for a customer version.
Mock up rear panel for a customer version.
Checking board fitting
Checking board fitting
PSU Test Fitting
PSU Test Fitting
Test fitting the PSU, SSD mounted.
Test fitting the PSU, SSD mounted.
All jammed in there...
All jammed in there…
Riunning and the top on...
Running and the top on…

 

Now I’m not the first to do this, you can find similar here: http://forums.bit-tech.net/showthread.php?t=220767 but its not quite ‘there’ in my eyes. The hardware and aproach is a little different, I wanted this to behave exactly as a Sky box in terms of lights, cabling etc so that I could give this box to anyone and it’ll work as if it was meant to be thi way. I do have the knowledge and ability to do the same and make new boards for the front panel but it seemed a waste. Now theres a micro on that front board and I have a logic analyser. So the box was partialy reassembled and the poking started. Hoping to find I2C or similar I was surprised to find the fron panel board speaks plain old RS232 at 19200 baud. A bit of poking, some quick software bashed up in Delphi and I have full control over the panel. Ace, and the board handles things like the sequencing of the LED ring so loads of work to make these behave now no longer needs doing. As its the Sky firmware doing it, it looks right. The buttons were sadly another story, they are a 4×4 matrix, a pain as it would be nice to use plain serial for both but hey, its still useful.

So I wrote some more code to listen to events generated by VMCController and then dispatch the apropriate serial commands. I was then the owner of a front panel that worked with MCE exactly the way the Sky one does on a real box, more or less. The power LED is an issue but that will come later.

Running...
Running…

So time for some custom electronics…

About Time

Well I’ve been meaning to do this for ages. I have a lot of bits of random Info I keep meaning to post up and share, projects etc. Although Facebook is handy for some of it, it’s toally the wrong place. Especially when its a solution to a problem I know many have been looking for or something of interest to the world in general rather than my imediate friends. So here it is.

Expect copious amounts of garbage interspersed with ocasionally useful information. This is quite literaly destimed to become my mental dumping ground 🙂