Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Web host complaining about CPU load

edited February 2007 in Vanilla 1.0 Help
Hi all, I have been using Vanilla with a handful of extensions on my moderately-busy site for a month and it has been great. The forum is lean, clean, and loads fast. The site is at http://www.dovforums.com However, an admin from the hosting company I use sent me an e-mail saying that my forum is using "excessive" CPU resources. I am currently paying for a shared hosting plan and it suits my needs just fine in terms of bandwidth and disk space. My site runs great, but apparently Vanilla is hogging up a lot of resources behind the scenes? The admin has been nice enough to investigate and has narrowed down the source of the drain: The main "Discussions" page. Here are some e-mails. Any help will be greatly appreciated because a.) I would love to continue using Vanilla b.) I don't want to have to change hosting companies (headache) c.) I don't want to have to pay more for a dedicated host just to run Vanilla. ----- Our resource monitoring scripts have noticed your site is using almost 4% of the CPU resources and nearly 10% of system memory. This is almost double of what we consider a generally acceptable amount for a single site. You do seem to get quite a bit of traffic but not really enough to justify this type of resource usage. What kind of forum software are you using? It seems that it might be rather inefficient. We're just hoping we can discuss and come to a resolution before this becomes a bigger problem. Thanks. ----- It looks like: Top Process %CPU 21.5 httpd [www.dovforums.com] [/] Top Process %CPU 20.5 httpd [www.dovforums.com] [/] Top Process %CPU 14.0 httpd [www.dovforums.com] [/?CategoryID16] These are your top processes. The main page, and that one category. I would check and see... something on your main page seems to be hanging, which might be your issue. ----- It appears that the sites frontpage is stilling pulling pretty heavy on the server: httpd [www.dovforums.com] [/] %CPU 21.5 You might want to begin looking at our semi-dedicated and dedicated servers since this problem is not being resolved at this time. We are afraid if your site gets heavily used we will have to insist on such a move in the future. As well, you might try caching the discussions on the frontpage and regernating every couple of minutes instead of for each page pull. Thanks. ------
«13

Comments

  • I think the problem could be the way your front page is displayed. It's pulling a lot of info in all at once which would account for the extra CPU use. Maybe cutting it down to the latest 5 discussions in each category? The Audi A5 does look quite nice doesn't it? :)
  • ur frontpage is crazy. I can't imagine how many calls it make to pull all that data either change the frontpage to default or do what giginger said.
  • Discussion overview makes one query for each category you have, and each of those queries would be almost the same as a normal front-page load. I would suggest making the overview a separate tab, (change the 0 to a 1 near the top of the code) and it appears each user can use it by default if they prefered it.
  • I'm with them on this. Front page is pretty useless IMO. I would either default it to the categories page (as you have 19 of them) or just have a standard "30 Discussions" on the front page, without all the separate category guff.
  • As well, you might try caching the discussions on the frontpage and regernating every couple of minutes instead of for each page pull. Thanks.

    This would be useful as an extension IMO :)
  • edited February 2007
    How could they be cached on the server since the frontpage can be different for each user if there is some whispered discussions on it.
  • That's one limitation you'd have to live with, either no whispers, or have them display in a different area, like the PM extension.
  • You could cache the front page only for guests, like Reddit does. Not sure if the guest/member ratio would be enough to make this worthwhile.
  • I have now disabled the Discussion Overview extension. I also limited the number of discussions per page to 20. I hope these two minor changes will reduce the load. As for caching, I have ruled that option out due to the complexities of doing it. Like WallPhone said, my site is relatively low-bandwidth so I don't think the work required would be worth it. Any other suggestions on where the forum could be sapping so much CPU cycles, or anything else to optimize? Thanks... I'd like to get the admin off my back. ;-)
  • Maybe you could work with the admin to help monitor the usage as you make changes to your forum. That would certainly show him you are attending to the matter and would help you and us. We could use your findings to possibly help others in a similar situation.
  • I'd really like to know how Vanilla compares to the competition in terms of CPU load. I've not seen any large Vanilla forum with hundreds of online users.
  • What about the mozilla forums?
  • URL? Mozilla link to http://forums.mozillazine.org/ which is phpBB.
  • Give it time... http://wiki.mozilla.org/Update:Remora_Interactions/Forums
  • That looks mint!
  • ZiyphrZiyphr New
    edited February 2007
    Mock-up looks nice but doesn't really help.

    Clearly there's a number of reasons for no big sites using it yet but the unproven nature of it for heavy usage is a little worrying. With hundreds of simultaneous users the smallest optimisation goes a long way. Has there ever been load testing for Vanilla?
  • Ziyphr: The main core of Vanilla has been highly optimised, you'll find that the causes of slowdown on sites are due to addons which arn't optimised themselves.

    This is an issue that plagues a lot of forum software, not just vanilla.
  • Just like we've had a request for a comment moderator, should we add a step in the process of developing add-ons to include a moderator? People can code solutions in many ways. But one may be better than others because it is more efficient and manageable. This would help make Vanilla the best it can be.
  • What kind of process would you suggest was gone through? I can 'moderate' the addons, but going through all available extensions would be an incredibly time consuming process... I'm open to ideas how we could improve things though...
  • We have peer code reviews where I work which seems to help keep our code functioning and bug-free. There is a design philosophy that Mark has for Vanilla. We hackers can usually find a way to accomplish something although it may affect some other piece of code, not necessarily now but perhaps in the future.

    There are a handful of you guys (whoops and gals) who have built some excellent add-ons. You understand the workings of Vanilla and how to use the delegates and other things within Vanilla. I consider myself a hacker and not a developer. I can hack until I get something to work, but that's not the best way.

    If we had a team of code-reviewers, now while there are only x extensions, we have a better chance to ensure that everything works together. Look at WP and it's growth. I personally welcome someone looking at my code and advising me on better ways to do things. It can make me a better programmer and make Vanilla better in the long run.
This discussion has been closed.