WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] W3 Total Cache: what is considered to be "good" performance? (22 posts)

  1. Hubert Nguyen
    Member
    Posted 4 years ago #

    Hello,

    I have a question for the W3 Total Cache (W3TC) community out there: what is considered as "good" performance for a site using W3TC?

    I get between 0.3 seconds to 1.3 seconds for a page creation. I have yet to try more settings combinations, but I'm curious to know how fast your setup gets.

    Let me know, I'm sure that a lot of webmasters are curious. Thanks!

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    This question is often asked, but there's some thing to understand. It doesn't matter what other people are doing. W3TC allows you to remove bottlenecks from your server, theme / site.

    You should look at your past performance and go step-by-step through the options to realize: lower response time, lower page load time etc relative to your prior speeds. Limitations on what you achieve vary based on your server, theme, plugins and content.

  3. djmorrisinc
    Member
    Posted 4 years ago #

    I saw Yoasts video on his settings and that even prompted me to get APC, but now I have switched to the Development Version....any ways to find how others are setting that version most effectively?

  4. Hubert Nguyen
    Member
    Posted 4 years ago #

    Hi Frederick,

    I agree with what you say, but having some kind of reference could be interesting. Is there a stressing tool that you would recommend? Often it's easier to see the bottleneck under load. Thanks!

  5. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    There are lots of different bottlenecks. I suppose you can use apache bench to check response time / concurrency.

  6. John Levandowski
    Member
    Posted 4 years ago #

    I'm getting 0.10 to 0.20 second for page creation. Only using w3tc for page caching (APC) and minify (APC). Not using it for database caching.

  7. Here are my Apache Bench results on a VPS with 768MB Ram with the following settings:

    Minified using disk
    Page Caching using disk (enhanced)
    Database Caching using apc
    Object Caching using apc
    Content Delivery via static subdomain (with cookies)

    [~]# ab -n 1000 -c 10 http://c3mdigital.com/
    This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
    Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
    Copyright 2006 The Apache Software Foundation, http://www.apache.org/
    
    Server Software:        Apache
    Server Hostname:        c3mdigital.com
    Server Port:            80
    
    Document Path:          /
    Document Length:        17124 bytes
    
    Concurrency Level:      10
    Time taken for tests:   2.319919 seconds
    Complete requests:      1000
    Failed requests:        0
    Write errors:           0
    Total transferred:      17622710 bytes
    HTML transferred:       17175372 bytes
    Requests per second:    431.05 [#/sec] (mean)
    Time per request:       23.199 [ms] (mean)
    Time per request:       2.320 [ms] (mean, across all concurrent requests)
    Transfer rate:          7417.93 [Kbytes/sec] received
    
    Connection Times (ms)
                  min  mean[+/-sd] median   max
    Connect:        0    9   6.4      9      28
    Processing:     2   11   6.0     12      30
    Waiting:        0    8   6.3      9      27
    Total:         16   20   3.9     20      33
    
    Percentage of the requests served within a certain time (ms)
      50%     20
      66%     21
      75%     24
      80%     25
      90%     27
      95%     28
      98%     29
      99%     30
     100%     33 (longest request)
  8. zxb2
    Member
    Posted 4 years ago #

    These are my results, using XCache for Page Cache and Minify. Memcached for DB. Server specs are a Xeon 5520 and 6GB RAM.

    Server Software: nginx
    Server Hostname: exophase.com
    Server Port: 80

    Document Path: /
    Document Length: 36176 bytes

    Concurrency Level: 10
    Time taken for tests: 0.603084 seconds
    Complete requests: 1000
    Failed requests: 0
    Write errors: 0
    Total transferred: 36626000 bytes
    HTML transferred: 36176000 bytes
    Requests per second: 1658.14 [#/sec] (mean)
    Time per request: 6.031 [ms] (mean)
    Time per request: 0.603 [ms] (mean, across all concurrent requests)
    Transfer rate: 59306.83 [Kbytes/sec] received

    Connection Times (ms)
    min mean[+/-sd] median max
    Connect: 0 0 0.0 0 1
    Processing: 2 5 2.5 5 24
    Waiting: 2 4 2.4 4 23
    Total: 2 5 2.5 5 24

    Percentage of the requests served within a certain time (ms)
    50% 5
    66% 6
    75% 6
    80% 7
    90% 8
    95% 10
    98% 12
    99% 15
    100% 24 (longest request)

  9. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    I could write a book about benchmarking, but understand:

    • Different web servers perform differently with PHP
    • In general, static files cached to disk perform better than objects cached in memory.
    • The document length is a significant factor in results, try to compare identical pages (like using the twentyten theme home page). Use minify + compression to increase throughput/concurrency.
    • Lots more, this is enough for now...
  10. John Levandowski
    Member
    Posted 4 years ago #

    Since everyone is showing AB results, here is a site of mine hosted on a 512MB VPS. Page caching APC, minify APC, no db caching.

    ab -n 1000 -c 10 http://blackjack.wpselect.com/
    This is ApacheBench, Version 2.3 <$Revision: 655654 $>
    Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
    Licensed to The Apache Software Foundation, http://www.apache.org/
    
    Server Software:        Apache/2.2.14
    Server Hostname:        blackjack.wpselect.com
    Server Port:            80
    
    Document Path:          /
    Document Length:        31840 bytes
    
    Concurrency Level:      10
    Time taken for tests:   1.327 seconds
    Complete requests:      1000
    Failed requests:        0
    Write errors:           0
    Total transferred:      32323000 bytes
    HTML transferred:       31840000 bytes
    Requests per second:    753.48 [#/sec] (mean)
    Time per request:       13.272 [ms] (mean)
    Time per request:       1.327 [ms] (mean, across all concurrent requests)
    Transfer rate:          23783.87 [Kbytes/sec] received
    
    Connection Times (ms)
                  min  mean[+/-sd] median   max
    Connect:        0    0   0.3      0       5
    Processing:     3   13  10.2     11     103
    Waiting:        0   12   9.7     10     103
    Total:          3   13  10.2     11     103
    
    Percentage of the requests served within a certain time (ms)
      50%     11
      66%     14
      75%     16
      80%     18
      90%     25
      95%     32
      98%     42
      99%     54
     100%    103 (longest request)
  11. Hubert Nguyen
    Member
    Posted 3 years ago #

    Thanks for posting your info - this is very interesting. Frederick, this is very useful info too.

  12. Hubert Nguyen
    Member
    Posted 3 years ago #

    @fredericktownes: There are huge blocks in most sites that could be saved/cached as .php static files and included with a phpinclude, like:

    -top stories (with thumbnails, updated every few hrs)
    -most commented of last month, week, yesterday
    -etc...

    Because they are based on WP data, they would normally be taxing the system every time they appear in the templates, even if the data itself would change only once a day or week. Even if you cache the DB queries, it seems much slower than saving those block of data to the disk with a cron and use a phpinclude. Am I being too paranoid?

    Is there an easy way to redirect the php output to a file on disk?

    Thanks!

  13. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Am I being too paranoid?

    Yes, unless your site is very high traffic in which case you can modify your theme to create those cache files itself and update them at the intervals you wish. I thought about adding that to W3TC, but it's most useful for very high traffic sites, so I may do it as a plugin later.

  14. efikim
    Member
    Posted 3 years ago #

    would this be a case where using the widget caching plugin (sorry, can't remember its name) might be helpful?

  15. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    What do you mean this case? I can imagine no case where that plugin is necessary while running W3TC. Someone else needs to provide a counter-example.

  16. Hubert Nguyen
    Member
    Posted 3 years ago #

    @Frederick: Ok, I'll try to stress the site. If I find an easy way to do it, I'll go for it, but I'd rather keep things simple. I just have a thing against taxing the system for mostly static stuff.

    How would you add it to W3TC? By adding "cache" tags to the template code with an expiration time?

  17. Because they are based on WP data, they would normally be taxing the system every time they appear in the templates, even if the data itself would change only once a day or week. Even if you cache the DB queries, it seems much slower than saving those block of data to the disk with a cron and use a phpinclude. Am I being too paranoid?

    This would be a perfect case for using WordPress's built in Transient API

    Transients are small pieces of data that you set to expire. WordPress will cache the data in MySQL. If you have Memcached and Memcached server installed WordPress will serve the data directly from memory. It wouldn't help any if you were serving a cached page but it would help for logged in users.

  18. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    The only reason transients are not always a fit is because a database call is slower than checking the disk even when comparing mysql's query cache to the operating systems memory cache for frequently accessed files. Instead it would be better if the Object Cache API was used for widgets so that the behavior of the cached objects could be predictable and transparently supported by W3TC and the supported caching engines.

    Anyway, fragment caching in W3TC or WPSC currently uses a different policy, where everything is cached except the things that need to be executed each page view. The policy for caching the output of those objects and using that cache file to build templates until they've expired is not logic I've implemented yet.

  19. Hubert Nguyen
    Member
    Posted 3 years ago #

    @c3mdigital: I'm new to WP and did not know about this. Thanks for pointing out.

    @Frederick: yes, I'd rather check the disk if possible.

  20. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Ok.

  21. webass
    Member
    Posted 3 years ago #

    Hi, to enter the fairly old posting here.
    I had very bad results running on my VPS. Foir the initial base test, before starting caching.

    Failed requests 9 out of ten.

    And all so slow.

    Is there anything which should be adjusted, before starting to use caching?
    The AB test:

    [Test results moderated as per the Forum Rules. Please use the pastebin]

  22. webass
    Member
    Posted 3 years ago #

    But now, when I have the plugin Total Cache installed and save the cache to disk.
    I have better results.

    Server Software:        Apache
    Server Hostname:        www.zukunftszone.de
    Server Port:            80
    
    Document Path:          /
    Document Length:        55177 bytes
    
    Concurrency Level:      2
    Time taken for tests:   1.28341 seconds
    Complete requests:      10
    Failed requests:        1
       (Connect: 0, Length: 1, Exceptions: 0)
    Write errors:           0
    Total transferred:      556269 bytes
    HTML transferred:       551787 bytes
    Requests per second:    9.72 [#/sec] (mean)
    Time per request:       205.668 [ms] (mean)
    Time per request:       102.834 [ms] (mean, across all concurrent requests)
    Transfer rate:          528.03 [Kbytes/sec] received
    
    Connection Times (ms)
                  min  mean[+/-sd] median   max
    Connect:        0    0   0.0      0       0
    Processing:     1  198 416.5      1    1028
    Waiting:        1  189 396.9      1     975
    Total:          1  198 416.5      1    1028
    
    Percentage of the requests served within a certain time (ms)
      50%      1
      66%      1
      75%      2
      80%    948
      90%   1028
      95%   1028
      98%   1028
      99%   1028
     100%   1028 (longest request)

    Now my questions:
    I have memcached installed and it gives out this result with everycache run through memcache:

    Server Software:        Apache
    Server Hostname:        www.zukunftszone.de
    Server Port:            80
    
    Document Path:          /
    Document Length:        55316 bytes
    
    Concurrency Level:      2
    Time taken for tests:   1.943700 seconds
    Complete requests:      10
    Failed requests:        9
       (Connect: 0, Length: 9, Exceptions: 0)
    Write errors:           0
    Total transferred:      555391 bytes
    HTML transferred:       551189 bytes
    Requests per second:    5.14 [#/sec] (mean)
    Time per request:       388.740 [ms] (mean)
    Time per request:       194.370 [ms] (mean, across all concurrent requests)
    Transfer rate:          278.85 [Kbytes/sec] received
    
    Connection Times (ms)
                  min  mean[+/-sd] median   max
    Connect:        0    0   0.0      0       0
    Processing:    19  387 773.7     20    1856
    Waiting:       18  378 756.2     19    1813
    Total:         19  387 773.7     20    1856
    
    Percentage of the requests served within a certain time (ms)
      50%     20
      66%     21
      75%     26
      80%   1855
      90%   1856
      95%   1856
      98%   1856
      99%   1856
     100%   1856 (longest request)

    Might it be, that my memcache is not correctly configured?
    Or isnt it mandatory, that the memcached cache will be better then to disc?

    My memcache config output by server info:
    memcache

    memcache support enabled
    Active persistent connections 0
    Revision $Revision: 1.80 $

    Directive Local Value Master Value
    memcache.allow_failover 1 1
    memcache.chunk_size 8192 8192
    memcache.default_port 11211 11211
    memcache.max_failover_attempts 20 20

    I have the feeling I did anything wrong, while I didnt configure memcache.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic