Current time: 07-22-2019, 12:49 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Improving First Byte Time
07-07-2013, 01:26 PM
Post: #8
RE: Improving First Byte Time
(06-23-2013 02:05 AM)sunjohn Wrote:  I suggest you to use the "top" command to see what takes so much time.
I suspect your database to be your main problem.
That might explain your numbers : 10 seconds for the first page load because nothing is in cache, 2 seconds for the second load because most queries are still in cache.
If your cache is to small, the next time you'll ask for your page, the queries results won't be in cache anymore then it'll take 10 seconds again.

It seems pretty clear that your problem comes from a small cache — it might also come from a saturated APC cache (same problem : not enough space -> forced to recompile after a short while) but it's pretty unlikely… because frankly, i doubt Magento's scripts take that much CPU.

Anyway, even 2 seconds is pretty slow so it might also come from too small buffers in your database configuration (my.cnf, probably).
If you allocate to little RAM to you database, sometimes it'll have to use temporary tables (=> disk i/o) instead of performing everything in RAM, which is hundreds (or thousands) times slower.

Google :
mysqltuner.pl
tuning-primer.sh

These 2 scripts will help you to find the appropriate settings for your MySQL configuration (assuming you're using MySQL or MariaDB).
Magento is extremely poorly written, and generally always slow. The way the do DB queries is terrible, and uses a ton of PHP resources and memory. To get it within tolerable levels, it requires extensive use of things like memcache, tuning php, and absurd amounts of resources. This can cut first byte time in about half, but still terrible. You can also use a full page cache to increase your max concurrency.

I host all my sites on Pagodabox, they have an awesome setup for scaling resources, and have spent thousands of hours tuning their infrastructure. It requires the use of GIT, but is far easier to use and set up than typical hosting. They have a one click install for Magento, with all the optimizations already done, so you could look at what is done their, or search for a Magento optimization guide.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Improving First Byte Time - jazzitup - 06-17-2013, 07:51 AM
RE: Improving First Byte Time - GreenGecko - 06-17-2013, 03:54 PM
RE: Improving First Byte Time - jazzitup - 06-17-2013, 04:03 PM
RE: Improving First Byte Time - GreenGecko - 06-17-2013, 04:10 PM
RE: Improving First Byte Time - jazzitup - 06-17-2013, 04:57 PM
RE: Improving First Byte Time - GreenGecko - 06-20-2013, 04:21 PM
RE: Improving First Byte Time - sunjohn - 06-23-2013, 02:05 AM
RE: Improving First Byte Time - xeridea - 07-07-2013 01:26 PM
RE: Improving First Byte Time - olivedev - 07-18-2017, 12:52 AM
RE: Improving First Byte Time - GreenGecko - 07-19-2017, 04:29 PM
RE: Improving First Byte Time - goivvy - 10-04-2017, 07:54 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)