<?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>Cloud Computing Blog</title>
	<atom:link href="http://cloudpedia.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://cloudpedia.org</link>
	<description>Cloud Computing for breakfast</description>
	<lastBuildDate>Fri, 27 Aug 2010 15:38:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP/MySQL Optimisations you might not know</title>
		<link>http://cloudpedia.org/php-mysql-optimisation/</link>
		<comments>http://cloudpedia.org/php-mysql-optimisation/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 15:38:42 +0000</pubDate>
		<dc:creator>databank</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://cloudpedia.org/?p=72</guid>
		<description><![CDATA[This short tutorial represents my view on the steps to follow to avoid website falling down due to traffic increase.
Starting from the assumption that application and/or website have dynamic data,  in order to have quick and easy access to the data you would save it into a database.
Cosidering a low budget project you would probably start [...]]]></description>
			<content:encoded><![CDATA[<p>This short tutorial represents my view on the steps to follow to avoid website falling down due to traffic increase.</p>
<p>Starting from the assumption that application and/or website have dynamic data,  in order to have quick and easy access to the data you would save it into a database.</p>
<p>Cosidering a low budget project you would probably start with a relational database (eg. MySQL or PostgreSQL etc.) and a comodity hardware.</p>
<p>More data usually means more delay in retreiving it,  more traffic means more retrieves of probably same data.</p>
<p>Here are my recommended optimizations from low to high traffic and small to large data sets<br />
I will assume you use Linux/PHP/MySQL<br />
FROM SQL SIDE</p>
<p>1) Use explicit mentioning of the columns you need to extract on select statements. People make the common mistake &#8220;SELECT * FROM table&#8221; when they actually only need part of the information retrieved</p>
<p>2) Use FIXED row size instead of DYNAMIC whenever possible. This gives a hint to your database server telling it where on the disk will find a specific record, in short words record 50 can be found at position 50 x rowSize , when row size is dynamic this is not true anymore.</p>
<p>3) Use INDEX on one or more columns. Indexes avoids reading the entire content of a table, simple example would be: you have a query SELECT column1, column2 FROM table WHERE gender=&#8217;male&#8217;; Having an index on gender column will tell the database server the location of gender=&#8217;male&#8217; rows, full table scan is not necessary anymore just to find all &#8216;male&#8217;. Get documented on how to check used indexes in queryes or how to force explicit index usage. As a final note to indexes, they slow down data insertion in favor of data retrieving. Data insertion for columns that belong to indexes will make them also update the index extending the insert time</p>
<p>4) Use DELAYED INSERTS if you dont need the data right away, the database server will fill a buffer and insert more records at the same time later</p>
<p>5) Use TABLE PARTITIONING if available, it will make the table data being split into more files in a smart way that can speed up, avoiding reading of the entire table content</p>
<p>6) Avoid FOREIGN KEYS usage, you just give your server more headache to verify relations between tables. Eg.: inserting a aproduct in category X will force another scan of table category to check if X is valid data. This is up to you because haveing foreign keys also brings the benefits of having consistent data.</p>
<p>7) Use MEMORY ( or HEAP ) tables. Heap tables are stored in memory and lost with database server restart. They are very fast because the actual data is stored in ram. You could use a heap table as a mirror of an actual one and make it sync when new data is inserted. Careful using heap tables, you have to implement your own mechanism to ensure data was not lost upon reboot</p>
<p> <img src='http://cloudpedia.org/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> Use LIMIT in your queries. Since PHP has a memory limit usage select with no limit on a table bigger than the memory_limit variable in PHP will make PHP end script execution with an error message. There is another value from mysql side called max_packet_size that will make the query fail if data set is bigger than the value, this case the query fails but the php client can continue execution. Rule applies also for BLOB columns, if you plan to store files (eg. images) inside the database you should consider splitting them in multiple pieces ( rows ) of a size that is less then mysql max_packet_size, while from PHP you should make sure you retrieve only 1 row at a time, process it (output or save to file) and free the memory before you continue to the next record in order not to exceed PHP max memory limit</p>
<p>FROM OS SIDE</p>
<p>1) Enable QUERY CACHE and use it in queryes. Enable query cache from the server side (eg. MySQL can be configured from its configuration file my.cnf  ). Whenever you make a SELECT with query cache enabled the results will be saved separately so the next time you do the same query it will bring back the results from the cache which is lot more faster. As an extra tunning some database servers ( like MySQL) support explicit value in query, eg.: SELECT SQL_NO_CACHE column FROM table which tells the server not to cache the results of this query. You may have reasons not to cache some queryes in favor of others  because the query cache have a size limit and you would want to use it for some queryes that are used more often</p>
<p>2) Set THREAD_CONCURENCY to enable your database to use the full power of all your cpu cores your server has, it is recommended that you set a number double to the number of cpu cores (2 mysql threads per cpu core)</p>
<p>3) set memory_limit in php.ini to a value that suits your needs (eg. if you want to process hi res images ) or else your script would die when limit is reached</p>
<p>4) Use FAST-CGI with a webserver that is known to deliver highest requests/s . PHP can be run as CGI, apache MODULE or FAST-CGI. With CGI being the oldest and slowest, apache webserver came with the idea of compiling php inside the apache as an alternative of loading PHP every time a script awaits execution. Those ages are gone, we now have FAST-CGI where a number of PHP instances are started and wait for a script to be injected for execution. FAST-CGI also comes with another benefit &#8230; it is available for other webservers too &#8230; unlike apache module that is apache specific. At this exact moment there are a number of web servers that are more performant than  apache, worth mentioning is nginx and lighttpd both open source, so if you want a lightning fast response from your web server you should give a try to any of those 2.</p>
<p>5) Use NOATIME &#8230; if your filesystem is a linux ext partition. Atime file attribute will tell you when a file was last accessed resulting in &#8230; BINGO &#8230; a write for each read . If you do not care when file X was last accesed you should trade this for some extra speed.</p>
<p>FROM HARDWARE SIDE</p>
<p>1) Use HIGHEST HDD RPM or the new SSD HDD. Everybody knows the biggest bottleneck on a server is the hard disk. The higher RPM the higher rate for data retrieval from disk.</p>
<p>2) Use HARDWARE RAID. Oh yeah, double/ triple/ multiply the speed of your read speed using raid. Servers support a mechanism to convert a number of disks into a logical one having the speed increased upto the sum of all. Gathering more hdd into a raid will bring the feature of reading/writing to N number of drives at the same time, raid system will know how to partition the data in a way that continious data will be saved into separate hard drives.<br />
Example<br />
[hdd1   1,4,7 ] [hdd2 2,5,8 ] [hdd3 3,6,9 ]</p>
<p>reading from a file will result reading from more hdd at the same time. What are the benefits ? Supposing each hard-disk can read with 80MB/s if you need to make a select on a database that has 360MB, with 1 hdd it will take 3 seconds to read the data, in a 3 hdd raid this operation only takes 1 second. As simple as that.  Please consult the documentation for available types of raid and the benefits of each</p>
<p>3) Use MEMCACHE. Memcache is client/server system where clients push data to be stored in memory by the server and be retrieved later. At this moment many of high traffic websites use memcache to deliver results (eg. youtube, google), skipping page generation process and saving cpu, disk reads and a lot of time. People use this sometimes even to save entire generated html code. Since everything is saved in memory you definitely need lot of ram and it will definitely give you a real boost.</p>
<p>FROM APPLICATION SIDE</p>
<p>1) Optimize your resources in a way that they do not take lot of space (eg. optimize your images, videos you deliver)</p>
<p>2) Implement CACHING at different levels to avoid queries as much as possible. Verify if a cache exists (eg. product-123.cache ),  serve from cache if exists, generate full or part of a page and save it to cache, remember to remove cache if any relevant data changes.</p>
<p>3) serve static content from different place, eg: serve images used in html from another server or a CDN network and also if possible serve from multiple different hostnames, browser will be downloading them in parallel and not wait for 1 resource to finish downloading before will start downloading the next. You could make subdomains that point to same web folder for example images1.sitename.com and images2.sitename.com</p>
<p>4) ajax and php session do not work well together in the traditional way. Although you can fire asynchronous requests and the web server supports that, 1 request still waits for the other if you  use sessions in php. Why ? Because sessions get saved in a file, session_start() opens the file locking it ( which makes it unavailable for another request ) until script ends execution or session is closed by user.</p>
<p>If your server is still slow you should consider splitting services on multiple servers. Ex: separate server for mysql database, separate server for memcache.</p>
<p>If everything you optimise does not give you the speed your users would like, you have to join the could my friend<br />
At this level, rules change and you just have to forget about relational databases like mysql</p>
<p>Welcome to NoSQL or should i say NoREL ?</p>
]]></content:encoded>
			<wfw:commentRss>http://cloudpedia.org/php-mysql-optimisation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thrift on Fedora Core 10</title>
		<link>http://cloudpedia.org/thrift-on-fedora-core-10/</link>
		<comments>http://cloudpedia.org/thrift-on-fedora-core-10/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 20:04:15 +0000</pubDate>
		<dc:creator>databank</dc:creator>
				<category><![CDATA[Dependencies]]></category>

		<guid isPermaLink="false">http://cloudpedia.org/?p=67</guid>
		<description><![CDATA[[root@thrift /]# yum install gcc-c++
[root@thrift /]# cd /tmp/
[root@thrift tmp]# wget -O thrift.tgz &#8220;http://gitweb.thrift-rpc.org/?p=thrift.git;a=snapshot;h=HEAD;sf=tgz&#8221;
[root@thrift tmp]# tar zxvf thrift.tgz
[root@thrift tmp]# cd thrift
[root@thrift thrift]# ./bootstrap.sh
./bootstrap.sh: line 24: autoscan: command not found
[root@thrift thrift]# yum install autoconf
[root@thrift thrift]# ./bootstrap.sh
./bootstrap.sh: line 25: aclocal: command not found
[root@thrift thrift]# yum install automake
[root@thrift thrift]# ./bootstrap.sh
configure.ac:44: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">[root@thrift /]# yum install gcc-c++</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">[root@thrift /]# cd /tmp/</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">[root@thrift tmp]# wget -O thrift.tgz &#8220;http://gitweb.thrift-rpc.org/?p=thrift.git;a=snapshot;h=HEAD;sf=tgz&#8221;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">[root@thrift tmp]# tar zxvf thrift.tgz</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">[root@thrift tmp]# cd thrift</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">[root@thrift thrift]# ./bootstrap.sh</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">./bootstrap.sh: line 24: autoscan: command not found</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">[root@thrift thrift]# yum install autoconf</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">[root@thrift thrift]# ./bootstrap.sh</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">./bootstrap.sh: line 25: aclocal: command not found</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">[root@thrift thrift]# yum install automake</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">[root@thrift thrift]# ./bootstrap.sh</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">configure.ac:44: error: possibly undefined macro: AC_PROG_LIBTOOL</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">If this token and others are legitimate, please use m4_pattern_allow.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">See the Autoconf documentation.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">configure.ac:26: installing `./install-sh&#8217;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">configure.ac:26: installing `./missing&#8217;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">compiler/cpp/Makefile.am: installing `./depcomp&#8217;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">configure.ac: installing `./ylwrap&#8217;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">lib/cpp/Makefile.am:24: Libtool library used but `LIBTOOL&#8217; is undefined</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">lib/cpp/Makefile.am:24:   The usual way to define `LIBTOOL&#8217; is to add `AC_PROG_LIBTOOL&#8217;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">lib/cpp/Makefile.am:24:   to `configure.ac&#8217; and run `aclocal&#8217; and `autoconf&#8217; again.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">lib/cpp/Makefile.am:24:   If `AC_PROG_LIBTOOL&#8217; is in `configure.ac&#8217;, make sure</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">lib/cpp/Makefile.am:24:   its definition is in aclocal&#8217;s search path.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">test/Makefile.am:30: Libtool library used but `LIBTOOL&#8217; is undefined</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">test/Makefile.am:30:   The usual way to define `LIBTOOL&#8217; is to add `AC_PROG_LIBTOOL&#8217;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">test/Makefile.am:30:   to `configure.ac&#8217; and run `aclocal&#8217; and `autoconf&#8217; again.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">test/Makefile.am:30:   If `AC_PROG_LIBTOOL&#8217; is in `configure.ac&#8217;, make sure</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">test/Makefile.am:30:   its definition is in aclocal&#8217;s search path.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">[root@thrift thrift]# ./configure &#8211;with-csharp=no &#8211;with-java=no &#8211;with-erlang=no &#8211;with-py=no &#8211;with-perl=no &#8211;with-ruby=no &#8211;with-php=yes &#8211;enable-gen-php</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&#8230;&#8230;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">checking for boostlib &gt;= 1.33.1&#8230; configure: error: We could not detect the boost libraries (version 1.33 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to &#8211;with-boost option.  If you are sure you have boost installed, then check your version number looking in &lt;boost/version.hpp&gt;. See http://randspringer.de/boost for more documentation.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">[root@thrift thrift]# yum install boost boost-devel</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">[root@thrift thrift]# ./configure &#8211;with-csharp=no &#8211;with-java=no &#8211;with-erlang=no &#8211;with-py=no &#8211;with-perl=no &#8211;with-ruby=no &#8211;with-php=yes &#8211;enable-gen-php</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">checking for zlib &gt;= 1.2.3&#8230; no</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">./configure: line 5866: syntax error near unexpected token `MONO,&#8217;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">./configure: line 5866: `  PKG_CHECK_MODULES(MONO, mono &gt;= 2.0.0, net_3_5=yes, net_3_5=no)&#8217;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">
<p>[root@thrift thrift]# yum install zlib-devel</p></div>
<p>It all started with a project i work on having a mysql database with 1mil+ records and 10GB of disk space on a rather slow  server, i failed to setup mysql distributed with federated storage engine and i was looking for a distributed database project and found hypertable. But i code PHP, so what should i do ? Hypertable offers PHP support only through a third party called thrift. It looks like thrift project (started by facebook and now an apache project ) can generate code to access hypertable into your programming language.  Here is my experience compiling thrift on FC 10<br />
[root@thrift /]# yum install gcc-c++<br />
[root@thrift /]# cd /tmp/<br />
[root@thrift tmp]# wget -O thrift.tgz &#8220;http://gitweb.thrift-rpc.org/?p=thrift.git;a=snapshot;h=HEAD;sf=tgz&#8221;<br />
[root@thrift tmp]# tar zxvf thrift.tgz<br />
[root@thrift tmp]# cd thrift<br />
[root@thrift thrift]# ./bootstrap.sh<br />
./bootstrap.sh: line 24: autoscan: command not found<br />
[root@thrift thrift]# yum install autoconf<br />
[root@thrift thrift]# ./bootstrap.sh<br />
./bootstrap.sh: line 25: aclocal: command not found<br />
[root@thrift thrift]# yum install automake<br />
[root@thrift thrift]# ./bootstrap.sh<br />
configure.ac:44: error: possibly undefined macro: AC_PROG_LIBTOOL<br />
If this token and others are legitimate, please use m4_pattern_allow.<br />
See the Autoconf documentation.<br />
configure.ac:26: installing `./install-sh&#8217;<br />
configure.ac:26: installing `./missing&#8217;<br />
compiler/cpp/Makefile.am: installing `./depcomp&#8217;<br />
configure.ac: installing `./ylwrap&#8217;<br />
lib/cpp/Makefile.am:24: Libtool library used but `LIBTOOL&#8217; is undefined<br />
lib/cpp/Makefile.am:24:   The usual way to define `LIBTOOL&#8217; is to add `AC_PROG_LIBTOOL&#8217;<br />
lib/cpp/Makefile.am:24:   to `configure.ac&#8217; and run `aclocal&#8217; and `autoconf&#8217; again.<br />
lib/cpp/Makefile.am:24:   If `AC_PROG_LIBTOOL&#8217; is in `configure.ac&#8217;, make sure<br />
lib/cpp/Makefile.am:24:   its definition is in aclocal&#8217;s search path.<br />
test/Makefile.am:30: Libtool library used but `LIBTOOL&#8217; is undefined<br />
test/Makefile.am:30:   The usual way to define `LIBTOOL&#8217; is to add `AC_PROG_LIBTOOL&#8217;<br />
test/Makefile.am:30:   to `configure.ac&#8217; and run `aclocal&#8217; and `autoconf&#8217; again.<br />
test/Makefile.am:30:   If `AC_PROG_LIBTOOL&#8217; is in `configure.ac&#8217;, make sure<br />
test/Makefile.am:30:   its definition is in aclocal&#8217;s search path.</p>
<p>[root@thrift thrift]# ./configure &#8211;with-csharp=no &#8211;with-java=no &#8211;with-erlang=no &#8211;with-py=no &#8211;with-perl=no &#8211;with-ruby=no &#8211;with-php=yes &#8211;enable-gen-php</p>
<p>&#8230;&#8230;</p>
<p>checking for boostlib &gt;= 1.33.1&#8230; configure: error: We could not detect the boost libraries (version 1.33 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to &#8211;with-boost option.  If you are sure you have boost installed, then check your version number looking in &lt;boost/version.hpp&gt;. See http://randspringer.de/boost for more documentation.</p>
<p>[root@thrift thrift]# yum install boost boost-devel</p>
<p>[root@thrift thrift]# ./configure &#8211;with-csharp=no &#8211;with-java=no &#8211;with-erlang=no &#8211;with-py=no &#8211;with-perl=no &#8211;with-ruby=no &#8211;with-php=yes &#8211;enable-gen-php<br />
&#8230;.</p>
<p>checking for zlib &gt;= 1.2.3&#8230; no<br />
./configure: line 5866: syntax error near unexpected token `MONO,&#8217;<br />
./configure: line 5866: `  PKG_CHECK_MODULES(MONO, mono &gt;= 2.0.0, net_3_5=yes, net_3_5=no)&#8217;</p>
<p>[root@thrift thrift]# yum install zlib-devel<br />
&#8230;&#8230;<br />
./configure: line 5866: syntax error near unexpected token `MONO,&#8217;<br />
./configure: line 5866: `  PKG_CHECK_MODULES(MONO, mono &gt;= 2.0.0, net_3_5=yes, net_3_5=no)&#8217;<br />
[root@thrift thrift]# yum install pkgconfig</p>
<p>[root@thrift thrift]# ./bootstrap.sh<br />
[root@thrift thrift]# ./configure &#8211;with-csharp=no &#8211;with-java=no &#8211;with-erlang=no &#8211;with-py=no &#8211;with-perl=no &#8211;with-ruby=no &#8211;with-php=yes &#8211;enable-gen-php</p>
<p>[root@thrift thrift]# ./bootstrap.sh<br />
configure.ac:44: error: possibly undefined macro: AC_PROG_LIBTOOL<br />
If this token and others are legitimate, please use m4_pattern_allow.<br />
See the Autoconf documentation.<br />
configure.ac:26: installing `./install-sh&#8217;<br />
configure.ac:26: installing `./missing&#8217;<br />
compiler/cpp/Makefile.am: installing `./depcomp&#8217;<br />
configure.ac: installing `./ylwrap&#8217;<br />
lib/cpp/Makefile.am:24: Libtool library used but `LIBTOOL&#8217; is undefined</p>
<p>[root@thrift thrift]# yum install libtool</p>
<p>[root@thrift thrift]# ./bootstrap.sh<br />
[root@thrift thrift]# ./configure &#8211;with-csharp=no &#8211;with-java=no &#8211;with-erlang=no &#8211;with-py=no &#8211;with-perl=no &#8211;with-ruby=no &#8211;enable-gen-php<br />
[root@thrift thrift]# make<br />
../../ylwrap: line 109: yacc: command not found<br />
[root@thrift thrift]# yum install byacc</p>
<p>[root@thrift thrift]# make<br />
/tmp/thrift/missing: line 52: flex: command not found<br />
WARNING: `flex&#8217; is missing on your system.  You should only need it if<br />
you modified a `.l&#8217; file.  You may need the `Flex&#8217; package<br />
in order for those modifications to take effect.  You can get<br />
`Flex&#8217; from any GNU archive site.</p>
<p>[root@thrift thrift]# yum install flex<br />
[root@thrift thrift]# ./configure &#8211;with-csharp=no &#8211;with-java=no &#8211;with-erlang=no &#8211;with-py=no &#8211;with-perl=no &#8211;with-ruby=no &#8211;enable-gen-php<br />
[root@thrift thrift]# make<br />
[root@thrift thrift]# make install</p>
]]></content:encoded>
			<wfw:commentRss>http://cloudpedia.org/thrift-on-fedora-core-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passwordless ssh</title>
		<link>http://cloudpedia.org/passwordless-ssh-kf/</link>
		<comments>http://cloudpedia.org/passwordless-ssh-kf/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 09:26:47 +0000</pubDate>
		<dc:creator>databank</dc:creator>
				<category><![CDATA[Dependencies]]></category>

		<guid isPermaLink="false">http://cloudpedia.org/?p=62</guid>
		<description><![CDATA[in order to be able to login to a remote ssh server without a password you need:
1) generate your key (do not enter any password)
# ssh-keygen
2) copy key to remote host
# ssh-copy-id &#8216;-p 22 user@remote-host&#8217;
3) after entering the correct password once, you should be able to ssh to user@remote-host without
a password.
]]></description>
			<content:encoded><![CDATA[<p>in order to be able to login to a remote ssh server without a password you need:</p>
<p>1) generate your key (do not enter any password)<br />
# ssh-keygen</p>
<p>2) copy key to remote host<br />
# ssh-copy-id &#8216;-p 22 user@remote-host&#8217;</p>
<p>3) after entering the correct password once, you should be able to ssh to user@remote-host without<br />
a password.</p>
]]></content:encoded>
			<wfw:commentRss>http://cloudpedia.org/passwordless-ssh-kf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compile and Install CloudStore (kosmosfs) release 0.3</title>
		<link>http://cloudpedia.org/install-cloudstore-kosmosfs-0-3/</link>
		<comments>http://cloudpedia.org/install-cloudstore-kosmosfs-0-3/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 00:43:25 +0000</pubDate>
		<dc:creator>databank</dc:creator>
				<category><![CDATA[Cloudstore (KosmosFS)]]></category>
		<category><![CDATA[Fedora Core 10]]></category>

		<guid isPermaLink="false">http://cloudpedia.org/?p=43</guid>
		<description><![CDATA[In this example i will try to install cloudstore ( kosmosfs or simply kfs ) on a fedora 10 linux operating system
and will use the following folder structure:
/CLOUD
/storage  - folder to mount kfs storage later
/source/kfs-0.3/ &#8211; source code

user@computer:$ [root@localhost ~]# mkdir /CLOUD/source;cd /CLOUD/source[root@localhost source]# wget http://downloads.sourceforge.net/project/kosmosfs/kosmosfs/kfs-0.3/kfs-0.3.tar.gz[root@localhost source]# tar zxvf kfs-0.3.tar.gz[root@localhost source]# cd kfs-0.3[root@localhost kfs-0.3]# mkdir build;cd [...]]]></description>
			<content:encoded><![CDATA[<p>In this example i will try to install cloudstore ( kosmosfs or simply kfs ) on a fedora 10 linux operating system<br />
and will use the following folder structure:<br />
/CLOUD<br />
/storage  - folder to mount kfs storage later<br />
/source/kfs-0.3/ &#8211; source code</p>

<div class="wp-terminal">user@computer:$ [root@localhost ~]# mkdir /CLOUD/source;cd /CLOUD/source<br/>[root@localhost source]# wget http://downloads.sourceforge.net/project/kosmosfs/kosmosfs/kfs-0.3/kfs-0.3.tar.gz<br/>[root@localhost source]# tar zxvf kfs-0.3.tar.gz<br/>[root@localhost source]# cd kfs-0.3<br/>[root@localhost kfs-0.3]# mkdir build;cd build<br/>[root@localhost build]#  cmake ..<br/><br/>Unable to find the requested Boost libraries.<br/><br/>Unable to find the Boost header files.  Please set BOOST_ROOT to the root<br/>directory containing Boost or BOOST_INCLUDEDIR to the directory containing<br/>Boost's headers.<br/></div>

<p>I solved boost dependencies by installing boost and boost-devel</p>

<div class="wp-terminal">user@computer:$ [root@localhost build]# yum install boost boost-devel<br/></div>

<p>resumed the process</p>

<div class="wp-terminal">user@computer:$ [root@localhost build]# cmake ..<br/>CMake Error at cmake/FindLog4cpp.cmake:41 (MESSAGE):<br/>Could NOT find Log4cpp library<br/>Call Stack (most recent call first):<br/>CMakeLists.txt:33 (find_package)<br/></div>

<p>i did not find log4cpp rpm packages for download so i had to compile log4cpp myself,<br />
i wrote a post on how to <a href="/install-log4cpp-fedora-core-10/">install log4cpp on fedora core 10</a></p>
<p>again, resumed the process</p>

<div class="wp-terminal">user@computer:$ [root@localhost build]# cmake ..<br/>-- Found JNI...building kfs_access<br/>CMake Error: The following variables are used in this project, but they are set to NOTFOUND.<br/>Please set them or make sure they are set and tested correctly in the CMake files:<br/>JAVA_INCLUDE_PATH (ADVANCED)<br/>used as include directory in directory /CLOUD/source/kfs-0.3<br/>used as include directory in directory /CLOUD/source/kfs-0.3/src/cc/access<br/>JAVA_INCLUDE_PATH2 (ADVANCED)<br/>used as include directory in directory /CLOUD/source/kfs-0.3<br/>used as include directory in directory /CLOUD/source/kfs-0.3/src/cc/access<br/><br/>-- Configuring incomplete, errors occurred!<br/></div>

<p>it would be great if kfs would have an option to skip the java components but since there is no such option i&#8217;ll go ahead and install java using the easy way around &#8211; rpm package</p>

<div class="wp-terminal">user@computer:$ yum install java java-devel<br/></div>

<p>resume process</p>

<div class="wp-terminal">user@computer:$ cmake ..<br/>gmake<br/>[ 30%] Building CXX object src/cc/libkfsIO/CMakeFiles/kfsIO.dir/kfsutils.o<br/>/CLOUD/source/kfs-0.3/src/cc/libkfsIO/kfsutils.cc:44:21: error: xfs/xfs.h: No such file or directory<br/></div>

<p>i did not have xfs installed, it did complain finally although did not complain during cmake</p>

<div class="wp-terminal">user@computer:$ yum install xfsprogs xfsprogs-devel<br/>gmake<br/>[ 25%] Building CXX object src/cc/libkfsIO/CMakeFiles/kfsIO.dir/kfsutils.o<br/>In file included from /usr/include/xfs/platform_defs-i386.h:54,<br/>from /usr/include/xfs/platform_defs.h:7,<br/>from /usr/include/xfs/xfs.h:36,<br/>from /CLOUD/source/kfs-0.3/src/cc/libkfsIO/kfsutils.cc:44:<br/>/usr/include/xfs/linux.h:20:23: error: uuid/uuid.h: No such file or directory<br/></div>

<p>i have previously solved the problem with <a href="/xfs-uuid-no-such-file-or-directory/">xfs uuid/uuid.h</a> by simply installing e2fsprogs-devel</p>

<div class="wp-terminal">user@computer:$ gmake<br/>[ 47%] Building CXX object src/cc/chunk/CMakeFiles/chunkscrubber.dir/chunkscrubber_main.o<br/>Linking CXX executable chunkscrubber<br/>/usr/bin/ld: cannot find -lcrypto<br/>collect2: ld returned 1 exit status<br/>gmake[2]: *** [src/cc/chunk/chunkscrubber] Error 1<br/>gmake[1]: *** [src/cc/chunk/CMakeFiles/chunkscrubber.dir/all] Error 2<br/>gmake: *** [all] Error 2<br/></div>

<p>this is an easy one</p>

<div class="wp-terminal">user@computer:$ yum install openssl-devel<br/>gmake<br/>gmake install<br/></div>

<p>building the java components, dont forget to install ant if you dont already have it<br />
if you are not going to create java applications that interact with kfs you can skip this</p>

<div class="wp-terminal">user@computer:$ yum install ant<br/>cd ..<br/>ant jar<br/></div>

<p>you can also building the python support, i will not do this now</p>
<p>you may now continue with the next step, configure Cloudstore ( kosmosfs ) release 0.3</p>
]]></content:encoded>
			<wfw:commentRss>http://cloudpedia.org/install-cloudstore-kosmosfs-0-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>install log4cpp on fedora core 10</title>
		<link>http://cloudpedia.org/install-log4cpp-fedora-core-10/</link>
		<comments>http://cloudpedia.org/install-log4cpp-fedora-core-10/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 23:40:40 +0000</pubDate>
		<dc:creator>databank</dc:creator>
				<category><![CDATA[Dependencies]]></category>

		<guid isPermaLink="false">http://cloudpedia.org/?p=45</guid>
		<description><![CDATA[i have noticed that fedora core 11 already comes with log4cpp rpm, if you need to install log4cpp on a FC9 or FC10  you will need to compile it yourself ( i could not find any preconfigured version )
here is how i managed to compile and install log4cpp on fedora core 10
1) download and unpack [...]]]></description>
			<content:encoded><![CDATA[<p>i have noticed that fedora core 11 already comes with log4cpp rpm, if you need to install log4cpp on a FC9 or FC10  you will need to compile it yourself ( i could not find any preconfigured version )</p>
<p>here is how i managed to compile and install log4cpp on fedora core 10</p>
<p>1) download and unpack log4cpp</p>

<div class="wp-terminal">user@computer:$ cd /tmp<br/>wget  http://www.cloudpedia.org/downloads/log4cpp-1.0.tar.gz<br/>tar zxvf log4cpp-1.0.tar.gz<br/></div>

<p>2) download and install patches ( it will not compile without applying them )</p>

<div class="wp-terminal">user@computer:$ wget http://www.cloudpedia.org/downloads/log4cpp-1.0-fix-doc-dest.patch<br/>wget http://www.cloudpedia.org/downloads/log4cpp-1.0-gcc43.patch<br/>wget http://www.cloudpedia.org/downloads/log4cpp-1.0-no-snprintf.patch<br/>wget http://www.cloudpedia.org/downloads/log4cpp-1.0-remove-pc-cflags.patch<br/>patch -p0 &lt; log4cpp-1.0-fix-doc-dest.patch<br/>patch -p0 &lt; log4cpp-1.0-gcc43.patch<br/>patch -p0 &lt; log4cpp-1.0-no-snprintf.patch<br/>patch -p0 &lt; log4cpp-1.0-remove-pc-cflags.patch<br/></div>

<p>3) configure and install</p>

<div class="wp-terminal">user@computer:$ cd log4cpp-1.0<br/>./configure<br/>make<br/>make install<br/></div>

<p>4) you may now finally go back and solve other dependencies</p>
<p>hope this one is solved now i spent a weekend on it until i found the right patches<br />
good luck</p>
]]></content:encoded>
			<wfw:commentRss>http://cloudpedia.org/install-log4cpp-fedora-core-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MooseFS 1.5.12 on CentOS 5.3 vmware image</title>
		<link>http://cloudpedia.org/moosefs-1-5-12-on-centos-5-3-vmware-image/</link>
		<comments>http://cloudpedia.org/moosefs-1-5-12-on-centos-5-3-vmware-image/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 01:32:48 +0000</pubDate>
		<dc:creator>databank</dc:creator>
				<category><![CDATA[CentOS 5.3]]></category>
		<category><![CDATA[MooseFS ( mfs )]]></category>

		<guid isPermaLink="false">http://streamass.com/?p=7</guid>
		<description><![CDATA[For those of you who would like to test MooseFS functionality i have made vmware container with version 5.3 of CentOS and MooseFS 1.5.12 installed and configured.
To test it, download the vmware container and run it with Free Vmware Player
Steps to follow:
1) download and unpack the vmware container
2) install vmware player if you dont have [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you who would like to test <a href="/moosefs-distributed-fault-tolerant-storage-engine/">MooseFS</a> functionality i have made vmware container with version 5.3 of CentOS and MooseFS 1.5.12 installed and configured.</p>
<p>To test it, download the <a href="/downloads/mfs-1.5.12-centos-5.3.rar">vmware container</a> and run it with <a style="text-decoration: none;" href="http://www.vmware.com/products/player/" target="_blank">Free Vmware Playe</a>r</p>
<p>Steps to follow:<br />
1) download and unpack the vmware container<br />
2) install vmware player if you dont have it already<br />
3) double click the vmx file inside unpacked folder<br />
4)  from vmware player set the network to NAT ( unless you know what you&#8217;re doing and wanna configure it manually )<br />
5) at login prompt login with user root and password 1234<br />
6) see what ip address you got from vmware (type ipconfig) in my case was 192.168.144.130<br />
7) edit chunk1 and chunk2 configuration files to reflect the new ip address<br />
<code><br />
mcedit /CLOUD/software/compiled/mfs/chunk1/etc/mfschunkserver.cfg<br />
mcedit /CLOUD/software/compiled/mfs/chunk2/etc/mfschunkserver.cfg<br />
</code><br />
 <img src='http://cloudpedia.org/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> run these commands in the same order as below:<br />
<code><br />
cd /CLOUD/<br />
./start_metaserver.sh<br />
./start_chunk1.sh<br />
./start_chunk2.sh<br />
./mount_mfs.sh<br />
</code><br />
At this moment you should have a mfs storage volume mounted to /CLOUD/storage/ and a file inside named &#8220;file_inside_mfs&#8221;</p>
<p>if you cannot access /CLOUD/storage/ for some reason you should recheck chunk server configuration and make sure you put the right ip, also check the logs in /var/log/messages</p>
<p>As a point of start i suggest to test the tools located in<br />
/CLOUD/software/compiled/mfs/mount/bin</p>
<p>FYI the actual chunks are saved into /mnt/chunkX/</p>
]]></content:encoded>
			<wfw:commentRss>http://cloudpedia.org/moosefs-1-5-12-on-centos-5-3-vmware-image/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MooseFS distributed, fault tolerant storage engine</title>
		<link>http://cloudpedia.org/moosefs-distributed-fault-tolerant-storage-engine/</link>
		<comments>http://cloudpedia.org/moosefs-distributed-fault-tolerant-storage-engine/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 01:00:02 +0000</pubDate>
		<dc:creator>databank</dc:creator>
				<category><![CDATA[Gnu C]]></category>
		<category><![CDATA[MooseFS ( mfs )]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://streamass.com/?p=10</guid>
		<description><![CDATA[MooseFS is a fault tolerant distributed storage system.  It is verry easy to configure, install and maintain.
It consists in one metaserver and multiple chunkservers installed over the network. Chunkservers can be added and removed at any time neither it requires to stop the the filesystem nor to reconfigure the metaserver.
MooseFS will split your files into chunk [...]]]></description>
			<content:encoded><![CDATA[<p>MooseFS is a fault tolerant distributed storage system.  It is verry easy to configure, install and maintain.<br />
It consists in one metaserver and multiple chunkservers installed over the network. Chunkservers can be added and removed at any time neither it requires to stop the the filesystem nor to reconfigure the metaserver.</p>
<p>MooseFS will split your files into chunk and distribute them across connected chunkservers. Assuming that each chunkserver is installed on a standalone computer it is possible to shutdown one or more servers and the filesystem will continue functioning normally.</p>
<p>The number of copies of each chunk they call it goal. Each folder has a goal attribute inherited from the parent folder or changed manually. When a file is created inside a folder it will have the goal of that folder. I think by default the main folder ( / ) gets goal 2.</p>
<p>The package also includes tools to change the goal of files and folders manually, individually or recursive.<br />
When a chunkserver goes off (ie. network failure, hardware failure etc.) the metaserver will internally recalculate goals and start copying under goal chunks  to other chunkservers until all files have the desired number of copies.</p>
<p>Each chunkserver will participate with storage space ( local folders ) and the total available space will be the sum of all participating chunkservers. For the space to be calculated correctly mfs developpers asks that no other files should be saved to those folders and also each folder should be the root mount point of the partition</p>
<p>Example:<br />
if you have partition /dev/sdb2 and mount it in /mnt/sdb2/ you should not save any data in /mnt/sdb2/ and the folder shared to moose filesystem should be /mnt/sdb2/ not /mnt/sdb2/folderX/</p>
]]></content:encoded>
			<wfw:commentRss>http://cloudpedia.org/moosefs-distributed-fault-tolerant-storage-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloudstore (KosmosFS), An open source implementation of GFS</title>
		<link>http://cloudpedia.org/cloudstore-kosmosfs-gfs-implementation/</link>
		<comments>http://cloudpedia.org/cloudstore-kosmosfs-gfs-implementation/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 03:11:43 +0000</pubDate>
		<dc:creator>databank</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Cloudstore (KosmosFS)]]></category>
		<category><![CDATA[Gnu C]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://streamass.com/?p=29</guid>
		<description><![CDATA[From their website:

HIGH PERFORMANCE SCALABLE STORAGE
Web-scale applications require a scalable storage infrastructure to process vast amounts of data. CloudStore (formerly, Kosmos filesystem) is an open-source high performance distributed filesystem designed to meet such an infrastructure need:
CloudStore is implemented in C++ using standard system components such as STL, boost libraries, aio, log4cpp.
CloudStore is integrated with Hadoop and Hypertable. [...]]]></description>
			<content:encoded><![CDATA[<p>From their website:</p>
<div style="background-color: lightgrey">
<h1 style="color: #5c5c5c; font-family: Arial, Helvetica, sans-serif; font-size: 1.4em; padding-top: 15px; padding-right: 0px; padding-bottom: 0px; padding-left: 85px;">HIGH PERFORMANCE SCALABLE STORAGE</h1>
<p style="text-align: justify; font-size: 14px; color: #555355; font-family: Arial, Helvetica, sans-serif; padding-top: 0px; padding-right: 20px; padding-bottom: 20px; padding-left: 20px;" align="left">Web-scale applications require a scalable storage infrastructure to process vast amounts of data. CloudStore (formerly, Kosmos filesystem) is an open-source high performance distributed filesystem designed to meet such an infrastructure need:</p>
<p>CloudStore is implemented in C++ using standard system components such as STL, boost libraries, aio, log4cpp.</p>
<p>CloudStore is integrated with Hadoop and Hypertable. This enables applications bult on those systems to seamlessly use CloudStore as the underlying data store.</p>
<p>CloudStore is deployed on Solaris and Linux platforms for storing web log data, crawler data, etc.</p>
<p>CloudStore source code is released under the terms of the Apache License Version 2.0.</p></div>
<p>visit project home <a href="http://kosmosfs.sourceforge.net/" target="_blank">here<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://cloudpedia.org/cloudstore-kosmosfs-gfs-implementation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xfs error uuid.h not found</title>
		<link>http://cloudpedia.org/xfs-uuid-no-such-file-or-directory/</link>
		<comments>http://cloudpedia.org/xfs-uuid-no-such-file-or-directory/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 02:23:08 +0000</pubDate>
		<dc:creator>databank</dc:creator>
				<category><![CDATA[Dependencies]]></category>

		<guid isPermaLink="false">http://streamass.com/?p=20</guid>
		<description><![CDATA[while trying to compile KosmosFS (kfs) version 0.3 i got into this error:

/usr/include/xfs/linux.h:20:23: error: uuid/uuid.h: No such file or directory

the error disappeared after installing e2fsprogs-devel package, also make sure you also have installed xfsprogs and xfsprogs-devel
]]></description>
			<content:encoded><![CDATA[<p>while trying to compile KosmosFS (kfs) version 0.3 i got into this error:<br />
<code><br />
/usr/include/xfs/linux.h:20:23: error: uuid/uuid.h: No such file or directory<br />
</code><br />
the error disappeared after installing e2fsprogs-devel package, also make sure you also have installed xfsprogs and xfsprogs-devel</p>
]]></content:encoded>
			<wfw:commentRss>http://cloudpedia.org/xfs-uuid-no-such-file-or-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.887 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-09-04 22:06:50 -->
