Can you really have too much swap?

I received a request from an application team to increase the amount of swap on a Linux server I was building for them.  The reason was that their Oracle client install was failing, complaining about not enough swap space.

As the swap was set to 1/2 RAM, I increased it to 1xRAM + 1GB.  Way, way back in the olden days, I used to see recommendations to set swap to 2xRAM, but that was back when RAM was < 1GB.

Later, another member of that application team expressed concern over the increased swap space.  He said for their app, they preferred swap size to be only 1/2 RAM or a little more.  Otherwise, he worried that there would be issues in the long run.

I had never run across any issues due to having excessive swap configured on a server; neirhter had the co-workers I discussed this with.  So of course I went searching for more info, and the consensus seemed to indicate that too much swap would not cause problems, nor increase the likelihood that swapping would occur.

Here are a couple of links to sites that have a good discussion of Linux memory management:

I’d love to hear more about this, though – is it really possible, in some situations, to cause problems by configuring a lot of swap space?  What would be the red flags?  What would you look for in the output of tools such as vmstat or sar, that would prove that too much swap space had caused a performance problem?

Adding Google AdSense to my site

Pretty soon, ads by Google will start showing up here and there on my site.  I signed up for Google AdSense, hoping to eventually bring in enough revenue to cover my web hosting expenses.

As Google requires, I’ve also added a Privacy Policy to the site.

The following site has excellent instructions for easily adding the AdSense code block to your WordPress blog:

iPhone Jailbreak Aftermath

Yesterday, I fixed a problem where my PC didn’t recognize my iPhone as a camera or a hard drive. I could still synchronize with iTunes, but wasn’t able to transfer any photos from my phone to my PC. Every time I connected my phone to the PC, there would be an error message stating that installing the device driver had failed.

I had tried all kinds of things to fix it – grasping at straws, really, since Google hadn’t turned up anything for me yet. Updated iTunes, deleted and reinstalled iTunes. I had thought that I might just copy over the device drivers from another PC, but all I had available were running XP; my PC runs Vista. There looked to be no similarities in the list of iPhone drivers across the OS’s.

Finally, I decided to see if I could download iPhone device drivers for Vista from somewhere. Searching on “digital still camera iphone vista driver”, turned up this link, which is where I found the answer.

The “libusb-win32” file was present on my PC. This blocks the PC from recognizing the iPhone as a storage device.  The fix was to go to Control Panel, Programs and Features, and then uninstalling “libusb-win32.” Once the program was uninstalled, my PC immediately detected my phone, connected via USB, installed the correct drivers, and popped open a window asking if I wanted to transfer photos to PC.

Apparently, I had installed libusb-win32 back in September. Googling to find out what the program did, showed it was involved in iRecovery and jailbreaking. Now I understood – in September I jailbroke a couple of iPhones prior to selling them on eBay. libusb-win32 must have been installed when I downloaded the jailbreak utility to my PC.

Solaris boot-archive

A couple weeks ago, I was asked to help with a problem with an out-of-sync boot-archive on a SPARC Solaris server.  The problem occurred after EMC Powerpath software had been upgraded, and the server was rebooted.  As it had been quite a while since I’d worked on Sun Solaris platforms, I wasn’t any help – I’d never heard of a boot-archive in Solaris before.

So since then, I’ve been reading up on it and here are some of the things I found out:

The Solaris boot-archive is a file on disk containing an image of the root filesystem.  It is used during the early stages of the boot process.  The boot (1M) manpage describes this process in detail.  The boot-archive file is meant to remain synchronized with the real root filesystem.  If an update is made to a kernel file, driver, module, or driver config file which is part of the boot archive, then the boot archive needs to be updated.  This is done automatically as part of reboot (1M) and shutdown (1M).

If, when a machine boots, the boot-archive is somehow inconsistent with the real root file system, you get the error message we encountered with our server, and are strongly encouraged to reboot in failsafe mode.  But in our specific case, there is a known issue with the EMC Powerpath upgrade, where the emcp.conf file is showing up as unsynchronized in the boot-archive, and it isn’t necessary to boot failsafe.

In our situation, it is sufficient to simply continue booting and then clear the service, if the only inconsistency is the emcp.conf file, like this:

#  svcadm  clear  system/boot-archive

I’m wondering if the whole scenario couldn’t be avoided by just updating the boot-archive after EMC Powerpath is upgraded, and before reboot.

#  bootadm  update-archive  -n

(reveals inconsistencies in the boot archive)

#  bootadm  update-archive  -v

(synchronizes the boot archive with the real root filesystem)

#  reboot

That seems the most straightforward to me, and this is what I’m going to try if I ever get involved in a Powerpath upgrade again.