<?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>RedBrain @ $HOME : ~ $ &#187; exim</title>
	<atom:link href="http://redbrain.co.uk/index.php/tag/exim/feed/" rel="self" type="application/rss+xml" />
	<link>http://redbrain.co.uk</link>
	<description>Frustrated Software Developer</description>
	<lastBuildDate>Wed, 16 Nov 2011 17:36:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Swap my memory!</title>
		<link>http://redbrain.co.uk/index.php/update/swap-my-memory/</link>
		<comments>http://redbrain.co.uk/index.php/update/swap-my-memory/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 16:26:58 +0000</pubDate>
		<dc:creator>redbrain</dc:creator>
				<category><![CDATA[Update!]]></category>
		<category><![CDATA[containers]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[swap]]></category>

		<guid isPermaLink="false">http://redbrain.co.uk/?p=361</guid>
		<description><![CDATA[<p>So its been a while since i have updated, while i was offline i guess, i have been moving to a new server! I have had a few teething problems but i think its all going fine now!</p>
<p>I decided for a VPS off: http://www.vpsville.ca/index</p>
<p>I got the CITY plan Its very powerful because its running in [...]]]></description>
			<content:encoded><![CDATA[<p>So its been a while since i have updated, while i was offline i guess, i have been moving to a new server! I have had a few teething problems but i think its all going fine now!</p>
<p>I decided for a VPS off: <a href="http://www.vpsville.ca/index">http://www.vpsville.ca/index</a></p>
<p>I got the CITY plan Its very powerful because its running in some kind of container VPS, i get to see the full &#8216;$ cat /proc/cpuinfo&#8217;. And it 8 core&#8217;s of the new Intel core i7! But i only have 256mb ram which was the teething problem so i turned off innodb in mysql and limited php memory usage to help compensate. It was nice Debian Server has all the mysql.conf and php.conf files all documented very well so you generally have an idea what your changing.</p>
<p>This is a very useful link for mysql tunning: <a href="http://howtoforge.com/tuning-mysql-performance-with-mysqltuner">http://howtoforge.com/tuning-mysql-performance-with-mysqltuner</a></p>
<blockquote><p>&#8212;&#8212;&#8211; General Statistics &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
[--] Skipped version check for MySQLTuner script<br />
[OK] Currently running supported MySQL version 5.0.75-0ubuntu10.2<br />
[OK] Operating on 32-bit architecture with less than 2GB RAM</p>
<p>&#8212;&#8212;&#8211; Storage Engine Statistics &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[--] Status: +Archive -BDB -Federated -InnoDB -ISAM -NDBCluster<br />
[--] Data in MyISAM tables: 940K (Tables: 32)<br />
[--] Data in MEMORY tables: 0B (Tables: 1)<br />
[!!] Total fragmented tables: 2</p>
<p>&#8212;&#8212;&#8211; Performance Metrics &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[--] Up for: 2h 45m 48s (6K q [0.612 qps], 214 conn, TX: 11M, RX: 1M)<br />
[--] Reads / Writes: 74% / 26%<br />
[--] Total buffers: 58.0M global + 2.6M per thread (100 max threads)<br />
[!!] Maximum possible memory usage: 320.5M (125% of installed RAM)<br />
[OK] Slow queries: 0% (0/6K)<br />
[OK] Highest usage of available connections: 4% (4/100)<br />
[OK] Key buffer size / total MyISAM indexes: 16.0M/331.0K<br />
[OK] Key buffer hit rate: 99.7% (29K cached / 87 reads)<br />
[OK] Query cache efficiency: 58.5% (2K cached / 4K selects)<br />
[OK] Query cache prunes per day: 0<br />
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 291 sorts)<br />
[!!] Temporary tables created on disk: 30% (103 on disk / 339 total)<br />
[OK] Thread cache hit rate: 98% (4 created / 214 connections)<br />
[OK] Table cache hit rate: 89% (50 open / 56 opened)<br />
[OK] Open file limit used: 9% (98/1K)<br />
[OK] Table locks acquired immediately: 100% (3K immediate / 3K locks)</p>
<p>&#8212;&#8212;&#8211; Recommendations &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
General recommendations:<br />
Run OPTIMIZE TABLE to defragment tables for better performance<br />
MySQL started within last 24 hours &#8211; recommendations may be inaccurate<br />
Reduce your overall MySQL memory footprint for system stability<br />
Enable the slow query log to troubleshoot bad queries<br />
When making adjustments, make tmp_table_size/max_heap_table_size equal<br />
Reduce your SELECT DISTINCT queries without LIMIT clauses<br />
Variables to adjust:<br />
*** MySQL&#8217;s maximum memory usage is dangerously high ***<br />
*** Add RAM before increasing MySQL buffer variables ***<br />
tmp_table_size (&gt; 32M)<br />
max_heap_table_size (&gt; 16M)</p></blockquote>
<p>That&#8217;s the kind of output i got in my first go so i start going though each of these recommendations: This link shows you each of the different variables you can change: <a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-configuration.html">http://dev.mysql.com/doc/refman/5.1/en/innodb-configuration.html</a>, I think you can change a lot of Apache  memory variables but i haven&#8217;t looked into this yet!</p>
<p>But i also decided to make a swap file, this is very easy in Linux if your system is all running directly off a rootfs you can:</p>
<blockquote><p>$ dd if=/dev/zero of=/myswapfile bs=1024 count=1048576</p>
<p>#this should make you a 1G file which we can use for a Swap file!</p>
<p>$ mkswap /myswapfile</p>
<p>$ swapon /myswapfile</p>
<p>#this should work but in my VPS i keep getting &#8216;swapon: swapfile: Operation not permitted&#8217;</p>
<p>#you can also add this to your fstab like so:</p>
<p>$ echo &#8220;/myswapfile       none    swap    sw      0       0&#8243; &gt;&gt; /etc/fstab</p></blockquote>
<p>So yeah that&#8217;s quite useful to know! I have to say i have upgraded my wordpress to 2.8 and very unhappy to be honest, there are a lot of little bits and pieces annoying me 2.7.1 was a very good release! But this 2.8 is very memory hungry, but from what i read is that they have introduced a new API for widgets, plugins and themes. So i guess there will be problems for a while!</p>
<p>Anyways what i am hosting on my VPS is 4 sites:</p>
<p><a href="http://redbrain.co.uk">http://redbrain.co.uk</a></p>
<p><a href="http://brendanmullan.com">http://brendanmullan.com</a></p>
<p><a href="http://team-qcg.com">http://team-qcg.com</a></p>
<p><a href="http://animeequation.com">http://animeequation.com</a></p>
<p>They are the websites so i run: mySQL,   Exim mail server(because <a href="http://www.earth.li/~noodles/">noodles</a> recommended it to me), Apache (might test light httpd), PHP plus various php plugins, git (using those python-tools): <a href="http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way">http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way</a></p>
<p>I have to say anyone who works with me will know i hate SVN and CVS. Mainly because they are just retarded and your locked in too much and if the server goes down, then what the hell are you meant to do. My main reason for sticking with Linux was the fact now your no longer locked into software. A lot of people i know in the windows world use windows but use &#8216;cracked&#8217; copies of it, as-well as photoshop, games, office etc&#8230; all downloaded etc. Using free software alternatives means your no longer reliant on these kinds of software and you know whats available and you learn alot more about your computer and why!</p>
<p>So anyways i thought i would post a screenshot of my current desktop i think it looks pretty nice tbh! I was using <a href="http://en.wikipedia.org/wiki/Xmonad">Xmonad</a> for ages there, its a great window manager written in haskell its great because i run a server on my work desktop! And then i still need a way to run firefox, email and emacs. So this was very useful, and its very lightweight and usable. Other tiling window managers are light but very complicated!</p>
<div id="attachment_366" class="wp-caption alignleft" style="width: 310px"><a rel="attachment wp-att-366" href="http://redbrain.co.uk/?attachment_id=366"><img class="size-medium wp-image-366" title="myDesktop" src="http://redbrain.co.uk/wp-content/uploads/2009/06/desktop-300x187.png" alt="my laptop" width="300" height="187" /></a><p class="wp-caption-text">my laptop</p></div>
<p>So i am also giving <a href="http://en.wikipedia.org/wiki/Haskell_(programming_language)">Haskell</a> another go, i got the book &#8216;Real World Haskell&#8217;, its actually pretty good there is a helluva lot of learn, but its going to take a while before i&#8217;ll be seriously able to say i can write a mail client in haskell rofl! I would seriously like to make a GHS right now a gcc implementation of Haskell, because i have started the gcc-front-end documentation with a friend.</p>
<p><a href="http://gcc.gnu.org/wiki/FrontEnd/skeleton">http://gcc.gnu.org/wiki/FrontEnd/skeleton</a></p>
<p>Problem is were kind of stuck right now, i posted most of it all so far and put up the code, etc but there have been quite a few changes in the latest gcc-4.5-snapshots so trying to keep up with them. But the real problem is i posted the code etc, but posting source code on a wiki page&#8230; its not that nice! So this is another point where the gcc-developers on oftc.net have said should really get my FSF-copyright assignment document stuff done, because i have my automake work and now gcc, and they would like to see official documentation in the GCC-manual in the next releases i think this would really help GCC.</p>
<p>If you working in industry like me, you&#8217;ll find the only real thing keeping compilers/interpreters and programming languages alive in large business driven companies is the idea of parallelism, this is quite old right now but its only really getting together now! I also have a book on <a href="http://en.wikipedia.org/wiki/OpenMP">OPEN/MP</a> and know some of the basics of it in C/C++. Its very impressive the implementation in GCC and the Glibc. There is only a little theory to learn about OPENMP because actualy coding with it, is very simple! But you wont understand the code until you learn a little about shared memory systems and threading on this! Because OPENMP at the end of the day is starting threads for faster execution behind the scene. But it does all the work for accessing and manipulating memory without breaking your code for you! So in that sense its awesome <img src='http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So yeah i also joined <a href="http://wakoopa.com/redbrain">http://wakoopa.com/redbrain</a> Its quite an interesting idea! And also pointing out that: <a href="http://outlawpla.net/">http://outlawpla.net/</a> This is a Linux outlaws Planet, it should be cools i am hoping to get my blog on it as Dan and Fab pointed out in the show yesterday!</p>
<p>Anyways spent most of my time reading tbh recently so i havent been coding much, re-writing my OS from-scratch again i am starting to understand the i386 kind of now, and i want to structure my kernel correctly and make sure its as similar to just coding with libc as much as possible so i dont implement a stupidly named API of mad functions that only i understand! But i have done bits and pieces of cleaning my simple-programming language. Need to finish that tbh, there isn&#8217;t much more work for me to do to demonstrate the basics for it all. But been doing reading and writing takes alot of time when i work around my Job which takes up most of my time and i haven&#8217;t had a chance to get a break to do serious work at work, been documenating and transferring knowledge of work systems on Unix to new guys which is taking some time as they dont have a background in Linux or UNIX so its kind of frustrating to say the least.</p>
<p>Anyways i better head on looking forward to the <a href="http://www.belfastlinux.org/wiki/Main_Page">BLUG</a> meet on Wednesday! See you there guys!</p>
<div class="wp-caption alignleft" style="width: 510px"><a href="http://icanhascheezburger.files.wordpress.com/2009/06/funny-pictures-kitten-has-a-strange-roommate.jpg"><img title="space-time" src="http://icanhascheezburger.files.wordpress.com/2009/06/funny-pictures-kitten-has-a-strange-roommate.jpg" alt="no-space" width="500" height="374" /></a><p class="wp-caption-text">no-space</p></div>
]]></content:encoded>
			<wfw:commentRss>http://redbrain.co.uk/index.php/update/swap-my-memory/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

