<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gEt DoWn ToNiGhT &#187; Hardware</title>
	<atom:link href="http://www.getdowntonight.co.uk/category/science-technology/hardware/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.getdowntonight.co.uk</link>
	<description>amusingly digressive progressive discussions</description>
	<lastBuildDate>Mon, 05 Dec 2011 22:41:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Slow and Locked MySQL Queries</title>
		<link>http://www.getdowntonight.co.uk/2010/12/slow-and-locked-mysql-queries/</link>
		<comments>http://www.getdowntonight.co.uk/2010/12/slow-and-locked-mysql-queries/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 17:08:59 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Science and Tech]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.getdowntonight.co.uk/?p=498</guid>
		<description><![CDATA[One of our clients&#8217; servers recently saw a huge drop in speed. None of the hardware had been changed, and while the total number of users has been steadily increasing for the last few years, it has not seen any kind of spike that I thought might cause this type of problem. In order to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.getdowntonight.co.uk/wp-content/mysql2.png"><img class="alignright size-thumbnail wp-image-394 colorbox-498" title="mysql2" src="http://www.getdowntonight.co.uk/wp-content/mysql2-150x150.png" alt="" width="90" height="90" /></a>One of our clients&#8217; servers recently saw a huge drop in speed. None of the hardware had been changed, and while the total number of users has been steadily increasing for the last few years, it has not seen any kind of spike that I thought might cause this type of problem.</p>
<p>In order to try to find the fault or problem, I had to look in many different places and discovered a lot about Linux and MySQL. I enjoy these fact finding missions, even though there are always a lot of dead ends.</p>
<p>I thought I would use this blog as a place to write down all the areas that are worth checking, in case anyone else finds themselves in this situation.</p>
<p>Things to check:</p>
<ul>
<li>The Process List</li>
<li>MySQL Slow Query Log</li>
<li>Server free disk space</li>
<li>Server memory usage</li>
<li>Server load</li>
<li>Your queries</li>
<li>Your indexes</li>
</ul>
<p>Our server was running on Linux Centos 3, and many of the commands below are Linux only. For executing the MySQL commands and queries I suggest getting something like WebYog&#8217;s excellent<a href="http://www.webyog.com/en/downloads.php" target="_blank"> SQLYog</a>, or using MySQL&#8217;s own <a href="http://dev.mysql.com/downloads/workbench/5.2.html" target="_blank">MySQL Workbench</a>.</p>
<p><strong>Listing active MySQL queries<br />
</strong></p>
<p>MySQL contains the ability to show a list of currently running queries. From within MySQL &#8211; execute the following query:</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">SHOW</span> PROCESSLIST<span style="color: #000033;">;</span></pre></div></div>

<p>This will show a list that details which users, hosts, databases are being used to execute queries &#8211; how long they have been going for, and what state they are in. Look for queries that have been running for a long time, or have the state of &#8216;locked&#8217;. For more information <a href="http://dev.mysql.com/doc/refman/5.5/en/show-processlist.html" target="_blank">see here</a>.</p>
<p><strong>Breaking down your queries</strong></p>
<p>It is crucial that you enable slow query logging and it is quite simple to set up. Edit your my.cnf file, and make sure the following is present:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">log-slow-queries = /var/log/mysql/mysql-slow.log
long_query_time = 3</pre></div></div>

<p>(Adjust the log_query_time setting to suit the length of the query you are trying to detect)</p>
<p>Once this is in place, restart the MySQL server and start checking the new log file.</p>
<p>The MySQL command <a href="http://dev.mysql.com/doc/refman/5.1/en/using-explain.html" target="_blank">EXPLAIN</a> allows you to see a breakdown of the steps taken by MySQL to get your query results, including information about joins and the sequence of queries called. You can use the information it outputs to help optimise your own queries.</p>
<p>The utility is easy to use. Simply prefix your SELECT statement with the word EXPLAIN. eg.</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">EXPLAIN</span>
<span style="color: #990099; font-weight: bold;">SELECT</span> userName<span style="color: #000033;">,</span> firstName<span style="color: #000033;">,</span> lastName
<span style="color: #990099; font-weight: bold;">FROM</span> users
<span style="color: #990099; font-weight: bold;">WHERE</span> firstName <span style="color: #CC0099; font-weight: bold;">LIKE</span> <span style="color: #008000;">'da<span style="color: #008080; font-weight: bold;">%</span>'</span><span style="color: #000033;">;</span></pre></div></div>

<p><strong>top</strong><a href="http://www.getdowntonight.co.uk/wp-content/Screen-shot-2010-12-17-at-16.53.07.png"><img class="alignright size-thumbnail wp-image-499 colorbox-498" title="Output from the Linux top command" src="http://www.getdowntonight.co.uk/wp-content/Screen-shot-2010-12-17-at-16.53.07-150x150.png" alt="" width="150" height="150" /></a></p>
<p>This command shows you a list of applications and services running on the machine, along with some basic information about the resources they are using.</p>
<p>From here you can see the system load, free memory and the % of CPU for each process.</p>
<p>To quit and return to the shell, use CTRL+C.</p>
<p><strong>df -h</strong></p>
<p>This will show you how much free space is on your mounted drives, in human readable form.</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">[sam@webserver1 /]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/md1              9.8G  3.9G  5.9G  40% /
none                 1014M     0 1014M   0% /dev/shm
/dev/md2               57G   31G   27G  54% /disk1</pre></div></div>

<p><strong>tail</strong></p>
<p>This is a quick way of looking at the last few lines of a log file. The following will show you the last 10 lines of the mysql log.</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">tail /var/log/mysql.log</pre></div></div>

<p>You can also specify that you want to view a specific number of lines by using the -n parameter. eg.</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">tail -n 50 /var/log/mysql.log</pre></div></div>

<p>Eventually, after going through lots of checking and tests, we discovered that the server was simply at capacity. It hadn&#8217;t been upgraded for 8 years and the number of users had quadrupled during that time &#8211; with users from 2 other continents now logging on regularly. The database was on the same hardware as the web-server software and the system was just becoming overloaded.</p>
<p>We managed to speed things up considerably before we were forced to upgrade, mostly by examining the slow-query-log and adding indexes where appropriate. Also, many of our queries were refined and tidied up &#8211; so we were definitely not wasting our time running the examinations. It has made me realise that it is probably worth going back over old code every now and then to check for potential improvements &#8211; something we only tend to do if there is a client requirement, or an OS upgrade required.</p>
<p>We have now performed a complete upgrade to the latest hardware available, with 8GB of memory, more CPU cores than I suspect are really needed, the latest Centos 5 OS and all the most recent MySQL/Apache and PHP versions &#8211; which has made the system run incredibly quickly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.getdowntonight.co.uk/2010/12/slow-and-locked-mysql-queries/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Voice. One number. Free. Forever?</title>
		<link>http://www.getdowntonight.co.uk/2009/07/google-voice-one-number-free-forever/</link>
		<comments>http://www.getdowntonight.co.uk/2009/07/google-voice-one-number-free-forever/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 06:29:58 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[talk]]></category>
		<category><![CDATA[voice]]></category>

		<guid isPermaLink="false">http://www.getdowntonight.co.uk/?p=245</guid>
		<description><![CDATA[Google have launched a new service called &#8220;Google Voice&#8221; which is basically an application for your PC or your mobile which works via the internet connection, that then behaves like a telephone. They supply you with a new phone number, for free, and then you add all of your own phone numbers to it. If [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-249 colorbox-245" title="googlevoice" src="http://www.getdowntonight.co.uk/wp-content/googlevoice.JPG" alt="googlevoice" width="123" height="119" /></p>
<p>Google have launched a new service called &#8220;Google Voice&#8221; which is basically an application for your PC or your mobile which works via the internet connection, that then behaves like a telephone.</p>
<p>They supply you with a new phone number, for free, and then you add all of your own phone numbers to it. If someone calls your Google phone number &#8211; all of your phones will ring. This means that you will only ever need to give out that one number ever again! This is very useful, especially if you work internationally, as a freelancer or change mobiles often.</p>
<p>The service is only available at the moment go Google GrandCentral users, but should be launching soon to the general public.</p>
<p>The only reason I even heard about this service is that Apple have now blocked the sale of the Google Voice application from their iPhone&#8217;s App store, claiming the reason: &#8220;<em>it duplicates functionality available with the iPhone</em>&#8221; &#8211; which surely translates as: &#8220;<em>Our partners such as O2 and AT&amp;T will be forced to do something about their prices and they really dont like it</em>&#8220;&#8230;</p>
<blockquote><p>Google Voice is a service that gives you one number for all your phones, voicemail that is easy as email, and many enhanced calling features like call blocking and screening, voicemail transcripts, call conferencing, international calls, and more.</p>
<p>Google Voice is currently available for GrandCentral users only, but will be open to new users soon. In the meantime, please <a href="https://services.google.com/fb/forms/googlevoiceinvite/" target="_blank">leave us your email address </a> and we&#8217;ll notify you as soon as Google Voice becomes available. To learn more about Google Voice, check out our <a href="https://www.google.com/voice/about" target="_blank">feature videos</a>.</p></blockquote>
<p>Im sure there are probably a few problems with the software at the moment, but knowing Google they will work at it until they have an unrivaled service, just like with their Search tool and Apps. Not sure how they will pay for this, but I heard a roumor that they may eventually play adds during calls?</p>
<p>I&#8217;m looking forward to trying it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.getdowntonight.co.uk/2009/07/google-voice-one-number-free-forever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Garage Band</title>
		<link>http://www.getdowntonight.co.uk/2009/07/garage-band/</link>
		<comments>http://www.getdowntonight.co.uk/2009/07/garage-band/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 18:57:15 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.getdowntonight.co.uk/?p=132</guid>
		<description><![CDATA[Even though I have used Ableton in the past and have created a few tracks with it, I have decided to start off using the GarageBand software which comes with OSX . I know Ableton has all the bells and whistles anyone could want, but I&#8217;m not sure I need something so involved at this [...]]]></description>
			<content:encoded><![CDATA[<p>Even though I have used Ableton in the past and have created a few tracks with it, I have decided to start off using the GarageBand software which comes with OSX . I know Ableton has all the bells and whistles anyone could want, but I&#8217;m not sure I need something so involved at this stage.</p>
<p><img class="alignright size-thumbnail wp-image-133 colorbox-132" title="garageband" src="http://www.getdowntonight.co.uk/wp-content/garageband-150x150.png" alt="garageband" width="150" height="150" />Maybe once I feel I have reached my creative limit with GarageBand I will move back up to Ableton, but this time around, seeing as I haven&#8217;t even managed to record anything I like the sound of yet, that is definitely a long way off.</p>
<p>GarageBand comes with loads of sounds, seems simple to use and works with the USB XioSynth without any problems.</p>
<p>Currently, the Mac is downloading updates and sound-banks for OSX and GarageBand which total over 1.3GB, so its going to be going for a while.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.getdowntonight.co.uk/2009/07/garage-band/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Studio Day 2</title>
		<link>http://www.getdowntonight.co.uk/2009/07/studio-day-2/</link>
		<comments>http://www.getdowntonight.co.uk/2009/07/studio-day-2/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 18:34:51 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[decorating]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[studio]]></category>

		<guid isPermaLink="false">http://www.getdowntonight.co.uk/?p=105</guid>
		<description><![CDATA[I have spent a bit more time adding appliances, and setting up the Mac. So far, looking quite nice. The Mac previously had OS/x removed so I could run Linux and Windows XP on it &#8211; but Im now going through the 1 hour 20 minute install to put the original software back on. Once [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_106" class="wp-caption alignright" style="width: 250px"><img class="size-medium wp-image-106  colorbox-105" title="Studio Part 2" src="http://www.getdowntonight.co.uk/wp-content/13072009470-300x225.jpg" alt="Studio Day 2" width="240" height="180" /><p class="wp-caption-text">Studio Day 2</p></div>
<p>I have spent a bit more time adding appliances, and setting up the Mac. So far, looking quite nice. The Mac previously had OS/x removed so I could run Linux and Windows XP on it &#8211; but Im now going through the 1 hour 20 minute install to put the original software back on.</p>
<p>Once everything is set up I&#8217;ll tidy up the cables and sort out the rest of the room. I&#8217;m even thinking of decorating the room so its a bit more homely than it currently is with its office-style decor. I think I might need some soft furnishings too as there is quite a lot of echo for such a small room.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.getdowntonight.co.uk/2009/07/studio-day-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Akai APC40. Worth the money?</title>
		<link>http://www.getdowntonight.co.uk/2009/07/akai-apc40-worth-the-money/</link>
		<comments>http://www.getdowntonight.co.uk/2009/07/akai-apc40-worth-the-money/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 13:40:48 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Science and Tech]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.getdowntonight.co.uk/?p=98</guid>
		<description><![CDATA[I have always thought one of the most frustrating things about Ableton is the lack of real hands-on control. You can do so much with it, but for me it has always been quite difficult to tweak sounds with the mouse. For example, it would be nice to be able to tweak the resonance and [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_236" class="wp-caption alignright" style="width: 160px"><img class="size-thumbnail wp-image-236 colorbox-98" title="apc40" src="http://www.getdowntonight.co.uk/wp-content/apc402-150x150.jpg" alt="apc40" width="150" height="150" /><p class="wp-caption-text">Akai APC 40</p></div>
<p>I have always thought one of the most frustrating things about Ableton is the lack of real hands-on control. You can do so much with it, but for me it has always been quite difficult to tweak sounds with the mouse. For example, it would be nice to be able to tweak the resonance and the cut-off at the same time when in Live mode.</p>
<p>This sweet looking piece of kit allows you to control pretty much everything in Ableton with your hands for instant gratification.</p>
<p>At the moment they cost £399 so they are not cheap, and seeing as I dont know how to use Ableton yet, I wont be purchasing one just for now.</p>
<p>I&#8217;d be very interested to know if anyone has got one, and how they get on with it though.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.getdowntonight.co.uk/2009/07/akai-apc40-worth-the-money/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ableton Live and XioSynth working</title>
		<link>http://www.getdowntonight.co.uk/2009/07/ableton-live-and-xiosynth-working/</link>
		<comments>http://www.getdowntonight.co.uk/2009/07/ableton-live-and-xiosynth-working/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 14:22:55 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Science and Tech]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[ableton]]></category>
		<category><![CDATA[studio]]></category>
		<category><![CDATA[xiosynth]]></category>

		<guid isPermaLink="false">http://www.getdowntonight.co.uk/?p=78</guid>
		<description><![CDATA[I managed to spend a bit of time today setting up some of the music equipment I mentioned in my previous post. So far, I have Ableton Live 5.2.2 working (legit) and the Xiosynth. Im a bit annoyed as when I bought Ableton a couple of years ago, it came with a free downloadable upgrade [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_79" class="wp-caption alignright" style="width: 310px"><img class="size-medium wp-image-79 colorbox-78" title="Studio Day 1" src="http://www.getdowntonight.co.uk/wp-content/12072009467-300x225.jpg" alt="The NC20 running Ableton and the XioSynth 25" width="300" height="225" /><p class="wp-caption-text">The NC20 running Ableton and the XioSynth 25</p></div>
<p>I managed to spend a bit of time today setting up some of the music equipment I mentioned in my previous post. So far, I have Ableton Live 5.2.2 working (legit) and the Xiosynth. Im a bit annoyed as when I bought Ableton a couple of years ago, it came with a free downloadable upgrade to v6 &#8211; which no longer seems to be available. Im downloading the new v8 demo, so will see if it is worth the £250 upgrade once I have had a chance to try it out.</p>
<p>My new Samsung NC20 Netbook / Laptop seems to be handling things just fine. The only major problem is that when I have it on mains power there is a massive amount of noise. At the moment I have cables everywhere &#8211; so hopefully this issue can be addressed properly once I have a tidy up. Seeing as the battery lasts for about 5 hours, hopefully this wont be an issue for a while</p>
<p>I might just set up the Mac mini in here anyway. I wonder if Ableton support upgrading on a different O/S?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.getdowntonight.co.uk/2009/07/ableton-live-and-xiosynth-working/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Update for Nokia E71</title>
		<link>http://www.getdowntonight.co.uk/2009/07/update-for-nokia-e71/</link>
		<comments>http://www.getdowntonight.co.uk/2009/07/update-for-nokia-e71/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 10:36:50 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Science and Tech]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[e71]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.getdowntonight.co.uk/?p=74</guid>
		<description><![CDATA[There is a new firmware available for the Nokia E71 smartphone. Details and download available on the Nokia site here: http://europe.nokia.com/get-support-and-software/download-software/e71-update-phone]]></description>
			<content:encoded><![CDATA[<p><img class="alignright colorbox-74" title="Nokia E71" src="http://europe.nokia.com/EUROPE_NOKIA_COM_3/Get_Support/Product_Support/Support_for_Phones/E71/pics/E71_Banner_DeviceImage.jpg" alt="" width="231" height="261" />There is a new firmware available for the Nokia E71 smartphone.</p>
<p>Details and download available on the Nokia site here:</p>
<p>http://europe.nokia.com/get-support-and-software/download-software/e71-update-phone</p>
]]></content:encoded>
			<wfw:commentRss>http://www.getdowntonight.co.uk/2009/07/update-for-nokia-e71/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

