• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extremely slow speed on my site using codeignitor... is this normal?

[quote author="alitech" date="1276052781"]I am not on a dedicated maching with a quad core 2.8 GHZ proc, 8GB ram and 1TB hard disk. This has not helped either as the server goes down constantly because of the load. I have been monitoring Apache and the maximum traffic I can achieve is about 180 threads at the same time.

I am told that with codeignitor on every page load, the index page is referenced/loaded as well? Is that right?

You are or are not on that server? That server seems perfectly adequate really if you meant you are on it. However, there is a lot of potential apache optimizations as 180 threads seems low for an 8GB quadcore! In fact, if you get alot of traffic, I'd even suggest dumping apache and going nginx and fast cgi with php-fpm. nginx uses an event loop and running out of memory with high volume is reportedly much better on nginx than apache. Again though, it seems to me that some tuning could help a lot on the apache end in the meantime.

If you are not using some kind of Op caching engine (APC, etc.) Do it! You can also store the results of your queries in APC for 30 minutes (or more depending on how static the data is on average.) When you say all those pages I assume you mean unique pages rendered from database code? Is the database service on the same server? Is it MySQL? Have indexes been setup for your tables (particularly for the joins?) Any attempt to optimize your database?

This really is something you need to hire a professional to delve into. It sounds like you've had several people look into optimizing the code, perhaps it wouldn't hurt to have an IT expert optimize your services.

Codeigniter does call index.php every time (so does wordpress, zen framework, and just about every php-based tool that is distributed on the Web.) CodeIgniter does a good job of only loading what files are needed at any given URL. In benchmarks (that I don't have) CodeIgniter has been shown to be well-optimized when compared to other popular PHP frameworks. That said, PHP, in general, does not scale well compared to say Java or ASP.NET. Doubt you wanna go that far, but food for thought.

Good luck!

Messages In This Thread
Extremely slow speed on my site using codeignitor... is this normal? - by El Forum - 06-08-2010, 10:18 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.