Computer Upgrade to cure slow photo processing…

Lately, I’ve been going through hundreds of photos at a time for the new photography website. Funds are an issue these days, but I decided to order a small upgrade for my computer. While this isn’t photography related specifically, it fit into the whole process from camera to website and is a vital aspect. Slow tools mean more time wasted.

As you might know, I’ve been exclusively using the Ubuntu Linux PC operating system for a good deal of time now. It’s functional to the point that it can provide all that I need to get the job done. That being said, I still utilize some Windows programs such as Photoshop as I prefer them over any other options that are available. In my case I’m using my license of 32-bit Photoshop CS2 through WINE (Windows emulation).

My computer as it initially existed started out as a AMD Athlon dual core processor system with 2GB of ram and a hard drive or two. Excluding my first PC in the 1990s, I’ve always built my desktop computers from parts. A while back I upgraded the processor to an energy efficient 45 watt quad core chip, which is 300 mhz faster and two extra cores than my old dual core, yet uses 15 less watts (TDP)! I also added two more sticks of ram for a total of 4 giga-bytes and two disk drives.

The issues I was having recently dealt with going through large numbers of photos, which means RAM and disk speed are key. Also, I use the Noise Ninja plug-in and it was crashing when I increased Photoshop’s RAM usage beyond a certain percentage of system RAM. 4GB of system ram meant I could only have around 1.2 GB for Photoshop safely. Keep in mind I am using WINE (windows emulation) on Linux, so that might be partly to blame.

The new upgrade consisted of:
– Switch out my 4 sticks of DDR2 ram for 4 replacements, but use higher capacity totaling 8 gigabytes of RAM. My old ASUS M2A-VM motherboard is not able to use DDR3. While using DDR3 would have been optimal, I decided that quantity and cost were more important than the benefit of getting DDR3 RAM and a new board.
– Supplement my disk drives by buying two extras that matched two I already have and make a big fast 4 disk RAID10 array. These drives are Western Digital 640GB Blue drives that run at 7200 RPM. Managed to get them refurbished for $35 a piece. I know buying refurbished disk drives is generally not a good idea, but considering funds and my plan I had it works out fine.
– Buy a bigger case that can house everything comfortably.
– An extra SATA disk expansion card so I could use more drives. In this case a Highpoint Rocket 620A that doesn’t need to install drivers for Linux functionality. My boot drive and supplemental storage drive would be connected to this.

Here is the new setup:

After getting the system transfered from my old case and assembled, I decided to wipe out my old Ubuntu 10.04 install and start over with 10.10. I had backed up all of my information of course.

The disk drive setup is as follows:
1x 80GB Western Digital Raptor 10,000 RPM drive for the operating system. I’d eventually like to replace this with a more recent Raptor…
1x WD 750GB green drive for backup, might eventually put a license of Windows on it for games or whatever.
4x WD 640GB Blue drives attached to the motherboard controller. I had initially intended to use the motherboard’s RAID functionality, but “fake RAID” is not easy to setup in Linux. I eventually decided on Linux software RAID 10. If you are not familiar with RAID, it’s a way to link up drives together for added redundancy and/or speed. In my case the RAID 10 array is two mirrors that are striped together. I lose half the capacity, but I have the redundancy of a mirror setup (RAID 1) with the speed of striping (RAID 0).

Below are the Ubuntu Linux commands I needed to get it working. Software RAID in Ubuntu has been a big challenge for me, but I think I’ve eventually figured it out. Most articles on the Internet don’t go through the whole process or miss key steps. The biggest issue I’ve had was when I reboot, the array would be partially mounted / started or something, so I would need to un-start it and restart it (both requiring my password).

Here are steps to make a 4 disk RAID 10 Array on the sd* controller. In Linux drives like /dev/sd* are SATA drives, in my case the 4 ports from the motherboard controller.

*** used the disk utility to partition the 4 drives with standard MBR ***
Open a terminal window and run through the steps below:
sudo su
apt-get install mdadm
mdadm -v –create /dev/md0 –level=raid10 –raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
apt-get install xfsprogs
*** used the GUI disk utility to format with XFS file system ***
cd /etc/mdadm
*** Make sure the raid array is running and then do:
mdadm –detail –scan
*** copy the output from that should be like ARRAY …… ***
pico mdadm.conf
*** Add the below line:
ARRAY /dev/md0 level=raid10 num-devices=4 metadata=0.90 UUID=********:********:********:********
pico /etc/fstab
*** Add the below line:
/dev/md0 /media/raid auto defaults 0 0

I know, setup is pretty crazy in Linux. A reason Linux is still not such a widely used operating system, but I’ll admit I’m using things an average user would not. As for the file system, I decided to go with the XFS filesystem as it is said to be well tested and fast with large files.

I then installed all of the programs that I use. Reconfigured ones like Photoshop by copying data from my old WINE data folder into the new one. It was surprisingly easy with Linux to get programs reconfigured how I had them thanks to how things are setup (eg. NO REGISTRY and ALL of a person’s setting files are hosted in their home directory).

So now that that’s done I can get back to processing photos! Photoshop can see 2.7 GB of ram and I currently have it set to use 80% of that. I’ll eventually test it with 100% and see how that goes. The raid array is reading data from 160 – 350 megabytes a second according to a test I ran. Looking good so far!

This entry was posted in Article, Linux, Tips and Tricks and tagged , , , , , , . Bookmark the permalink.