Configuring XFCE4 and LightDM on a minimal Ubuntu installation
I recently installed Ubuntu on an older PC with 1GB of RAM and 80GB of hard drive space, so I wanted a lightweight desktop interface. I chose XFCE, since it is both lightweight and usable, and I have used it extensively. You can get Ubuntu pre-made with XFCE (xubuntu), but there are some disadvantages. The ISO is slightly too large to fit on a CD, and it comes with a lot of applications that I don’t need. Instead, I installed Ubuntu from a minimal CD and then used apt-get to install XFCE and the LightDM display manager. I learned that a couple of extra steps must be taken to get XFCE to play with lightdm. I got the error “can’t find session ubuntu”. Don’t bother changing the .dmrc file in your home directory; this file is overwritten every time lightdm starts! I configured lightdm to use an XFCE session with the command:
Preventing "soft" failures due to memory fragmentation in Linux
A previous post documented that a Linux server running a pre-2.6.24 kernel can fail to allocate large chunks of memory after its memory has been fragmented by a “thrashing” incident. In this post, I will point out some ways to prevent this problem.
Use a Newer Kernel
We have some servers running RHEL 5.9 with the kernel updated to 2.6.34.14. After a thrashing incident, these servers do not experience the same problem with allocating large blocks of memory. I think the fix is documented in the release notes for kernel 2.6.24. Section 2.4 talks about “anti-fragmentation patches” and includes a link to this article about Linux memory management, which links to this thorough documentation of the anti-fragmentation patches.(BTW, here is the full list of 2.6 kernel changelogs) My plan is to deploy RHEL 5.9 with the updated kernel to all the compute nodes in our cluster. However, this still doesn’t solve the problem of a user who requests some portion of the RAM on a node and then proceeds to consume more memory than requested. This is unfair to another user whose job is running on the same node.
Memory fragmentation degrades performance in Linux kernels < 2.6.24 (RHEL 5.4)
I have data from the STOKES High Performance Compute Cluster which definitively shows that kernel versions prior to 2.6.24 can suffer significant performance degradation due to memory fragmentation. I noticed the problem on servers running Red Hat Enterprise Linux (RHEL) 5.4 with kernel version 2.6.18-164.el5. This post will document my findings. The graphs were taken from our Ganglia monitoring system.
This node has 24GB of RAM. As long as processes do not request more than 23GB of RAM, the node operates normally. Processes can use 23GB of RAM all day long:
Insert an EPS file into an Asymptote Vector Graphics document
It’s surprisingly difficult to find out whether it is possible to include an image from an Encapsulated PostScript (EPS) file into an Asymptote vector graphics document. It turns out that it is easy, but difficult to find in the Asymptote docs (I finally found the answer, via Google, in the FAQ). It turns out that you use the label function to insert an image into an Asymptote document. Here is a snippet of code that I used to assemble a multi-part figure from several EPS documents:
How to fix your IEEE email alias so that it delivers all messages
I and others who use ___@ieee.org email addresses have a serious problem in which we occasionally fail to receive certain email messages that are sent our ieee.org addresses. This is a serious problem, and I’ve finally found a solution.
First, some background. Before the summer of 2013, the IEEE email address was simply an alias, which forwarded email to an actual email account. Some “spam” filtering was provided by IEEE, which could be modified or disabled through the IEEE web portal. In the summer of 2013, IEEE moved to Google Apps. Your ieee.org email now points to a Google Apps account. If you were previously using the alias service, the Google Apps account is configured to simply forward all email to the other account. However, the Google Apps account is also performing spam filtering on your email! When I finally logged in to my IEEE Google Apps account, I found several non-spam messages which had never been delivered because they were mistakenly sent to the spam folder in the Google Apps account (which I never check). Here is how to disable this dangerous and irritating “feature” that may be causing you to lose valuable email messages.
Using the MATLAB Distributed/Parallel Computing Toolbox without modifying your cluster
This post shows how I set up MATLAB to perform parallel calculations on a multi-core server which is part of an existing cluster that is managed using Torque and Moab. I did this without making any changes to the cluster submission system. The installation documentation for the MATLAB Parallel Computing Toolbox and Distributed Computing Server is poor. The instructions make a lot of assumptions that don’t fit into an existing “production” cluster environment. For example, they assume that a GUI is available to configure the cluster (this step is not required for my method!) Further, the instructions give the impression that MATLAB components must be “installed” on both the head node and compute nodes by an administrator. THIS IS FALSE! Ordinary users can run concurrent (multicore) MATLAB jobs without administrative privileges!
PHPUnit on CentOS 6
In my last post, I showed how to install PHPUnit with PHP 5.3 on a CentOS 5.9 system. Today, I will tackle the much simpler task of installing PHPUnit on a CentOS 6.4 system. The task is easier since PHP5.3 is standard on CentOS 6. On my system, PEAR was already installed. Steps: 1. Install the PHPUnit channel for PEAR:
yum install php-channel-phpunit2. Set channel to auto-discover:
Installing PHPUnit on CentOS 5.9
I recently had to install PHPUnit on a CentOS 5.9 system. This turned out to be a little more complicated than I had anticipated, so I wrote down the procedure in case I had to do it again. Here are my notes: 1. Install php53 packages, not php (php packages install the old 4.x series) 2. Install PEAR, PHP’s component management system. Here is the complete Yum log for a PEAR installation: Jun 03 22:49:56 Installed: php53-common-5.3.3-13.el5_8.x86_64 Jun 03 22:49:57 Installed: php53-cli-5.3.3-13.el5_8.x86_64 Jun 03 22:49:58 Installed: php53-5.3.3-13.el5_8.x86_64 Jun 03 22:51:24 Installed: php53-devel-5.3.3-13.el5_8.x86_64 Jun 03 22:51:25 Installed: 1:php-pear-1.4.9-8.el5.noarch 3. Install php53-xml: Jun 03 23:30:40 Installed: php53-xml-5.3.3-13.el5_8.x86_64 4. Install php54-xml and restart httpd to get the DOM extension for PHP 5. Install PHPUnit with PEAR:
Very helpful PDF manipulation tools on Linux
You can do some really cool stuff with Ghostscript on the command line on a computer running Linux or OS X. However, it’s hard to remember all that stuff when you don’t use it very often. I recently learned about a set of command-line PDF manipulation tools called PDFjam. If you are a geek like me, you probably already have pdfLaTeX installed. I can’t summarize the capabilities any better than the description on the PDFjam site: