Forum Moderators: phranque

Message Too Old, No Replies

Extremely high TTFB

         

akis_Sak

8:49 am on Oct 5, 2015 (gmt 0)

10+ Year Member



I have a website hosted on a VPS, with 3.5GB RAM, 5 cpus and SSD. It runs on CentOS 6.7 and it utilizes the latest version of Litespeed enterprise 1-cpu license.

The website itself is made on joomla 3.4.4 and it is highly optimized (very few plugins,components,modules, all of which have been stripped of useless code, joined and compressed css and js, extensive use of cache etc).

However I face some problems which I belive have to do with the server config/setup.

Problem 1 :

After cache has been generated for any given page, that page loads very fast (around 1 sec for page ready, 150+ requests per page with no browser cache). However on first view (no cache generated yet) the TTFB takes 3-4 sec, after that the page loads fast (another 700msec to 1sec).

Problem 2 :

Sometimes I use a firefox extension called foxyspider to crawl through pages linked in a html sitemap page, in order to quickly generate a new cache of those pages. Foxyspider has an option allowing to choose how many crawlers to use simultaneously. If I choose anything above 2 and then at the same time I try to manually visit a page which doesn't have cache generated yet, TTFB goes to 10+ sec (have seen 17). Running top on SSH at that time i have 1gb RAM free, 1.5 server load (i got 5 cpus), no swap

The reason I believe it is a server config/setup problem is because I've done these "tests" while having 0 requests from any other sources and most importantly because doing the exact same "tests" on my localhost environment the website runs without any of the above problems. On my localhost I can choose 20 or even 30 foxyspiders at once with no problems.

I even tried replicating mysql/php/apache configurations of wampdeveloper onto my production server with no results.

Do you guys have any insight? Any ideas at all as to what could be the problem?

p.s. i'm not a sys admin, i'm a web developer that tries to do everything by himself, so I apologize if I left out any vital info, just ask and I'll provide