WordPress.org

Ready to get started?Download WordPress

Forums

optimizing wordpress for 10K+ pageviews. please help! (15 posts)

  1. crazlunatic
    Member
    Posted 7 years ago #

    I own a blog at http://www.vistarewired.com but was shut down because the hosting company said I was using too many resources. Today we got 10K visitors and 14K pageviews. We don't normally get so many but the company (wirednine.com) has also complained when we reach 2000+. I am already using wp-cache but never configured it, its just enabled and does its job. This is what they gave us:

    vistarw1 vistarewired.com 23.59 16.71 3.5
    Top Process %CPU 8.0 httpd [www.vistarewired.com] [/favicon.ico]
    Top Process %CPU 7.0 httpd [www.vistarewired.com] [/favicon.ico]
    Top Process %CPU 4.4 httpd [www.vistarewired.com] [/wp-content/themes/dago-pakar-10/images/footer.gif]

    vistarw1 vistarewired.com 23.85 17.03 4.4
    Top Process %CPU 18.0 httpd [www.vistarewired.com] [/wp-content/themes/dago-pakar-10/GoodBanner.jpg]
    Top Process %CPU 17.0 httpd [www.vistarewired.com] [/favicon.ico]
    Top Process %CPU 16.5 httpd [www.vistarewired.com] [/wp-content/themes/dago-pakar-10/js/livesearch.js.php]

    Is this normal? How am I able to fix these problems. They told me 9000+ visitors is doable but I have to optimize my site.

    The weird thing is I never touched favicon. Also, the goodbanner.jpg is only around 200-350Kb.

    Can you please help me so I can get my site up asap, thanks =)

  2. Chris_K
    Member
    Posted 7 years ago #

    There have been some great thread here in the past about optimization and/or tuning. A search should turn them up.

    What version of WP are you running?

  3. crazlunatic
    Member
    Posted 7 years ago #

    I am using 2.1 I believe. Cannot check xD, but pretty sure its 2.1

  4. Chris_K
    Member
    Posted 7 years ago #

    Ok, that's good. 2.1 had some tuning.

    Oh, besides the local search, here's an article: http://asymptomatic.net/2006/05/02/2327/high-performance-wordpress/

  5. TimoK
    Member
    Posted 7 years ago #

    @favicon.ico: I think most or maybe even all browser automatically request favicon.ico, no matter if it is there or not. Creating an all white 16*16 .ico and uploading it could actually save performance, as the browsers then can cache that file (and it might be smaller than your 404 page too).
    200-350kb for an image on the web is still a lot, I would try to get that < 150kb at least.

    Anyhow, I dont think that will really reduce the load on the server, so finding a better host might be your best option. 2000 page impressions per day are nothing, unless you pay < 1$ per month your host really should not complain about that.

  6. crazlunatic
    Member
    Posted 7 years ago #

    Ya. I thought that even 9K is not much which is rather odd.

    handysolo i didn't find much in the local search btw, and thx for the link

    I dont know why the favicon is using so many resources.
    But ya, you really think its my host. They told me I'm using 25% of the CPU, and if I switched to another host, the same thing will just happen to me unless I optimize.

  7. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    WP-Cache is highly optimal, as it does static caching and consumes very little CPU to run. Beyond that, there's really not a lot you can do. PHP caching would help a lot, but that's probably beyond your ability to mess with (it's something the host would have to configure).

    Also, note that favicon.ico, being a static file, is as optimal as it can possibly be with regards to CPU. I'd say that it's quite likely that your host doesn't know what they're doing. Executable code consumes CPU. Static files only chew up bandwidth.

  8. crazlunatic
    Member
    Posted 7 years ago #

    My webhosting comapny told me to put this in my config file so I put it in wp-config.php

    define('DISABLE_CACHE', true);

    Now when I try to access my admin panel I get:
    Warning: Cannot modify header information - headers already sent by (output started at /home/vistarw1/public_html/wp-config.php:25) in /home/vistarw1/public_html/wp-includes/pluggable.php on line 275

    please help xD

  9. Jonathan Landrum
    Member
    Posted 7 years ago #

    Take that line out. If that caused the problem, then removing it should fix it. I've never heard of that call before, though. The call in your case would be define('ENABLE_CACHE', false); which is redundant since it's disabled by removing the line. So just delete that part.

  10. crazlunatic
    Member
    Posted 7 years ago #

    Thanks. I have done that and have seen improvements.
    However, my comment system is messed now.

    Fatal error: Call to a member function on a non-object in /home/vistarw1/public_html/wp-includes/query.php

    What might this mean? Sorry for all the questions and thanks for all the help ^_^

  11. davidchait
    Member
    Posted 7 years ago #

    wp-cache isn't currently active -- just looking at your page source under FF.

    Just to distinguish...

    There is the PLUGIN called wp-cache, which takes a static 'snapshot' of html output from url requests, saves it, and feeds it back whenever possible without going through the whole wp php backend.

    There is the internal WP 'object caching' mechanism (which is what (ENABLE_CACHE,false) turns off...), which on many shared hosts has been shown to be the cause of extremely high loads -- don't know if this has been alleviated in 2.1 at all. The issue is that the object cache tries to save frequent MySQL DB requests to an on-disk (by default) cache file, so if you are on a host with slow disk i/o, you are doubly screwed. If you have fast i/o, and slow DB, then object cache can make a real difference. If you're on a dedi server, and can configure the object cache into a memcached ram cache (or other ram method), it can significantly win over base MySQL config, and even over many MySQL query-cache setups.

    Definitely, whenever you change a major flag or feature in php files or the backend, clear wp-cache for safety.

    -d

  12. crazlunatic
    Member
    Posted 7 years ago #

    oh i turned off an hour ago thats why =P
    how would I turn on wordpress cache?
    and does that mean turning it on is a good thing?

  13. Jonathan Landrum
    Member
    Posted 7 years ago #

    define('ENABLE_CACHE', true);

    But are you certain that's what you need? The reason I ask is that not all users will truly benefit from using the caching system. If you have a relatively slow posting tempo---say, once a week or longer---then caching will benefit you, particularly if you don't have many commenters or don't allow comments at all.

    However, if you update, like, once a day, or more, or if you have a loyal following that comment on every post and follow up on every other comment left, then caching probably isn't what you're looking for. You'll end up using lots of CPU cycles to do nothing, because the cache will get flushed before it's of any real use.

    I found this out on my own blog. Lots of users complained that they weren't seeing their comments when they posted them, and so they quit coming. My traffic took a nose-dive the only two times I turned caching on. I guess if they're okay with a slower load time, then I'm okay. :o) But don't let my case make the decision for you. It doesn't hurt to turn it on and find out if it works for you.

  14. Chris_K
    Member
    Posted 7 years ago #

    Lots of users complained that they weren't seeing their comments when they posted them, and so they quit coming.

    Side note: That was a known issue (not intended result) of wp-cache a few versions back. That has been fixed.

  15. Jonathan Landrum
    Member
    Posted 7 years ago #

    Side note: That was a known issue (not intended result) of wp-cache a few versions back. That has been fixed.

    Ah, danke shoen! :o) I had totally written off caching. Maybe I'll have another go.

Topic Closed

This topic has been closed to new replies.

About this Topic