<?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>Frederik&#039;s Blog</title>
	<atom:link href="http://artipc10.vub.ac.be/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://artipc10.vub.ac.be/wordpress</link>
	<description>Random thoughts of a Linux sysadmin</description>
	<lastBuildDate>Sat, 17 Dec 2011 19:05:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>New AI Lab site based on Drupal</title>
		<link>http://artipc10.vub.ac.be/wordpress/2011/12/17/new-ai-lab-site-based-on-drupal/</link>
		<comments>http://artipc10.vub.ac.be/wordpress/2011/12/17/new-ai-lab-site-based-on-drupal/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 19:05:49 +0000</pubDate>
		<dc:creator>Frederik</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[Artificial Intelligence Lab]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://artipc10.vub.ac.be/wordpress/?p=1200</guid>
		<description><![CDATA[The Artificial Intelligence lab has opened its new website a few days ago. The website is based on Drupal and a PostgreSQL database. Unfortunately, some modules (such as the biblio module) have some bugs when being used with a PostgreSQL datable instead of MySQL, but I hope that the last bugs will be fixed in [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://ai.vub.ac.be">Artificial Intelligence lab</a> has opened its new website a few days ago. The website is based on <a href="http://drupal.org/">Drupal</a> and a <a href="http://www.postgresql.org/">PostgreSQL</a> database. Unfortunately, some modules (such as the <a href="http://drupal.org/project/biblio">biblio</a> module) have some bugs when being used with a PostgreSQL datable instead of MySQL, but I hope that the last bugs will be fixed in the near future.</p>
]]></content:encoded>
			<wfw:commentRss>http://artipc10.vub.ac.be/wordpress/2011/12/17/new-ai-lab-site-based-on-drupal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MegaCLI: useful commands</title>
		<link>http://artipc10.vub.ac.be/wordpress/2011/09/12/megacli-useful-commands/</link>
		<comments>http://artipc10.vub.ac.be/wordpress/2011/09/12/megacli-useful-commands/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 14:01:00 +0000</pubDate>
		<dc:creator>Frederik</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[LSI]]></category>
		<category><![CDATA[RAID]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://artipc10.vub.ac.be/wordpress/?p=1091</guid>
		<description><![CDATA[Recently I installed a server with a Supermicro SMC2108 RAID adapter, which is actually a LSI MegaRAID SAS 9260. LSI created a command line utility called MegaCLI for Linux to manage this adapter. You can download it from their support pages. The downloaded archive contains an RPM file. I installed mc and rpm on Debian [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I installed a server with a Supermicro SMC2108 RAID adapter, which is actually a LSI MegaRAID SAS 9260. LSI created a command line utility called MegaCLI for Linux to manage this adapter. You can download it from their <a href="http://www.lsi.com/support/products/Pages/default.aspx">support pages</a>. The downloaded archive contains an RPM file. I installed mc and rpm on Debian with apt-get, and then extracted the MegaCli64 binary (for x86_64) to /usr/local/sbin, and the libsysfs.so.2.0.2 from the Lib_utils RPM to /opt/lsi/3rdpartylibs/x86_64/ (that&#8217;s the location where MegaCli64 looks for this library).</p>
<p>Here are some useful commands:</p>
<h1>View information about the RAID adapter</h1>
<p>For checking the firmware version, battery back-up unit presence, installed cache memory and the capabilities of the adapter:</p>
<p><code># MegaCli64 -AdpAllInfo -aAll</code></p>
<h1>View information about the battery backup-up unit state</h1>
<p><code># MegaCli64 -AdpBbuCmd -aAll</code></p>
<h1>View information about virtual disks</h1>
<p>Useful for checking RAID level, stripe size, cache policy and RAID state:</p>
<p><code># MegaCli64 -LDInfo -Lall -aALL</code></p>
<h1>View information about physical drives</h1>
<p># MegaCli64 -PDList -aALL</p>
<h1>Patrol read</h1>
<p>Patrol read is a feature which tries to discover disk error before it is too late and data is lost. By default it is done automatically (with a delay of 168 hours between different patrol reads) and will take up to 30% of IO resources.</p>
<p>To see information about the patrol read state and the delay between patrol read runs:<br />
<code># MegaCli64 -AdpPR -Info -aALL</code></p>
<p>To find out the current patrol read rate, execute<br />
<code># MegaCli64 -AdpGetProp PatrolReadRate -aALL</code></p>
<p>To reduce patrol read resource usage to 2% in order to minimize the performance impact:<br />
<code># MegaCli64 -AdpSetProp PatrolReadRate 2 -aALL</code></p>
<p>To disable automatic patrol read:<br />
<code># MegaCli64 -AdpPR -Dsbl -aALL</code></p>
<p>To start a manual patrol read scan:<br />
<code># MegaCli64 -AdpPR -Start -aALL</code></p>
<p>To stop a patrol read scan:<br />
<code># MegaCli64 -AdpPR -Stop -aALL</code></p>
<p>You could use the above commands to run patrol read in off-peak times.</p>
<h1>Migrate from one RAID level to another</h1>
<p>In this example, I migrate the virtual disk 0 from RAID level 6 to RAID 5, so that the disk space of one additional disk becomes available. The second command is used to make Linux detect the new size of the RAID disk.<br />
<code><br />
# /usr/local/sbin/MegaCli64 -LDRecon -Start -r5 -L0 -a0<br />
# echo 1 &gt; /sys/block/sda/device/rescan<br />
</code></p>
<h1>Create a new RAID 5 virtual disk from a set of new hard drives</h1>
<p>First we need to now the enclosure and slot number of the hard drives we want to use for the new RAID disk. You can find them out by the first command. Then I add a virtual disk using RAID level 5, followed by the list of drives I want to use, specified by enclosure:slot syntax.<br />
<code><br />
# MegaCli64 -PDList -aALL | egrep 'Adapter|Enclosure|Slot|Inquiry'<br />
# MegaCli64 -CfgLdAdd -r5'[252:5,252:6,252:7]' -a0<br />
</code></p>
<h1>View reconstruction progress</h1>
<p>When reconstructing a RAID array, you can check its progress with this command.<br />
<code># MegaCli64 -LDRecon ShowProg L0 -a0</code></p>
<p>(replace L0 by L1 for the second virtual disk, and so on)</p>
<h1>Configure write-cache to be disabled when battery is broken</h1>
<p><code># MegaCli64 -LDSetProp NoCachedBadBBU -LALL -aALL</code></p>
<h1>Change physical disk cache policy</h1>
<p>If your system is not connected to a UPS, you should disable the physical disk cache in order to prevent data loss.</p>
<p><code># MegaCli -LDGetProp -DskCache -LAll -aALL</code></p>
<p>To enable it (only do this if you have a UPS and redundant power supplies):</p>
<p><code># MegaCli -LDGetProp -DskCache -LAll -aALL</code></p>
<h1>More information</h1>
<p><a href="http://ftzdomino.blogspot.com/2009/03/some-useful-megacli-commands.html">http://ftzdomino.blogspot.com/2009/03/some-useful-megacli-commands.html</a><br />
<a href="https://twiki.cern.ch/twiki/bin/view/FIOgroup/DiskRefPerc">https://twiki.cern.ch/twiki/bin/view/FIOgroup/DiskRefPerc</a><br />
<a href="http://hwraid.le-vert.net/wiki/LSIMegaRAIDSAS">http://hwraid.le-vert.net/wiki/LSIMegaRAIDSAS</a><br />
<a href="http://kb.lsi.com/KnowledgebaseArticle16516.aspx">http://kb.lsi.com/KnowledgebaseArticle16516.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://artipc10.vub.ac.be/wordpress/2011/09/12/megacli-useful-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing grub-probe error: Couldn&#8217;t find PV, check your device.map.</title>
		<link>http://artipc10.vub.ac.be/wordpress/2011/09/09/fixing-grub-probe-error-couldnt-find-pv-check-your-device-map/</link>
		<comments>http://artipc10.vub.ac.be/wordpress/2011/09/09/fixing-grub-probe-error-couldnt-find-pv-check-your-device-map/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 08:47:25 +0000</pubDate>
		<dc:creator>Frederik</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Grub]]></category>

		<guid isPermaLink="false">http://artipc10.vub.ac.be/wordpress/?p=1085</guid>
		<description><![CDATA[Today I was getting this error when installing a new kernel on a server running Debian: /usr/sbin/grub-probe: error: Couldn't find PV pv2. Check your device.map. The error can be reproduce by running the update-grub command. The day before, a new RAID disk was added to this server, so I suspected this could be the cause. [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was getting this error when installing a new kernel on a server running Debian:</p>
<p><code>/usr/sbin/grub-probe: error: Couldn't find PV pv2. Check your device.map.</code></p>
<p>The error can be reproduce by running the update-grub command.</p>
<p>The day before, a new RAID disk was added to this server, so I suspected this could be the cause. The file /boot/grub/device.map contained a reference to the first RAID disk as (hd0) but did not contain a reference to the new RAID disk. I ran</p>
<p><code># ls -l /dev/disk/by-id/</code></p>
<p>to find out which SCSI ID referred to sdb (the new RAID disk), and then added the following line to device.map:</p>
<p><code><br />
(hd1)	/dev/disk/by-id/scsi-3600304800087c4f015fb4f2e4cc7a8e5<br />
</code></p>
<p>Now installing the new kernel works fine!</p>
]]></content:encoded>
			<wfw:commentRss>http://artipc10.vub.ac.be/wordpress/2011/09/09/fixing-grub-probe-error-couldnt-find-pv-check-your-device-map/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HP support: the end</title>
		<link>http://artipc10.vub.ac.be/wordpress/2011/07/17/hp-support-the-end/</link>
		<comments>http://artipc10.vub.ac.be/wordpress/2011/07/17/hp-support-the-end/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 17:38:23 +0000</pubDate>
		<dc:creator>Frederik</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[HP]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[warranty]]></category>

		<guid isPermaLink="false">http://artipc10.vub.ac.be/wordpress/?p=1073</guid>
		<description><![CDATA[So, how did the almost two month lasting struggle with HP&#8217;s support end (see part 1, part2)? On Wednesday evening, I received a mail that a 160 GB SSD was sent and we received it on Thursday morning. Also during the same week, we received a 500 GB 7200 RPM hard drive, which was meant [...]]]></description>
			<content:encoded><![CDATA[<p>So, how did the almost two month lasting struggle with HP&#8217;s support end (see <a href="http://artipc10.vub.ac.be/wordpress/2011/06/30/hp-worthless-customer-support/" title="HP: worthless customer support">part 1</a>,<a href="http://artipc10.vub.ac.be/wordpress/2011/07/11/hps-customer-support-part-2/" title="HP's customer support: part 2"> part2</a>)?</p>
<p>On Wednesday evening, I received a mail that a 160 GB SSD was sent and we received it on Thursday morning. Also during the same week, we received a 500 GB 7200 RPM hard drive, which was meant to be a temporary replacement until the 160 GB SSD was available again.</p>
<p>So things are finally solved for good. I am just surprised that the 160 GB SSD suddenly became available so quickly now (it was pretty useless to send a 500 GB disk if the SSD would arrive only a few days later). Is this just coincidence or did the complaining convince HP to finally make a real effort to find a replacement quickly? We will probably never know.</p>
]]></content:encoded>
			<wfw:commentRss>http://artipc10.vub.ac.be/wordpress/2011/07/17/hp-support-the-end/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tax-on-web with Debian and Firefox</title>
		<link>http://artipc10.vub.ac.be/wordpress/2011/07/12/tax-on-web-with-debian-and-firefox/</link>
		<comments>http://artipc10.vub.ac.be/wordpress/2011/07/12/tax-on-web-with-debian-and-firefox/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 17:37:25 +0000</pubDate>
		<dc:creator>Frederik</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Belgium]]></category>
		<category><![CDATA[CM]]></category>
		<category><![CDATA[eID]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[smartcard]]></category>
		<category><![CDATA[tax-on-web]]></category>

		<guid isPermaLink="false">http://artipc10.vub.ac.be/wordpress/?p=1053</guid>
		<description><![CDATA[In Belgium, we can fill out our tax form online on the Tax-on-web site using a smartcard reader and our electronic identity card. Unfortunately, things are rather complicated to set up, partly because the eID authentication is based on SSL renegotiation, a feature which is disabled by default in recent Firefox versions because it can [...]]]></description>
			<content:encoded><![CDATA[<p>In Belgium, we can fill out our tax form online on the <a href="http://www.taxonweb.be">Tax-on-web</a> site using a smartcard reader and our electronic identity card. Unfortunately, things are rather complicated to set up, partly because the eID authentication is based on <a href="http://it.slashdot.org/story/09/11/16/2327230/SSL-Renegotiation-Attack-Becomes-Real">SSL renegotiation</a>, a feature which is disabled by default in recent Firefox versions because it can be insecure. It is a bit disappointing that we have to rely on potentially vulnerable technologies to authenticate with our eID, but there is not much choice if you do not want to fill out the paper forms (or are too late, so that the electronic way is the only option).</p>
<p>First we need to make sure the smartcard reader works. I have a Dell Latitude E6400 laptop with a Broadcom smartcard reader which is supported by the ccid driver and required by the pcscd package in Debian. Note that the Broadcom 5880 as delivered by Dell in its Latitude laptops have a buggy firmware by default. You will need to update it by running some Windows tool. More information can be found on <a href="http://pcsclite.alioth.debian.org/ccid/shouldwork.html#0x0A5C0x5800">the ccid driver website</a> or on <a href="http://eid.belgium.be/nl/hulp_nodig/dell.jsp">the eID website</a>. Note that also Windows is suffering from this problem, so even if you use Windows, you might need to install this update.</p>
<p>If you are using the traditional USB smartcard reader distributed by the government, which is an ACS ACR38, you will need the acr38u driver.</p>
<p><code># apt-get install pcscd pcsc-tools libacr38u</code></p>
<p>To verify that the smartcard reader is working correctly, start up pcsc_scan and insert a smartcard (your eID or even a credit card is fine). Some diagnostic information about the card you inserted should appear automatically in your console. Press ctrl-C to exit pcsc_scan.</p>
<p>Now that the smartcard reader is working, we need to install the middleware and the Firefox plug-in:</p>
<p><code># apt-get install beidgui beid-mozilla-plugin</code></p>
<p>Start up Firefox and open the menu Tools &#8211; Preferences. Click on the Advanced section and load the Encryption tab. Now click on Security Devices and click on the Load button. Enter a name (for example beid), and enter the path to the beid pkcs11 module. On Debian Wheezy it is: /usr/lib/libbeidpkcs11.so.3.5.2 . Be sure to check the filename, it might be different if you are using another version. If you cannot find it, try to run in a terminal:</p>
<p><code># find / -name "*beidpkcs11*"</code></p>
<p>This command can also be used on Mac OS X, where the configuration procedure is actually similar to Linux.</p>
<p>To check whether the middleware is working correctly, you can load up beidgui and let it read your eID.</p>
<p>Now because tax-on-web uses SSL renegotiation, which is disabled by default in newer Firefox versions, we need to add an exception to Firefox&#8217; configuration. Type about:config in the URL bar, confirm that you will be careful, and look for the setting security.ssl.renego_unrestricted_hosts. Double click on it, and enter the value ccff02.minfin.fgov.be</p>
<p>Now we need to make Firefox identify itself with version 3.5, otherwise the tax-on-web site will still complain that your browser is unsupported. Install the <a href="https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/">User Agent Switcher add-on</a>, then in the tools menu, under User Agent Switcher, click on Edit user agents and then on New user agent. Type Firefox 3.5 as description and in the user agent replace Firefox/5.0 by Firefox/3.5 and in the app version 5.0 by 3.5. Now go to taxonweb.be, and then go to the Tools menu and change your user agent to Firefox 3.5. Now you should be able to identify yourself with our eID card. After using the tax-on-web site, do not forget to set your user agent back to the default user agent.</p>
<h2>Health insurance CM with eID</h2>
<p>The health insurance organisation CM also offers the possibility to log in to its website by the eID. To make it work, you use the same procedure as above, with one difference: the security.ssl.renego_unrestricted_hosts setting should also contain online.cm.be now. You can add multiple hosts by separating them by a comma, so you can set it to ccff02.minfin.fgov.be,online.cm.be</p>
]]></content:encoded>
			<wfw:commentRss>http://artipc10.vub.ac.be/wordpress/2011/07/12/tax-on-web-with-debian-and-firefox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HP&#039;s customer support: part 2</title>
		<link>http://artipc10.vub.ac.be/wordpress/2011/07/11/hps-customer-support-part-2/</link>
		<comments>http://artipc10.vub.ac.be/wordpress/2011/07/11/hps-customer-support-part-2/#comments</comments>
		<pubDate>Sun, 10 Jul 2011 22:06:30 +0000</pubDate>
		<dc:creator>Frederik</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[HP]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[warranty]]></category>

		<guid isPermaLink="false">http://artipc10.vub.ac.be/wordpress/?p=1038</guid>
		<description><![CDATA[Two weeks ago I wrote about my struggle with HP&#8217;s customer service. To summarize: HP was unable to replace a failed 160 GB SSD because it was not in stock and was unable to provide me any other alternative even after one month. In the end, a 250 GB SSD was promised, but it also [...]]]></description>
			<content:encoded><![CDATA[<p>Two weeks ago <a title="HP: worthless customer support" href="http://artipc10.vub.ac.be/wordpress/2011/06/30/hp-worthless-customer-support/">I wrote about my struggle with HP&#8217;s customer service</a>. To summarize: HP was unable to replace a failed 160 GB SSD because it was not in stock and was unable to provide me any other alternative even after one month. In the end, a 250 GB SSD was promised, but it also was not delivered.</p>
<ul>
<li>Friday morning, 1 July, I call back HP&#8217;s support service. It seems that they still need approval from the Customer Relations Team (CRT) Belgium to send me a 250 GB SSD instead of the 160 GB one but were unable to get an answer from CRT. The guy on the phone trieq different times to call CRT while I am waiting, but the call is always dropped after one minute. In the end, he can not do anything more than contact CRT by e-mail.</li>
<li>Friday afternoon, I receive an e-mail from CRT. CRT Belgium &amp; Luxembourg seems to be located in Sofia (Bulgaria), but they are answering me in Dutch. They approve the replacement of the 160 GB SSD by a 250 GB one and apologize for the long delay. Finally I start having some hope than things will be fixed now.</li>
<li>Friday evening, I take a look at the case log on HP&#8217;s support site. I feel big consternation when reading that a few hours afters CRT approved replacement by a 250 GB SSD, it appears that the 250 GB SSD is also unavailable! The case log mentions that I was informed about the delay but I had not had any contact with HP anymore after Friday morning, so the only way I discover the new delay, is by logging into HP&#8217;s site and reading the case log.</li>
<li>Monday morning, 4 July, I reply to CRT and to the support case that I do not accept the new delay and I demand an immediate solution. I receive a message in which they apologize for the delays and they inform me that people of superior departments are looking for a solution &#8220;with appropriate priority&#8221;. I also receive a message from our HP distributor asking whether this problem is still pending. I confirm them on Wednesday 6 July that this is still the case and they will transfer my complaint to HP Belgium.</li>
<li>I finally get a reaction from HP on Friday 8 July. They inform that they will send me a 500 GB 7200 RPM disk instead of the 160 GB SSD which is not deliverable. The disk will arrive on Monday 11 July. I answer them that I do not accept this as a final solution to the problem because a 7200 RPM disk is much slower and much more inexpensive than the 160 GB SSD this machine was bought with. In the afternoon I get the answer that the 500 GB 7200 RPM disk will be sent as a temporary replacement then, and that a 160 GB SSD will be ordered too and sent as soon as available.</li>
<li>As of Sunday 10 July, I have no indication that the 500 GB disk has been sent, so I am quite skeptical that the disk will be there on 11 July. I also have my doubts if and when I will finally receive an SSD.</li>
</ul>
<p>To be continued&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://artipc10.vub.ac.be/wordpress/2011/07/11/hps-customer-support-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HP: worthless customer support</title>
		<link>http://artipc10.vub.ac.be/wordpress/2011/06/30/hp-worthless-customer-support/</link>
		<comments>http://artipc10.vub.ac.be/wordpress/2011/06/30/hp-worthless-customer-support/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 17:30:01 +0000</pubDate>
		<dc:creator>Frederik</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[HP]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[warranty]]></category>

		<guid isPermaLink="false">http://artipc10.vub.ac.be/wordpress/?p=1027</guid>
		<description><![CDATA[One month ago, on the 25 May, I contacted HP support because a HP EliteBook 8540p (NU486AV) notebook had a broken 160 GB SSD disk (which is actually an Intel X25-M disk). The hard drive was not recognized anymore: both the BIOS and a Linux rescue cd could not find any connected hard drive. This [...]]]></description>
			<content:encoded><![CDATA[<p>One month ago, on the 25 May, I contacted HP support because a HP EliteBook 8540p (NU486AV) notebook had a broken 160 GB SSD disk (which is actually an Intel X25-M disk). The hard drive was not recognized anymore: both the BIOS and a Linux rescue cd could not find any connected hard drive. This machine was only a few months old and was bought with an 3 year HP eCare Pack for Next Business Day warranty support. Today, 30 June, HP still has not provided me any solution, even not a temporary one.</p>
<p>Here is a summary of what happened:</p>
<ul>
<li>When calling HP&#8217;s customer service on the phone on 25 May, I was promised to receive a replacement SSD the next day. The helpdesk guy explicitly checked whether the disk was not out of stock, and apparently it was not. In the case log this is written as: &#8220;Part is NOT on CRT TOP shortage list , Part can be ordered&#8221;.</li>
<li>The next day I get a mail stating: &#8220;Your ordered part is delayed, the delivery date is not yet known.&#8221;</li>
<li>I do not hear anything from customer support for more than a week. On 6 June, I ask for a status update via HP&#8217;s support website. The same day someone calls me back to inform me that the SSD is out of stock. He only offers me a 80 or 120 GB SSD disk as an alternative, which I obviously do not agree with: I want a disk of at least 160 GB.</li>
<li>I hear nothing from customer support for almost 3 weeks. On 20 June I contact them back via the support site, demanding an immediate solution. In the case log this triggers this  cryptic message: &#8220;PSL Status requested by email to PS&#8221;. I do not get any reply.</li>
<li>Later that same week I ask my local HP distributor whether they can do something to trigger a solution. I do not get any reply.</li>
<li>On 28 June I let HP customer support know via the support site that I am unhappy with their lack of initiative to provide a solution. I do not get any reply.</li>
<li>On 29 June I try the HP support chat function. Before entering the chat I have to select my country from a list and provide the serial number of the machine. The chat support guy first asks some details about my identity and of the machine. He excuses for the fact that I had to wait for more than a month for a solution and starts to look at the case log. After looking at the case log he suddenly says that HP chat support is only available for the UK and Ireland. Now why do they even let me enter the chat after I chose Belgium as a country then and why did he ask all details about the case?</li>
<li>I call customer support again by phone. While waiting on the phone, a recorded message recommends to try HP&#8217;s chat support!</li>
<li>The guy on the phone proposes to send me a 250 GB SSD disk. He still needs confirmation from the technical service whether this model is compatible with that laptop. If I did not get any message the same day that would mean that all was OK and then I would have the new SSD the next day.</li>
<li>The case log shows these entries after I called:<br />
<strong> Sub-case comment added: Jun 29, 2011 1:15:27 PM</strong><br />
again no answer at CRT<br />
consult PS<br />
<strong> Sub-case comment added: Jun 29, 2011 11:19:31 AM</strong><br />
tried to call CRT belgium &gt;&gt; no answer<br />
try again in 1 hour after lunch<br />
<strong> Sub-case comment added: Jun 29, 2011 10:50:52 AM</strong><br />
Cu called back<br />
595756-001  250GB solid-state drive (SSD) &#8211; SATA interface, 2.5-inch form factor<br />
This part IS supported for this notebook</li>
<li>On 30 June, I still do not have a new SSD and nobody contacted me. It seems the whole case is stuck and forgotten again and I will have to call back once again to get the whole process unstuck.</li>
</ul>
<p>So for the second time, things seem to be stuck at &#8220;waiting for PS&#8221;. I do not know who or what is this &#8220;PS&#8221;, but it is clear to me that it is not doing its job.</p>
<p>I can only conclude that HP&#8217;s customer support is just worthless. Cases are not followed up and the customer is never informed about the status. HP&#8217;s customer service takes no initiative to propose an alternative solution. Instead the customer repeatedly has to take the initiative to make any progress. And even then when customer support is reminded of the problem, they do not do anything to prevent it from getting stuck again. Chat support is totally useless even though it is recommended by HP.</p>
<p>The last few months, I have had contact with HP support 3 times for other small problems. Things were all fixed in a reasonable matter, although it always took more than 1 business day to get a replacement, which is a pity.  However, what is happening now is simply unacceptable.</p>
<p>Almost all systems I bought the last few years were HP systems. I will definitely re-evaluate this, because reasonable customer support is simply essential with systems used in production in business. I am very unhappy and dissatisfied with HP support so I will consider alternatives in the future.</p>
<p>What are other people&#8217;s experiences with HP customer support in Belgium/The Netherlands?</p>
]]></content:encoded>
			<wfw:commentRss>http://artipc10.vub.ac.be/wordpress/2011/06/30/hp-worthless-customer-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux performance improvements</title>
		<link>http://artipc10.vub.ac.be/wordpress/2011/05/27/linux-performance-improvements/</link>
		<comments>http://artipc10.vub.ac.be/wordpress/2011/05/27/linux-performance-improvements/#comments</comments>
		<pubDate>Fri, 27 May 2011 10:07:37 +0000</pubDate>
		<dc:creator>Frederik</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[CFS]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[KVM]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[scheduler]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://artipc10.vub.ac.be/wordpress/?p=973</guid>
		<description><![CDATA[Two years ago I wrote an article presenting some Linux performance improvements. These performance improvements are still valid, but it is time to talk about some new improvements available. As I am using Debian now, I will focus on that distribution, but you should be able to easily implement these things on other distributions too. [...]]]></description>
			<content:encoded><![CDATA[<p>Two years ago I wrote<a title="Speeding up my Linux system" href="http://artipc10.vub.ac.be/wordpress/2009/07/08/speeding-up-my-linux-system/"> an article presenting some Linux performance improvements</a>. These performance improvements are still valid, but it is time to talk about some new improvements available. As I am using Debian now, I will focus on that distribution, but you should be able to easily implement these things on other distributions too. Some of these improvements are best suited for desktop systems, other for server systems and some are useful for both.<span id="more-973"></span></p>
<h1>System update</h1>
<p>First of all, it is important that your system is up to date. Update it to Debian testing if you have not done that yet. It will give your, amongst others:</p>
<ul>
<li>Updated <a href="http://www.eglibc.org/cgi-bin/viewcvs.cgi/branches/eglibc-2_13/libc/NEWS?view=markup">eglibc 2.13</a>, which includes functions optimized for instruction sets SSE2, SSSE3&nbsp; and SSE4.2 provided by recent processors</li>
<li>Updated <a href="http://gcc.gnu.org/gcc-4.5/changes.html">GCC 4.5</a> (with <a href="http://gcc.gnu.org/gcc-4.6/changes.html">GCC 4.6</a> being on the way)</li>
<li>Updated graphics stack with Xserver 1.10, Mesa 7.10.2 and new X drivers and up to date pixman and cairo libraries, all improving performance</li>
<li>A recent kernel which brings improvements to process and disk schedulers, better hardware drivers, transparant hugepages (see further), scalability improvements to the EXT4 and XFS file systems and the Virtual File System layer, vhost-net for reduced network latency for KVM virtual machines and more. Debian testing has a 2.6.38 kernel, while 2.6.39 is available in unstable and will migrate to testing in the near future.</li>
<li>Parts of GNOME 2.32, such as Evolution which has improved start-up performance and important bug fixes (for example support of mailboxes larger than 2GB)</li>
<li>Iceweasel 4 is available in Debian Experimental and the upcoming 5 version, bringing even more performance improvements, is already available in an <a href="http://mozilla.debian.net">external repository</a>.</li>
</ul>
<h1>Transparant hugepages</h1>
<p>Transparant hugepages is a feature introduced in Linux 2.6.38 which can improve performance of applications. The processor has a translation lookaside buffer (TLB) which is a CPU cache used to speed up mapping of virtual memory addresses to physical memory addresses. This TLB has a limited size. By transparently combining several small 4 KB pages to larger &#8220;hugepages&#8221;,&nbsp; more pages can fit into the TLB. Transparent hugepages can be enabled on the fly, however it will only have effect on applications started after you have enabled this feature. For this reason, it is best to activate it right from the start by using a kernel boot parameter. With transparent_hugepage=always, the kernel will use transparant hugepages for any process. If you want to use transparent hugepages only for applications which explicitly indicate that they prefer hugepages, you can use transparent_hugepage=madvise. You have to add one of these boot parameters to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub in Debian, and run the update-grub command. At the next boot, you can take a look at the contents of the /sys/kernel/mm/transparent_hugepage file to verify that it is really enabled.</p>
<p>More information:</p>
<ul>
<li><a href="https://lwn.net/Articles/423584/">https://lwn.net/Articles/423584/</a></li>
<li><a href="https://lwn.net/Articles/423592/">https://lwn.net/Articles/423592/</a></li>
</ul>
<h1>Tuning ondemand cpufreq governor</h1>
<p>The ondemand cpufreq governor (which should be used on most systems by default; make sure you have Debbian&#8217;s cpufrequtils package installed) tends to switch back to slower CPU frequency speeds a bit too early in some cases, hurting performance. By setting the sampling_down_factor to a value higher than 1, you can prevent it from reducing the clock speed too quickly.</p>
<p>I have added this to my /etc/rc.local script:<br />
<code><br />
if test -f /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor<br />
then<br />
&nbsp;&nbsp;&nbsp;&nbsp;echo 10 &gt; /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor<br />
fi</code></p>
<p>On server systems, I even use 100 instead of 10.</p>
<p>More information:</p>
<ul>
<li><a href="https://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3f78a9f7fcee0e9b44a15f39ac382664e301fad5">https://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3f78a9f7fcee0e9b44a15f39ac382664e301fad5</a></li>
<li><a href="https://forums.gentoo.org/viewtopic-t-877539.html?sid=bb3b956d1960647972fc73b3458ff6c8">https://forums.gentoo.org/viewtopic-t-877539.html?sid=bb3b956d1960647972fc73b3458ff6c8</a></li>
</ul>
<h1>VM dirty ratio</h1>
<p>By default the VM dirty ratio is set to 20% and the background dirty ratio is set to 10%. This means that when 10% of memory is filled with dirty pages (cached data which has to be flushed to disk), the kernel will start writing out the data to disk into the background, without interrupting processes. If the amount of dirty pages raises up to 20%, processes will be forced to write out data to disk and cannot continue other work before they have done so.</p>
<p>By increasing these values, more data will be cached into memory, and data will be written out in larger I/O streams. This can be a good thing on servers with fast storage and lots of memory.</p>
<p>To increase these values, create a file /etc/sysctl.d/dirty_ratio.conf with these contents:<br />
<code><br />
vm.dirty_ratio = 40<br />
vm.dirty_background_ratio = 15</code></p>
<p>Then with the command &lt;code&gt;sysctl -p /etc/sysctl.d/dirty_ratio.conf&lt;/code&gt; you make these settings become in effect immediately.</p>
<p>On desktop systems, the default dirty_ratio of 20 and dirty_background_ratio of 10 should be reasonable. You do not want a too high dirty_ratio on desktop systems, because applications will stall for too long if they have to write out all these dirty pages at once.</p>
<p>More information:</p>
<ul>
<li><a href="http://www.kernel.org/doc/Documentation/sysctl/vm.txt">http://www.kernel.org/doc/Documentation/sysctl/vm.txt</a></li>
<li><a href="http://www.scribd.com/doc/46600383/RHEL-Perf-Tuning">http://www.scribd.com/doc/46600383/RHEL-Perf-Tuning</a></li>
</ul>
<h1>CFS scheduler tuning</h1>
<p>CFS (Competely Fair Scheduler) is the name of the Linux process scheduler. By default it is tuned for desktop workloads. For server systems where throughput is more important than latency, <a href="http://git.fedorahosted.org/git/?p=tuned.git;a=blob_plain;f=tune-profiles/throughput-performance/sysctl.ktune;hb=HEAD">Red Hat&#8217;s tuned package</a> proposes these sysctl settings for CFS for servers:<code><br />
kernel.sched_min_granularity_ns = 10000000<br />
kernel.sched_wakeup_granularity_ns = 15000000</code></p>
<p>More information:</p>
<ul>
<li><a href="http://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt">http://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt</a></li>
</ul>
<h1>ulatencyd</h1>
<p>ulatencyd is a daemon which uses cgroups to give hints to the  kernel&#8217;s process scheduler CFS to improve desktop latency and make  applications feel more responsive. It will prevent individual applications from hogging the system, slowing down other applications .  This is somewhat simpler than the much hyped (but controversial) <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Completely_Fair_Scheduler#Fairer_algorithms">autogroup kernel patch</a> but this solution is much more extensive in that ulatencyd knows  different applications and desktops and knows how to configure the  scheduler to improve responsiveness.</p>
<p>On Debian, you install the ulatencyd package and start the ulatencyd  init script. The ulatency package contains the ulatency client too,  which shows you the cgroups ulatencyd has set up.</p>
<p>In my opinion, ulatencyd is great for desktop systems but I do not recommend to install this on server systems.</p>
<p>More information:</p>
<ul>
<li><a href="https://github.com/poelzi/ulatencyd/wiki">https://github.com/poelzi/ulatencyd/wiki</a></li>
</ul>
<h1>KVM performance improvements</h1>
<p>When using Linux guests in kvm virtual machines, it is important to configure the network interface and hard drive as <a href="http://wiki.libvirt.org/page/Virtio">virtio</a> devices in order to experience the best performance. KVM also benefits from transparant hugepages: be sure to enable them both in the host as in the guest machine.</p>
<p>More information:</p>
<ul>
<li><a href="http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/topic/liaav/LPC/LPCKVMSSPV2.1.pdf">http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/topic/liaav/LPC/LPCKVMSSPV2.1.pdf</a></li>
<li><a href="http://www.linux-kvm.org/page/Tuning_KVM">http://www.linux-kvm.org/page/Tuning_KVM</a></li>
</ul>
<h2>VHostNet</h2>
<p>VHostNet improves network latency and throughput of KVM guests. To enable it, you need to load the vhost_net kernel module in your host system. In Debian you can add vhost_net to /etc/modules to load it automatically when booting the system. Then if you use libvirt to manage your virtual machines, VHostNet will be used automatically when starting virtual machines. If you start qemu-kvm by hand, you will need to add the vhost=on option to the netdev device.</p>
<p>More information:</p>
<ul>
<li><a href="http://www.linux-kvm.org/page/VhostNet">http://www.linux-kvm.org/page/VhostNet</a></li>
</ul>
<h2>Raw devices, disable cache and choose deadline I/O scheduler</h2>
<p>For best performance, raw devices are recommended instead of qcow2 or other image files. In libvirt/virt-manager I have defined a storage pool on an LVM volume group, and let virt-install create logical volumes on it containing raw images.</p>
<p>It is recommended to disable I/O caching in KVM because it reduces data copies and bus traffic. In the libvirt XML file for your virtual machine, set the cache=&#8217;none&#8217; attribute for the driver tag for the disk device. You can also use virt-manager to make this change: look for the cache mode under the advanced options for the disk.</p>
<p>Benchmarks seems to indicate that it is best to to use the deadline I/O scheduler instead of the default CFQ scheduler.&nbsp; Using deadline in the guest seems also beneficial.&nbsp; To make deadline the default scheduler, edit /etc/default/grub.conf and add elevator=deadline to the<cite> </cite>GRUB_CMDLINE_LINUX_DEFAULT variable.</p>
<p>More information:</p>
<ul>
<li><a href="http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/topic/liaat/liaatbpioschedulers.htm">http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/topic/liaat/liaatbpioschedulers.htm</a></li>
</ul>
<h2>Native AIO</h2>
<p>Native AIO offers better performance than the thread based AIO in KVM. However, it should only be enabled on raw images, because it can lead to disk corruption in some cases otherwise. This problem is supposed to be fixed in recent kernels according to information I got on the <a href="irc://irc.freenode.org/#kvm">#kvm IRC channel</a>, but better be safe than sorry.</p>
<p>To enable this, add the parameter io=&#8217;native&#8217; to the driver tag of the disk in the XML file for the virtual machine in libvirt.</p>
<ul>
<li><a href="https://access.redhat.com/kb/docs/DOC-40644">https://access.redhat.com/kb/docs/DOC-40644</a></li>
</ul>
<h2>CPU features</h2>
<p>By default, KVM only provides a common limited set of CPU instructions implemented by different CPU&#8217;s from Intel and AMD. This is needed to permit live migration of a virtual machine to hardware with a CPU which does not implement all instructions available in the original system. If you do not plan on doing doing that, you can enable all instruction sets of your host CPU in the virtual machines, so that your virtual machine can make use of all advanced features of your CPU (for example SSE3 and others). The easiest way to do this, is by using virt-manager. Click on &#8220;Copy host configuration&#8221; in the Processor &#8211; Configuration settings of the virtual machine. The next time you start up the virtual machine, it will have access to all extended instruction sets of your CPU.</p>
<h2>KSM</h2>
<p>Kernel Samepage Merging is a kernel feature which merges identical pages in memory. If you are using different virtual machines, with the same operating system and applications running in it, lots of memory pages will actually be identical. KSM will save memory by merging the identical pages.</p>
<p>To enable this on Debian, I have put this in my /etc/rc.local script:<br />
<code><br />
echo 1 &gt; /sys/kernel/mm/ksm/run<br />
echo 200 &gt; /sys/kernel/mm/ksm/sleep_millisecs<br />
</code></p>
<p>The last line is optional. It raises the interval during two different memory scans, so that the CPU is not too busy scanning for duplicate memory pages all the time.</p>
<p>More information:</p>
<ul>
<li><a href="http://www.linux-kvm.org/page/KSM">http://www.linux-kvm.org/page/KSM</a></li>
</ul>
<ul>
<li><a href="http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=/liaat/liaatbpioschedulers.htm">http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=/liaat/liaatbpioschedulers.htm</a></li>
</ul>
<h1>zram disk</h1>
<p>If you do not have much RAM available in your system, it is useful to compress part of the data in memory. This can be done by using a zram disk, which is a ram disk on which all data is transparently compressed. On this zram disk you create a swap partition which you give a higher priority than the normal on disk swap space. Once the available RAM (total RAM &#8211; RAM reserved for zram disk) is used, data will be swapped out to the zram disk, which is much faster than swap space on a rotating hard disk. This way, more data fits into the RAM.</p>
<p>On my 1 GB netbook system which runs a full GNOME desktop, I have reserved 512 MB for the zram disk. To do so, I added the following in /etc/rc.local:</p>
<p><code>echo $((512*1024*1024)) &gt; /sys/block/zram0/disksize<br />
mkswap /dev/zram0<br />
swapon -p 60 /dev/zram0</code></p>
<p>Of course, a better solution is to add RAM to your system, especially on server systems.</p>
]]></content:encoded>
			<wfw:commentRss>http://artipc10.vub.ac.be/wordpress/2011/05/27/linux-performance-improvements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GNOME Shell moving forward</title>
		<link>http://artipc10.vub.ac.be/wordpress/2011/02/23/gnome-shell-moving-forward/</link>
		<comments>http://artipc10.vub.ac.be/wordpress/2011/02/23/gnome-shell-moving-forward/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 22:47:14 +0000</pubDate>
		<dc:creator>Frederik</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[GNOME 3]]></category>
		<category><![CDATA[gnome-shell]]></category>

		<guid isPermaLink="false">http://artipc10.vub.ac.be/wordpress/?p=962</guid>
		<description><![CDATA[Some news about GNOME 3 and GNOME Shell: The minimize and maximize window decoration buttons are now removed. It is estimated that these buttons are not useful actually, and users should be using Alt-Tab, the dock or different workspaces to switch between different applications, and maximize windows by double clicking on the title bar. As [...]]]></description>
			<content:encoded><![CDATA[<p>Some news about GNOME 3 and GNOME Shell:</p>
<ul>
<li><a href="http://www.mail-archive.com/gnome-shell-list@gnome.org/msg02527.html">The minimize and maximize window decoration buttons are now removed</a>. It is estimated that these buttons are not useful actually, and users should be using Alt-Tab, the dock or different workspaces to switch between different applications, and maximize windows by double clicking on the title bar. As this will also make the desktop more difficult to access, I guess this also means that there are no plans to re-implement desktop icons.</li>
<li><a href="https://lwn.net/Articles/429515/">The problem with the ellipsis of long application names has been fixed by enlarging the icons in the application browser.</a></li>
<li>On the #gnome-shell IRC channel there was a discussion earlier today about the implementation of shutdown in GNOME Shell. Several developers were in favour of just suspending to RAM by default and not showing a real shut down button by default. After 30 minutes, the system would wake up again and suspend to disk. Several developers did not seem to care about the risks of waking up a laptop while it&#8217;s being transported in a bag. Or about the fact suspend is not working properly on all systems.</li>
</ul>
<p>I am extremely disappointed by these three things. When writing my previous GNOME Shell article, I still had some hopes that things would improve for the better, but I am giving up all hope: the GNOME Shell in GNOME 3.0 will definitely not be something I will like to use. I think it is also unacceptable that such important, drastic changes are made <a href="http://live.gnome.org/TwoPointNinetyone/">just before or even after the UI freeze.</a> I have the feeling that GNOME Shell is purely the work of a few developers and designers who made some radical changes without any feedback or testing by real end users. The user community seems to be completely forgotten in the GNOME 3.0 development process. As only a few distributions are shipping live CDs, which are often rather unstable and rarely have a completely up to date GNOME Shell, only a very small amount of users is actually able to test and give feedback.</p>
<p>What will I do now? Skip GNOME 3.0 and hope that GNOME 3.2 will be better, once developers have taken into account users reactions? But that means that I will not benefit for more than another 6 months of any improvements to many of my preferred applications. Or use GNOME 3.0 with the old GNOME Panels (but will that give back my desktop icons)? Or shall I finally switch to KDE? Time will tell.</p>
<p>Update: the changes I described here can be seen in screenshots on <a href="http://www.webupd8.org/2011/02/gnome-shell-29190-released-screenshots.html">Webupd8</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://artipc10.vub.ac.be/wordpress/2011/02/23/gnome-shell-moving-forward/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Improving Mediawiki performance</title>
		<link>http://artipc10.vub.ac.be/wordpress/2011/02/18/improving-mediawiki-performance/</link>
		<comments>http://artipc10.vub.ac.be/wordpress/2011/02/18/improving-mediawiki-performance/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 20:31:39 +0000</pubDate>
		<dc:creator>Frederik</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[APC]]></category>
		<category><![CDATA[Mediawiki]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://artipc10.vub.ac.be/wordpress/?p=942</guid>
		<description><![CDATA[Now that I am on the subject of improving performance, I configured some performance improvements for a Mediawiki installation here: Make sure you run the latest Mediawiki version. Mediawiki 1.16 introduced a new localisation caching system which is supposed to improve performance, so you definitely want this to get the best performance. Create a directory [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I am on the subject of improving performance, I configured some performance improvements for a Mediawiki installation here:</p>
<ul>
<li>Make sure you run the latest Mediawiki version. Mediawiki 1.16 introduced a new localisation caching system which is supposed to improve performance, so you definitely want this to get the best performance.</li>
<li>Create a directory where Mediawiki can store the localisation cache (make sure it is writable by your web server). By preference store it on a tmpfs (at least if you are sure it will be big enough to store the cache), and configure it in LocalSettings.php:<br />
<code>$wgCacheDirectory = "/tmp/mediawiki";</code><br />
Iif /tmp is on a tmpfs, you might add creation of this directory with the right permissions to /etc/rc.local, so that it still exists after a reboot.</li>
<li>Enable <a href="http://www.mediawiki.org/wiki/Manual:File_cache">file caching</a> in Mediawiki&#8217;s LocalSettings.php:<br />
<code>$wgFileCacheDirectory = "{$wgCacheDirectory}/html";<br />
$wgUseFileCache = true;<br />
$wgShowIPinHeader = false;<br />
$wgUseGzip = true;</code></li>
<li>Make sure you have installed some <a href="http://www.mediawiki.org/wiki/Manual:Cache">PHP accelerator for caching</a>. I have APC installed and configured it in Mediawiki&#8217;s LocalSettings.php:<br />
<code>$wgMainCacheType = CACHE_ACCEL;</code></li>
</ul>
<p>Here is a benchmark before implementing the above configuration (with CACHE_NONE, but APC still installed):</p>
<p><code>$ ab -kt 30 http://site/wiki/index.php/Page<br />
This is ApacheBench, Version 2.3 &lt; $Revision: 655654 $&gt;<br />
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br />
Licensed to The Apache Software Foundation, http://www.apache.org/</code></p>
<p><code>Benchmarking site (be patient)<br />
Finished 255 requests</code></p>
<p><code> </code></p>
<p><code>Server Software:        Apache/2.2.16<br />
Server Hostname:        site<br />
Server Port:            80</code></p>
<p><code>Document Path: /wiki/index.php/Page<br />
Document Length:        12750 bytes</code></p>
<p><code> </code></p>
<p><code>Concurrency Level:      1<br />
Time taken for tests:   30.084 seconds<br />
Complete requests:      255<br />
Failed requests:        0<br />
Write errors:           0<br />
Keep-Alive requests:    0<br />
Total transferred:      3344070 bytes<br />
HTML transferred:       3251250 bytes<br />
Requests per second:    8.48 [#/sec] (mean)<br />
Time per request:       117.978 [ms] (mean)<br />
Time per request:       117.978 [ms] (mean, across all concurrent requests)<br />
Transfer rate:          108.55 [Kbytes/sec] received</p>
<p>Connection Times (ms)<br />
min  mean[+/-sd] median   max<br />
Connect:        3    6   2.8      7      21<br />
Processing:    88  112  11.1    112     163<br />
Waiting:       66   90   9.1     89     125<br />
Total:         95  118  11.9    118     170</p>
<p></code></p>
<p><code>Percentage of the requests served within a certain time (ms)<br />
50%    118<br />
66%    122<br />
75%    125<br />
80%    127<br />
90%    132<br />
95%    138<br />
98%    145<br />
99%    156<br />
100%    170 (longest request)</code></p>
<p>And here a benchmark after implementing the changes:</p>
<p><code>ab -kt 30 http://site/wiki/index.php/Page<br />
This is ApacheBench, Version 2.3 &lt; $Revision: 655654 $&gt;<br />
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br />
Licensed to The Apache Software Foundation, http://www.apache.org/</code></p>
<p><code>Benchmarking site (be patient)<br />
Finished 649 requests</code></p>
<p><code> </code></p>
<p><code>Server Software:        Apache/2.2.16<br />
Server Hostname:        site<br />
Server Port:            80</code></p>
<p><code>Document Path: /wiki/index.php/Page<br />
Document Length:        12792 bytes</code></p>
<p><code> </code></p>
<p><code>Concurrency Level:      1<br />
Time taken for tests:   30.015 seconds<br />
Complete requests:      649<br />
Failed requests:        0<br />
Write errors:           0<br />
Keep-Alive requests:    0<br />
Total transferred:      8538244 bytes<br />
HTML transferred:       8302008 bytes<br />
Requests per second:    21.62 [#/sec] (mean)<br />
Time per request:       46.248 [ms] (mean)<br />
Time per request:       46.248 [ms] (mean, across all concurrent requests)<br />
Transfer rate:          277.80 [Kbytes/sec] received</p>
<p>Connection Times (ms)<br />
min  mean[+/-sd] median   max<br />
Connect:        3    9   3.7      8      29<br />
Processing:    23   37   6.0     37      62<br />
Waiting:       13   23   4.9     24      41<br />
Total:         28   46   7.8     45      82</p>
<p></code></p>
<p><code>Percentage of the requests served within a certain time (ms)<br />
50%     45<br />
66%     47<br />
75%     49<br />
80%     50<br />
90%     56<br />
95%     62<br />
98%     68<br />
99%     73<br />
100%     82 (longest request)</code></p>
<p>So Mediawiki can deal with more than 2,5 times as much requests now.</p>
<p><a href="http://blogs.testbit.eu/timj/2011/02/09/using-mod_disk_cache-with-mediawiki/">Some people use Apache&#8217;s mod_disk_cache to cache Mediawiki pages</a>, but I prefer Mediawiki&#8217;s own caching system because it is more standard and does not require patching Mediawiki, even if it might not get as much benefit as a real proxy or mod_disk_cache.</p>
]]></content:encoded>
			<wfw:commentRss>http://artipc10.vub.ac.be/wordpress/2011/02/18/improving-mediawiki-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

