Archive for the ‘Optimization’ Category

Does a PHP integration of mod_php or FastCGI or suphp have an Impact on CPU Usage?

Since July, I have been experiencing CPU usages on my Virtual Dedicated Server.  In July, my host InMotion Hosting, whom I have had an excellent relationship with for over 3 years, recommended that I should move to a ‘new faster server’ and they would migrate my accounts for free.

Sounded good, I asked a few questions, hoping to make a relatively informed decision, but I know next to nothing about servers and hardware, which is the reason why I turn to them for hosting and Virtual dedicated hosting specifically.

They upgraded me and within about 2 weeks, I started having problems with my account using up too much load on the CPU of the server.  My sites and the server were crashing every couple weeks, and InMotion Hosting started telling me that I would have to upgrade to a dedicated server, a price difference of $150 per month!  (Currently paying about $50 a month, prepaid for a year, Dedicated costs about $200 per month).

Frankly, I couldn’t afford the move.

At the time this first started happening, I was traveling in NYC for Affiliate Summit, and I didn’t have the time to completely figure out what was going on.  Twice over the years, I’ve run into CPU load issues and it usually involved a plugin that was broken or not working right.

I searched through my cpanel accounts, checking the error logs on each.  I found a few little errors but nothing significant.  I fixed those, checked with my host, and that didn’t seem to phase anything.

I did some heavy lifting in robots.txt to insure that I wasn’t being indexed by bots that were driving up the CPU (there was some indication that a bot masquerading as the cuel (cool) search engine was causing a bit of a problem.  I worked to eliminate bot access to every folder that wasn’t essential.

I triple checked my largest sites to insure that my images were optimized too.  (they were already, but I wanted to double check)

I was already running WP-Super Cache on my largest 2 sites, so I started loading that up on all my other sites.  Then I added DB Cache and even Widget Cache and DB manager so that I could routinely optimize my DB.

That seemed to make a small bit of a dent but not enough.

My biggest problem was really the lack of information at a domain level.  On a VDedicated account, I have absolutely NO TOOLS to help me identify if one domain/cpanel account is causing the bulk of the problem or if all domains are.  I thinned out the herd and eliminated/suspended/moved some cpanel accounts.

Again that helped just a little bit, but not enough.

Finally towards the end of September, I spoke with a admin at Inmotion who was able to install a script or a program to monitor my account.  I couldn’t view this program, but she was able to tell me the top domains or directories that were using the most CPU at the time.  She was also able to point out a couple plugins, that were not creating errors but did seem to be consuming to much of the cpu resources.  I deactivated and deleted them.

A couple days later, I got a message from Inmotion saying that that action had fixed the problem!

I sent back a message saying terrific! I can’t believe we finally solved this.  I was very happy and relieved.

But 20 minutes later, the same person replied again and told me that actually things weren’t fixed and we’d have to continue monitoring.

:( Uh, OK. :(

Four days later, I get an email saying that things were still bad, and my account would be shut down tomorrow, the original deadline given several weeks earlier.

So I called in, got filtered through hold for 20 minutes, got a low level representative on the phone, who was nice and polite but frankly jerked me around for 14 minutes because 1) he couldn’t do anything about the issue 2) its his job to make sure that people like me no longer have direct access to the admins 3) their own internet connection was apparently down 4) when he tried to transfer me, it didn’t work a couple times, maybe internet down related.

So I finally get on the phone with the admin who had sent me the latest message.  I mentioned to him, that when I had spoke with the helpful representative that had set up the monitoring script, that she had indicated the next thing to trouble shoot would be whether my Apache configuration on the new server was not optimal for my sites as compared to the Apache configuration on the old server.

I asked the new guy if we could look at this.  I had done some quick research that had indicated:

mod_php Vs. FastCGI

How you integrate PHP into Apache has performance implications. The two most popular options are:

mod_php

The PHP interpreter and all it’s linked in libraries are compiled into a loadable Apache Module (mod_php) and this module is loaded into every running Apache process at startup time. This is generally the simplest way to run PHP and is supported by most hosting environments. It also introduces memory overhead because of the monolithic Apache processes which you have running, and because the PHP interpreter is included in the web server binary which services non PHP files.

FastCGI

An alternative method of using PHP is to have the PHP interpreter running external to the Apache process and to use the FastCGI API to interface between the web server (mod_fastcgi) and the PHP interpreter. The advantages of this method is that you don’t load the full PHP stack into Apache, you can call upon PHP only when your web server needs to run a PHP script (not images, or HTML/CSS etc) and you also get security benefits of running PHP as a user other than the web server user. This setup is slightly more advanced, and usually requires custom compilation of PHP. One other possible advantage here is that you may be able to run the threaded Apache worker MPM when using FastCGI, since technically any non threadsafe PHP libraries are not being run inside Apache, but inside an external process.

I also found this useful description in a forum post that broke down a few additional settings from someone with the username ‘till’:

2nd April 2009, 10:42

The php option depends on traffic that you expect for the site and if the site e.g. uploads or creates images or files on the server.
mod_php:
- fast
- runs not under admin user of the site
- well suited for low and high traffic sites, but not for cms systems like joomla.
suphp:
- not so fast
- script runs under web admin
- secure
- well suited for low traffic sites
fastcgi
- fast
- script runs under web admin
- secure
- well suited for high traffic sites
so basicalley the decision is, if a site is low traffic, use suphp. suphp spawns a new cgi process for every page request, but it does not use resources when no pages are requested. On the opposite fastcgi, the php processes are running permanently even if no page is requested, this is faster and fine for a high traffic site but for a small homepage with 100 pageviews per hour you would waste resources.

So he agreed to try an alternative, and later sent me this message after it had been set up:

Just to follow up with you I have made two major changes to your VPS platform. The first being php was upgraded to the latest (from 5.2.10 to 5.2.11) and no longer uses suPHP. Also I have recompiled apache to use the MPM Worker instead of MPM Prefork which may help to
reduce load used by apache.

So now I’m in a new holding pattern, hoping that this change might be the magic bullet that gives me back my happily functioning websites and vdedicated account.  I’m heading to BlogWorld next week, so I expect that my account will likely take a crap on me while I’m traveling, not a traffic spike or anything, just a Murphy’s Law issue.

Share

Excellent WordPress Security Presentation from Brad Williams

Here’s an excellent Presentation slide show from Brad Williams of WebDevStudios who recently spoke at a WordPress NYC meetup.  Excellent presentation.  Slides built so well that you will get a ton of very very useful information from this presentation to help you secure your WordPress powered website.

Wondering why your site just got knocked down in Pagerank or in the SERPs?

Maybe you were hacked and didn’t even know it.   ~ Just one example of the the very useful information in this presentation on WordPress Security.

Share

UserTesting.com Beware Users Not Really Needed These Days

During an SEO meetup meeting, I heard a referral for UserTesting.com.  Its a service that charges $29 to provide a website owner with both a video and written review of the usability or navigability of their website.

They charge $29 and pay a person $10 to capture screen video of their navigation of the site.  I think this could be a useful service for web designers and especially companies looking to test landing pages or even better checkout processes.

But if you are thinking of possibly making $30-40 per hour as the site itself mentions, watch out and reconsider applying!

I went through the application process tonight.  I thought I might make a good reviewer since

  • I create video tutorials all the time
  • I design web sites and am not inexpert at providing useful critiques for improvement
  • People solicit my advice on this type of thing all the time
  • I have a good deal of marginal or additional time where I could slip in a good review
  • Plus, I thought more exposure to good and bad websites might help improve my own perspective and web design skills.

So I applied for an account, which took about 3 minutes.

I was then prompted to download and install their screen capture software.  Its kind of an automated combo deal.  It captures video from your screen and your voice as you narrate what you are thinking while you are working through any given site review.

After you download and install it, they have you work through what is supposed to be an example site (in this case it might have been a real site as the thing almost charged $26 to my PayPal account when I was testing the checkout process!  WATCH OUT FOR THAT ONE! )

Now despite almost taking $26 from me by accident, I don’t think the site is a scam.  It came from a trusted referral of a user that purchases reviews from them regularly.

I completed the video and the screen recorder proceeded to work the upload, which took forever.  I upload video all the time, and I’m guessing that this was an upload of a fully uncompressed video so the file size was probably about 120 mb if I were to guess based on the speed.

After all of that work (about 30 minutes of applying, recording a 12 minute video, like a try out or audition, and 16 minutes of upload time) I received an email that said the following:

Dear Brett,
Thank you for applying to be a user tester on UserTesting.com. We’ve received your sample video and written review.
Your demographics, video, and written review will be part of the algorithm used to determine how many jobs you receive. If you’re a fit, you’ll receive emails notifying you of paying jobs as they become available.
If you do not receive any emails from us within three weeks, then it is likely that you will not get any paying jobs. Unfortunately, this is the case for most applicants, since we currently have an oversupply of user testers.
The UserTesting.com Team
http://www.UserTesting.com

Well isn’t that a fine howdy do.  They could have mentioned that up front before I even bothered to go to all that trouble.  :)

So in general, I think this could be a useful service if you need in depth insight into what other people think of your website and how they use it from one page to the next.  At $29 I think its a bit of a bargain.

However, if you are thinking about reviewing sites for the service, I’d recommend thinking twice before investing the time for the service, especially as they have an OVERSUPPLY of testers.  :)

I can appreciate their oversupply, very common in internet businesses like this, but they should really offer up a disclaimer or simply shut down their application process for now, that must be a waste of their bandwidth and storage space not to mention potential goodwill of designers like myself that are potential customers as well as reviewers, not to mention bloggers.  :)

Parting Tip

If you do still go through the application process, I’m not sure what to think about the written review part of the site.  They sell customers both a video and a written review.  By the time you do a 5-15 minute review, you have covered a lot of ground.  They then throw a comment form at you to ask you a few questions.

The form itself is not designed in a way that really promotes the write up of a good review.  Its more of an open ended survey.

If they are judging reviewer auditions based on the written results, I suspect they might nix mine.  It was an average write up, even if the video review I did was pretty good.  I frankly didn’t realize that this ‘survey’ I was completing would actually become the ‘written review’.  There also does not seem to be anyway to preview your review, spell check it, nor edit it after the fact.

If you are looking to buy reviews, I’d caution you to expect good videos and mediocre to average written reviews.

Share

What are You Doing to Fight the Google Bomb?

OK, look, Google did what they did to PR.  That was only one cog in the wheel of what drives value on the internet.  If all of your force was on PR, then you need to diversify your blogging tactics and fight back to regain ground.

So what are you going to do to diversify your tactics, methods, revenue streams and ability to attract and hold the elusive visitor?

Here are some of the things that I am doing:

  1. Writing more focused on niche blogs
    • Emphasis on More Writing since I can now write 150 words per minute thanks to the best blogging tool ever.
    • Promoting additional niche blogs, my next one will be on law, since I have a law degree.  Its a bit dry to write about sometimes, but it pays well and will probably get worked into my next degree program.  There’s always something to write about from politics, to recalls, to lawsuits, to traffic accidents like that pile up in the tunnel in California last week, truck accident lawyers websites got lit up after that.
  2. Writing my thoughts on my blogs and not wasting the content in forums.  Post a link in there instead. 
    • I’ll read yours if you read mine!
  3. Edit, Edit, Edit – It comes with writing more.
  4. Promoting my individual articles heavily
  5. Not holding my self to 101 or 207 words – Complete the topic, complete the thought, if you can’t don’t publish it yet. – My average article is over 350 words, always has been.
  6. Advertising my own sites (notice the advertisers didn’t get hit too hard – just publishers)
  7. Optimize, Optimize, Optimize and Optimize some more
    Network, but do not network superficially (Blogrolls out, Articles about bloggers in)
  8. I’m strategically placing do not follow tags (will discuss this highly effective tactic more elsewhere and it doesn’t have anything to do with putting no follow tags on an advertiser link)
  9. I am still using Adsense
  10. I am still using advertising networks
  11. I am still using TLA  (none of my TLA blogs were hit)  –
    • Note this is not a TLA blog.  TLA Update – TLA is not kicking blogs out of their system that dropped below PR4.  If you look in TLA today, you will see a lot of PR1, PR2, and PR3 blogs in there.  They were not likely accepted at that level as they used to require PR4 and higher, but after talking with them yesterday, through their new advertorial program (advertiser writes article and includes links with nofollow tags on your blog that goes through normal article rotation) BTW TLA owns part or all of ReviewMe ~ not my favorite network as their pricing has never worked for me as an advertiser nor as a blogger.
  12. I will be writing more and more and more
  13. I will be running more sites with groups of authors (It doesn’t fit PayPerPost’s model or TOS, but that is PayPerPost’s problem not mine – PPP’s advertisers will just miss out on that opportunity.  Sites with more authors get more traffic.  PPP needs to wake up on this issue.)
  14. Politics, Politics, Politics – Hello! There’s a billion dollar election coming. 
  15. I don’t care if you like him or hate him but have you received an advertising order from John McCain yet? 
    • Click Here
  16. Have you solicited Hillary’s advertising people for an order yet?    Have you starred in your own Obama Girl video yet?

  17. What else are you doing to get involved in politics this year?

    • Click Here
  18. Apply Peer Pressure on the Industry – If you see bad writing help that writer to see that they need to improve.  If its bad paid writing, you could report them to the Google Webmaster thing, but that doesn’t serve anyone other than Google.  I recommend a more humorous approach.  You can email in a link of a bad article or site example.  FartPerPost will then snap a picture of the article or site and publish the picture but not the link.  Potential for lots of laughs with no real harm.

Things That I will Avoid a Google Bomb (some of these are not new)

  1. I’m going to review every site and insure all items on the site ad value to my readers first,  advertisers buttons don’t belong on article pages
  2. If I have to disclose at an article level, I will definitely be looking much more closely at the amount that its paying and will likely only consider these ‘advertorials’ when the links are no follow.
  3. I’m not blatantly identifying my blogs in paid to blog network forums
  4. I’m not wasting my content in forums
  5. Screw Digg – If you are a blogger, skip Digg.  You are only likely to attract haters.  There are many other social networks in the sea.  I like thoof myself.
Share

SEO for WordPress

There are many different theories on how to be a successful blogger and optimize a blog. One of the more comprehensive guidelines that I have found is the   . . .

SEO for WordPress – The Complete Guide

It offers a number of excellent tips, structures, and plugins to help a new or even an existing blog get a very good start.

The guide covers the following areas with a number of tips in each section.  Note, I think ‘Complete’ guide is a bit of a stretch but it is a very good guide.

Section 1 – Optimize Your Blog

Section 2 – How to Craft Your Articles

Section 3 – Increase User Interaction

Section 4 – Get Links

Whether or not you are running a blog tracking your experiences getting out of debt or running a comedic spoof type of blog or even running a blog promoting a business focused on a niche like home theater seating choices for homes under 3,000 square feet, this guide is generic enough to benefit any of those blogs.

Share
Twitter Tools
  • Chronicles of Narnia The Lion, The Witch, and The Wardrobe
    Control Lucy, Peter, Edmund and Susan - four unlikely heroes battling creatures from myth and legendTeam-based action adventure as you wage war against Centaurs, Minotaurs, Werewolves, Satyrs, Boggles and moreUnique combat skills, weaponry and special moves as you fight hordes of mythical beasts and solve intricate puzzlesSeamless game play integration of fi […]
  • Sakar WII-102 Tennis Racket – Game controller tennis racket attachment
    SPORTS […]
  • Large Software: Password Manager
    Password Manager remembers usernames and passwords for ANY web page or application.Password Manager prevents password theft.Password Manager allows you to travel anywhere and rely on its innovative technology.Password Manager protects you from phishing scams.Password Manager also protects you from keylogging. […]
Archives