I’ve made a two small changes to FileHunter today:
- Ignore files with zero length
- The needles directory is now searched recursively so files in subdirectories of needles are considered when searching haystack.
I’ve made a two small changes to FileHunter today:
Ever need to clean a bunch of files off a filesystem? It’s easy enough as long as you know what the files are called.
However, there are certain types of files that some users might want to disguise on a server, which shouldn’t be there. FileHunter takes a folder full of files, “needles” and searches (optionally recursively) the directory “haystack” for occurances of those files – regardless of their filenames, extensions etc. It can then optionally remove those files too.
While it didn’t take me very long to write this, I thought it might be generally useful so it’s available here under GPL v3 or any later version.
It requires Python v2.5 or later and is only tested on Linux (Ubuntu 8.04) at the moment. It’s been run on a filesystem with about 160 needles and 2 million files in the haystack without incident. In theory it should work on Windows too but standard disclaimers apply.
There’s a newer version available here.
Wow, it’s been more than a year since the last LRL. How time flies. The memories of Mr Ben in a Raccoon thong are still disturbingly vivid.
I’m off again tomorrow for THE reason to visit Wolverhampton; which has gained a reputation somewhat for hosting truly awesome FLOSS conferences, allowing said conference delegates the run of the town’s pubs and curry houses, and discounts in its hotels.
I’m hoping that this, the final LRL (alledgedly) will be as good as last year’s finalle event – with the added bonus of getting a second event chucked in courtesy of Dan, Fab, and the Ubuntu UK gang literally feet from where I plan to collapse in a heap after the LRL party on Saturday night.
OggCamp sounds an interesting proposition, if only to get an OggCamp mug and check in with the stars of my favourite Linux podcasts. It’s the first barcamp I’ve been to so I’m not 100% sure what to expect. More anon.
Yesterday evening about this time I was stood in The Warick Pub in London, near Picadilly Circus, chatting to the great and the good from the Launchpad development team.
It was really good to get to meet some of the 30-strong team of Launchpad Developers that make my work with Xibo so much easier, and to get the opportunity to thank them personally. Of course I didn’t pass up the opportunity to mention the odd niggle I have with some aspects of the system, but the good news was that they’re all in the process of being addressed now. Result.
Many thanks to Matthew Revell for inviting us along, and to all the Launchpad team for making me feel so welcome.
We needed to increase the volume of a WMV video today. mencoder to the rescue. Here’s the secret sauce:
mencoder input.wmv -o output.avi -delay 0.1 -ovc copy -oac lavc -lavcopts acodec=wmav2 -af volume=12
-delay was added to fix the lip-sync
-af volume=12 was as loud as I could get it to go without distorting
Then I discovered that the resulting file won’t play on a stock Windows Media Player. Hmm. ffmpeg to the rescue this time:
ffmpeg -i input.wmv -b 2500k -vol 1000 -acodec wmav2 output.wmv
At work we have a kvm-based virtualisation solution.
We periodically convert real linux servers in to virtual machines, either for testing upgrades, backup purposes etc and I always have to stop and think how I do it, so here I’m documenting for myself how I do it. If it’s useful to you then so well and good.
|
|
VMware Server |
VirtualBox |
KVM
|
Xen |
|
Licence |
Propriatory (free) |
GPL (plus closed source modules) |
GPL |
GPL |
|
Sponsor |
- |
Sun Microsystems |
Kumranet / Canonical |
Redhat, Oracle, Sun Microsystems |
|
Architecture |
|
|
Kernel Module |
Hypervisor |
|
V Requirements |
None |
None |
VT / AMD-V |
VT / AMD-V |
|
Host OS Support |
Linux / Windows |
Linux / Windows
|
Linux / Windows
|
Linux / Windows
|
|
uest OS Support |
DOS, OS/2, Windows All Versions, Linux, Solaris x86 |
DOS, OS/2*, Windows All Versions, Linux |
DOS, OS/2, Windows All Versions, Linux, Solaris x86
|
DOS, OS/2, Windows All Versions, Linux, Solaris x86
|
|
Live VM Migration |
Y+ |
Y+ |
Y |
Y |
|
iSCSI Initiator |
Y+ |
Y+ |
N |
N |
|
Speed |
Fast |
Fast |
Fast |
Near Native |
|
Configuration |
GUI |
GUI / File |
GUI / File |
GUI /XML |
So after the testing it looks like iSCSI may well be the way to go. I spoke to Stuart at M-Tec about it and he didn’t seem to think that iSCSI was going to be a problem performance wise with VMWare. He’s sending over a quote for the basic paid for VMWare package with a list of the benefits over the free VMWare Server 2.0 which is in beta now – but should be in production by the time we go live with this.
Next problem is then to spec the hardware. In an ideal world I’d like to stay totally HP as their kit is reasonably priced and to date has been extreemely reliable – however they’ve discontinued the DL320s which I had thought would make an ideal iSCSI target with the addition of some RAM and either Ubuntu or OpenFiler. There is no direct replacement yet for the DL320 which means I’d have to go for a server using the 2.5 SFF drives – which are far more expensive, especially at larger capacities.
HP do a StorageWorks box that might fit the bill – the MSA2000i series enclosures. They’re the same size and density as the DL320 but work out more expensive. One would hope however that being purpose built for the job they would be faster than the DL320s.
Dell offer the AX150i which is a rebadged EMC enclosure. This is particularly tempting because EMC are a big name when it comes to SANs – and their kit ought to be up to par. I’ve not got a quote for one of these yet because the thought of Dell technical support based on past experience makes me shudder. There’s also the obsticle of actually buying one from Dell Education Sales which makes it an even more unlikely proposition!
Infortrend do an enclosure that would fit the bill nicely. I wasn’t that impressed with the build quality of the Infortrend fibre SAN I put in at BHCC though – and I understand Ian has been having hassle getting support on the unit when one of them failed recently. With that in mind I’ll only really consider Infortrend as a last resort.
The final option is to buy a server from another vendor – IBM or Dell – who do still support LFF drives in a rack configuration and proceed as planned, or source a NOS DL320s via eBay or the like.
And all that before we even consider what VM software to run. I’ve been assuming VMWare but there’s others to be considered…
Further to yesterday’s work with iSCSI, I plugged my iSCSI target directly in to the workstation using a crossover cable giving uncontended 1GB network between the hosts.
I then ran DISKSPEED again and here are the results:
C:\>disksped.exe 512 i:\
DISKSPEED (C) Alexander Grigoriev, alegr@aha.ru
Test File: “i:\$$test$$.tst”
Test File Size: 512 MB
Testing Uncached New File Write Speed….
Data Transfer: 23.60 MB/s, CPU Load: 11.2%
Testing Uncached Write Speed….
Data Transfer: 32.38 MB/s, CPU Load: 12.7%
Testing Uncached Read Speed….
Data Transfer: 69.73 MB/s, CPU Load: 22.0%
Testing Cached Write Speed….
Data Transfer: 36.78 MB/s, CPU Load: 15.3%
Testing Cached Read Speed….
Data Transfer:1261.09 MB/s, CPU Load: 1.5%
C:\>disksped.exe 512 i:\
DISKSPEED (C) Alexander Grigoriev, alegr@aha.ru
Test File: “i:\$$test$$.tst”
Test File Size: 512 MB
Testing Uncached New File Write Speed….
Data Transfer: 22.97 MB/s, CPU Load: -1.0%
Testing Uncached Write Speed….
Data Transfer: 31.27 MB/s, CPU Load: -1.1%
Testing Uncached Read Speed….
Data Transfer: 69.57 MB/s, CPU Load: 19.8%
Testing Cached Write Speed….
Data Transfer: 36.49 MB/s, CPU Load: 2.1%
Testing Cached Read Speed….
Data Transfer:1213.28 MB/s, CPU Load: 1.5%
It seems therefore that iSCSI over 1Gb LAN is capable of keeping up with direct attached SATA – and in some instances such as Cached Reads able to significantly out perform it.
There was also a significant increase in CPU load on the initiator when running at gigabit speeds – but still in line with UDMA utilization so I’m not too concerned.
The target saw its load average reach 1 during both 100Mb and 1Gb tests, however at virtually 0 CPU loading indicating the load average is being affected by time the CPU is IO bound waiting for disks. Certainly in the case of the 1Gb ethernet, it looks like we have hit the limit of the SATA disks or controller rather than the LAN.
It would be interesting to run the tests again on an iSCSI target using SCSI U320 drives to see where the limit comes there.
It seems HP have discontinued the DL320s quite recently so I’m stumped now as to what would be the best disk platform to use. Perhaps something from IBM or Dell would fit the bill better? I shudder at the thought of Dell support though!
I was surprised how easy it was to get all this set up. I broadly followed the instructions here.
Firstly I installed Ubuntu Hardy 8.04 LTS server on one of the PCs. It already has iSCSI support built in to the kernel. During the setup I made a / partition, some swap and an LVM partition which I then split in to 1 volume group (vg1) with two logical volumes in it (homes and vmware).
Next I needed to install the services for iSCSI – apt-get install iscsitarget iscsitarget-source – and then edit the config file to share a block device.
I exported /dev/vg1/homes and /dev/vg1/vmware as iqn.2008-05.uk.sch.brighton-hove.longhill:homes.iscsi and iqn.2008-05.uk.sch.brighton-hove.longhill:vmware.iscsi respectively.
Next I downloaded and installed the Windows XP iSCSI initiator from Microsoft’s website. I installed it and within 30 seconds I’d got the VMware block device mounted and formatting as NTFS. At this point, the PC I’m using is my normal desktop PC and is separated from the iSCSI target by our normal LAN – the bottleneck being the 100MB link to the desktops at both ends. That said, for normal fileIO operations it seems to be acceptably fast – the only time it’s really shown up is on big transfers.
I downloaded a copy of DISKSPEED from their website and ran it as follows:
The options there create a 512MB file on I:\ (where I have the VMware iSCSI target mounted). I was surprised how high the CPU load was on initial creation so I ran it again:
This seems a lot more consistent – perhaps there was some kind of background task going on when I did the initial test. The DISKSPEED website recons UDMA transfers use up to 10% CPU time and that anything less than that is pretty good. I was worried we might see more like 40% CPU load similar in performance to PIO mode.
For comparison, I ran the same test on the C: drive of my desktop PC (which is identical in specification to the iSCSI target PC).
So clearly writing to local disk is less CPU intensive – but interestingly we only see about a 50-60% drop in performance with iSCSI – bearing in mind we’re using a 100Mb LAN and that traffic is being routed between subnets I don’t think that’s an unreasonable performance hit.
Next I’ll try linking the two PCs with a crossover cable at 1000Mb with jumbo frames enabled and see what the difference is.
I also found OpenFiler which is a small rPath Linux distro designed specifically to serve files – and has the ability to serve as an iSCSI target. This may work out to be the best way of doing this on a long term basis.