Mostly about my amusement

Year: 2007 (page 16 of 18)

Easy server upgrade

I gave up on running my blog on a VPS. It was just too problematic and I got tired of trying to get it working well. So I opted to put the blog on my old basement server.

My old basement server was a Dell PII 450 MHz machine with 256 MB of RAM. It was a good example of how Linux can extend the life of your hardware. It works well as a Internet gateway and mail relay but for serving dynamic web page pages it was a little slow.

When I purchased my XPS 700 monster I shelved the old PC. That one was a P4 3.2 GHz with 1 GB of RAM. For running Linux it’s great.

At first I was bent on getting a fresh install but I ended removing the old hard drive and putting it into the new server. The worst that I had to deal with is the network interfaces were named wrong (one was coming up eth2).

After a little searching I found the file

/etc/udev/rules.d/30-net_persistent_names.rules

and fixed the names from

SUBSYSTEM==”net”, ACTION==”add”, SYSFS{address}==”00:0c:5a:b4:b2:d2″, IMPORT=”/lib/udev/rename_netiface %k eth2″

to

SUBSYSTEM==”net”, ACTION==”add”, SYSFS{address}==”00:0c:5a:b4:b2:d2″, IMPORT=”/lib/udev/rename_netiface %k eth0

The udevd daemon is great but I hardly ever looked at it.

Page generation on WordPress went from 1.7 seconds on the old server to 0.234 seconds on the new one. That’s not too bad an improvement and all it cost me was a server that I was using as a door stop.

Downloading opensuse 10.1

Speed graphI downloaded the Opensuse 10.1 remastered DVD iso. Rather than use bittorrent I located a fast mirror and downloaded the whole thing.

Click on the thumbnail for the graph, it was down a max speed of 17.16 Mbits/sec. That’s insane and I had no idea that Optimum could go that fast.

I’m planning on replacing the basement PII 450 MHz with a 3.2 GHz P4.

XPS 700 Vista re-install

I upgraded from XP to Vista. Since I purchased my XPS 700 as soon as it came out I did not qualify for Dell’s free Vista upgrade.

My XP install had a ton of junk left on from installing apps, removing them, games I did not play etc. So I figured that I’d just boot off of the Vista upgrade DVD and do a clean install.

The idea was to

  1. Backup the data to an external USB HD
  2. Wipe out the hardrive
  3. Clean install without putting in a product key (Vista lets you run unactivated for 30 days)
  4. Boot, and install the upgrade using the upgrade activation key

Sigh. Well I did backup my data and using the Vista clean install to wipe the hard drive worked perfectly.

Vista would not accept that my hard drive as a valid place to install on. Even putting the drivers from Dell and nvidia on a CD would not work.

I ended up having my two drives separated, installing an unactivated Vista, and downloading and installing vLite.

The vLite application lets you create an install DVD image with the update drivers. It even lets you burn the DVD directly from the application. Until I got the image booted I was in a pretty foul mood since the update XPS BIOS on my machine would no longer install XP Media Center 2005 that came with my XPS 700.

Once that was done I went into the BIOS and re-established the joined drives and started from scratch.

Now steps 3 and 4 worked and I’m keeping the DVD I burned. Using vLite saved me from making a Dell support call that would have ended really badly.

eAccelerator for Opensuse 10.0

Updated: I bumped the version from 0.9.5 to 0.9.5.1.

The source RPM for 0.9.5.1 can be found here.

The 32 bit compiled version can be found here.

I no longer have access to a x86_64 opensuse installation but running this command:

rpmbuild -bb php5-eaccelerator-0.9.5.1-1.src.rpm

should create them on your system.

——————————-

I wanted to add APC or even XCache but found that my PHP version 5.0.4 was not supported. Changing to 5.2.1 did not really seem to work well for me and some plugins did not work. So I went back to the default updated opensuse 10.0 packages.

The PHP cache software eaccelerator 0.9.5 does work with php 5.0.4. In fact sometimes it speeds up php by almost half.

The opensuse 10.0 source rpm I put together can be found here. I built the .x86_64.rpm and put a copy here. The src.rpm will figure out where to put the extension so if you do a rpmbuild on the src.rpm on another opensuse which has php5 installed it should work.

The spec file has some build requirements, most of which can be commented out I am sure. I built it with

configure –enable-eaccelerator=shared –with-php-config=/usr/bin/php-config

I put the eaccelerator.cache_dir in /var/spool/eaccelerator and made that directory part of the package.

Inside the footer of my theme I put

<!– <?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds. –>

The timer shows that pages were taking 1.3 seconds or more to generate, sometimes longer.

With eaccelerator I get 0.628 seconds or so.

I also keep

define( ‘ENABLE_CACHE’, true );

in my wp-config.php right below the line that reads define (‘WPLANG’, ”);.

This caches database information such as categories etc. I turned it off and the frequent hitting of my mysql tables introduced a big delay in response time.

Next up will be to tune my mysql settings.

Hello! I’ll be right with you!

5 year old boy to 3 year old girl at 5 am: “You HAVE to go downstairs and get my toy doggie.”

3 year old girl: “I’m scared! No one’s downstairs!”

5 year old boy: “HE-LL-O! I’ll be right with you!”

Lately he’s been picking up words and phrases from somewhere and it’s really funny. He sees an airplane and says “Look, it’s flying. How cool is that?”

Webserver issue solved

I will not turn off “define(‘ENABLE_CACHE’, true);” again.
I will not turn off “define(‘ENABLE_CACHE’, true);” again.
I will not turn off “define(‘ENABLE_CACHE’, true);” again.

Now I will repeat that 1000 times on the black board and never do that again.

Webserver problems

I have been having some weird response times from my WordPress installation. I’m running Opensuse 10.0 which comes with PHP 5.0.4.

PHP caches like APC and XCache don’t work with 5.0.4. I can’t just upgrade the distribution since a) this is a VPS and only 10.0 is offered and b) that would be over the top.

First thing I tried was add the software repo at http://software.opensuse.org/download/server:/php/SUSE_Linux_10.0/. I ran yast, checked php5 and poof it installed. Now I was at php 5.2.1. I kept track of the RPM’s and kept the replaced ones in case the bad thing happened.

Both cache apps are built and installed the same way

Extract the tar.gz file
phpize
./configure –some-options
make && make install

And that’s it. Some php5.ini modification and I’m in business.

APC compiled but blew up php in strange ways. Xcache installed and worked well. Even came with an admin page for checking the stats.

WordPress and some of my plugins don’t seem to like 5.2.1 and even with Xcache I was not seeing an improvement. The problem is that the initial response from the web server is 3-10 seconds to get data. I’ve got WP-Cache installed to see if subsequent page loads are faster (they are) but I think the problem is either my VPS or the network.

I rolled php back to 5.0.4 and removed Xcache. Hopefully the problem will sort itself out.