Friday, 6 November 2015

knowing the unknowns

Known knowns, known unknowns & unknown unknowns.

When I first heard this from a video I was watching from Brendan on Dtrace I asked what does that even mean? 

I found other quotes that expand on this thought i.e.

"There are known knowns. These are things we know that we know. There are known unknowns. That is to say, there are things that we know we don't know. But there are also unknown unknowns. There are things we don't know we don't know."
- Donald Rumsfeld

which led me down more thoughts and questions...
such as how can I be more aware of things I don't even have awareness about?
Do I know someone with much more experience & understanding than me?
etc

so why post this?

It is important to be more aware of this (it seems kind of obvious in some regard) but you need others to point things out to you or ask questions to make you think a little differently and question what you are doing and why you are doing something. This immediately gives you another angle towards things, allowing you to learn in another way

For example I learnt last year something I didn't realize was possible, on Windows, Linux, BSDs, OSX etc when you reboot you must wait until after BIOS and POST then load the system etc. This can take some time however is it possible to bypass these to boot much faster into the OS? Can this also be done after you do something such as upgrade the host kernel? 

This can be done in Solaris by default reboot command (which is same as reboot -f) as per the man page - "Fast reboot, bypassing firmware and boot  loader.  The  new  kernel will  be loaded into memory by the running kernel, and control will be transferred to the newly loaded kernel. If  disk or kernel arguments are specified, they must be specified before other boot arguments"

This allows reboot within seconds and in my case I have in a desktop an nvidia graphics card which the device driver implementation does not support quiesce. Nevertheless this can also be forced to do so anyway provided only the nvidia graphics are the issue. I did using the following:

echo "force_fastreboot/W 1" | mdb -kw
echo "set force_fast reboot = 1" #x26;#x26;#x3e;#x26;#x26;#x3e; /etc/system

then done.

I have since found out it is possible to do a similar thing on Linux using kexec however it does not look stable so I'm uneasy about using it but could test it out.

Tuesday, 3 November 2015

ZFS born in Zion

Interesting vids from the recent OpenZFS Summit 2015. Recommend you watch these - https://www.youtube.com/watch?v=dcV2PaMTAJ4&index=6&list=PLaUVvul17xSedlXipesHxfzDm74lXj0ab

As Jeff Bonwick explains around the time of ZFS conception that it has links to The Matrix. That's why Oracle documentation has things in there about Neo, Trinity, tank and Morpheus. Amazing film with memorable quotes:

Morpheus: "You're faster than this. Don't think you are, know you are."
Morpheus: "I'm trying to free your mind, Neo. But I can only show you the door. You're the one that has to walk through it"

Let's not forget he was also Cowboy Curtis - https://www.youtube.com/watch?v=3jsCxNK4vAc 

Lawrence and Samuel aren't the same person....
https://www.youtube.com/watch?v=8Y1o8910Xs4





Sunday, 1 November 2015

Hardware or Software RAID?

About 4-5 years ago when I first made a start on learning and using Linux one of the questions was towards RAID, given you have more than one way to skin a cat so to speak. Which way to skin it?
I was told by a manager (and he was saying this with 100% solidity)"hardware RAID IS the best RAID". - I have yet to see this proven.

Loose Background

Years ago hardware RAID used to be the better option as CPU's were considerably slower so whilst software RAID is constantly running will consume a fair amount of CPU resources (thus additional overhead) combined with the lack of well designed software RAID (or for example firmware RAID on older motherboards) meant you would be better of paying for a dedicated card to handle this as it also has things like BBU + cache so it is able to reorganise write operations prior to flushing to disk at same time keeping writes ready to be flushed even if power is temporarily out to maintain a consistent state.

Questions arised and can be asked such as:
What if the hardware RAID card fails?
If software RAID is improved can we spend less money on HW?
Can rebuilds be done faster through software than hardware RAID?
Perhaps we should integrate LVM/VFS layer together?
Should software RAID be done user space or kernel space?
Is it possible to have software reorganize I/Os like hardware?
What happens to the state of the array if the cache after 72 hours is gone?
etc...

Linux mdadm is quite alot better, you also can use BTRFS or ZFS. I've played around removing drives and rebuilding etc using mdadm. I no longer bother now as I just use ZFS for all my storage needs.

In short Software RAID is now at a stage that it is faster than hardware RAID, provides end-to-end checksumming (so no data corruption), organizing writes to convert random writes into sequential writes (whilst providing dynamic block allocation) and can be very efficient in terms of it's resource usage.
Test that compares software and hardware RAID by Robert - http://milek.blogspot.co.uk/2006/08/hw-raid-vs-zfs-software-raid-part-ii.html
and as referenced also from "Unix and Linux System Administration Handbook fourth edition"