Current time: 12-13-2017, 01:41 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Huge <15sec TTFB - drives me crazy
10-09-2017, 08:30 PM
Post: #1
Huge <15sec TTFB - drives me crazy
Hi guys,

since yesterday morning i suddenly see a huge delay in pages loading.
I didn't change anything to configuration of Apache.
Using VPS and LAMP.

Struggling to identify all day and night long yesterday what is happening..

https://www.webpagetest.org/result/17100...1/details/

Do you have an idea or please give a hint?

mysqltunner gave:

Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Enable the slow query log to troubleshoot bad queries
When making adjustments, make tmp_table_size/max_heap_table_size equal
Reduce your SELECT DISTINCT queries without LIMIT clauses
Variables to adjust:
query_cache_size (> 16M)
tmp_table_size (> 16M)
max_heap_table_size (> 16M)
Find all posts by this user
Quote this message in a reply
10-11-2017, 06:25 PM
Post: #2
RE: Huge <15sec TTFB - drives me crazy
(10-09-2017 08:30 PM)stelaras1 Wrote:  Hi guys,

since yesterday morning i suddenly see a huge delay in pages loading.
I didn't change anything to configuration of Apache.
Using VPS and LAMP.

Struggling to identify all day and night long yesterday what is happening..

https://www.webpagetest.org/result/17100...1/details/

Do you have an idea or please give a hint?

mysqltunner gave:

Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Enable the slow query log to troubleshoot bad queries
When making adjustments, make tmp_table_size/max_heap_table_size equal
Reduce your SELECT DISTINCT queries without LIMIT clauses
Variables to adjust:
query_cache_size (> 16M)
tmp_table_size (> 16M)
max_heap_table_size (> 16M)

it was a f@cken plugin
Find all posts by this user
Quote this message in a reply
10-14-2017, 07:00 AM
Post: #3
RE: Huge <15sec TTFB - drives me crazy
Hi,

A couple of thoughts.

1. Cache the HTML document - it is super cachable by the looks of the website - you should be able to serve from cache (e.g. Varnish on a CDN) in circa 200ms.

2. Put APM on your web server (like New Relic) to id the long running code / query on your site.



(10-11-2017 06:25 PM)stelaras1 Wrote:  
(10-09-2017 08:30 PM)stelaras1 Wrote:  Hi guys,

since yesterday morning i suddenly see a huge delay in pages loading.
I didn't change anything to configuration of Apache.
Using VPS and LAMP.

Struggling to identify all day and night long yesterday what is happening..

https://www.webpagetest.org/result/17100...1/details/

Do you have an idea or please give a hint?

mysqltunner gave:

Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Enable the slow query log to troubleshoot bad queries
When making adjustments, make tmp_table_size/max_heap_table_size equal
Reduce your SELECT DISTINCT queries without LIMIT clauses
Variables to adjust:
query_cache_size (> 16M)
tmp_table_size (> 16M)
max_heap_table_size (> 16M)

it was a f@cken plugin
Find all posts by this user
Quote this message in a reply
10-18-2017, 07:41 AM
Post: #4
RE: Huge <15sec TTFB - drives me crazy
Ouch - can you let us know what plugin it was that caused the issues? Perhaps it was misconfigured?

Glad it's fixed though.
Find all posts by this user
Quote this message in a reply
10-21-2017, 11:21 PM
Post: #5
RE: Huge <15sec TTFB - drives me crazy
The problem you're seeing relates to your LAMP Stack + likely your entire runtime environment.

Asset #1 (HTML component) serve time on your site relates to both your hardware (VPS) + software (LAMP) + WordPress code (core + theme + plugins).

http://www.webpagetest.org/result/171021...27c64a27e/ shows an example of a site I host. Notice the total time required to server Asset #1, after DNS, is 153ms.

I target <300ms for serving Asset #1 for my clients.

Here's how I do this.

I run Ubuntu on bare metal servers (no VPS + no VMs).

Then LXD at machine level + sites in LXD containers.

This way I can tune each site's LAMP Stack for each site's specific work load.

The site in the example above is a WordPress membership site under heavy usage.

Since you're running in a VPS slice, this likely means your VPS is running inside some sort of slow VM.

This type of setup is highly effected by other sites running in other VMs on the same hardware.

All this said, your likely first step is to change hosting, to a company which understands how to run high speed WordPress site hosting.

That's your first step.

Once your site's running in well tuned hosting, then you'd have someone go through your site + fix anything slowing your site down. This list can be long + complex.

If you're a DIYer, a good starting point for you is to enable SAVEQUERIES + WP_DEBUG + check your WordPress debug log file for any problems + install the Query Monitor plugin + debug/fix all reported issues.

I'd suggest you only go through the Query Monitor debug/fix cycle, after you've changed to fast hosting, because you may find all problems vanish when your site runs on a well tuned LAMP Stack.

Like help speeding up your site? Skype me @ ID davidfavor for a quote. Be sure to include your site name in your Skype Add Contact request.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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