Fastcgi redis opcache pagespeed mod w3total cache ttfb toohigh

My server cpu &ram running low at 30%memory and below average 10% cpu.

But server responding very slow.

Disabled acpu maybe underlying issues with php. Page cache fastcgi implemented shm 200m in ttfs. Redis installed configured with php-redis extension. As object cache

W3 total cache settings page cache; disk /redis. Object &db cache redis.

Minify &&all other ignored.

Pagespeed mod enabled.

Opcache getting errors on 7.0 upgraded 7.2. and disabled opcache and apcu. Cloudflare serves up to 70%full page cache including HTML. Php fpm set to on demand to save memory.

Rate limiting added to nginx.

May I remove w3 total cache since page cache by fast cgi & object cache by redis.

Opcodes by opcode.

Minification by pagespeed mod.

Nginx uses only 3% cpu ram. But php-fpm causing all the errors.

Still server response time is high 1 second.

How to fix? Php 7.2 Nginx 1.13.9 mainline Debian 9 Mysql latest from source.

Tweaked network and kernel settings to max performance. But still I am a newbie.

Hello,

you are trying to many solution at the same time to be able to identify the cause of your performances issues.

  1. Rate limiting + Cloudflare isn’t a good idea, because you server can block Cloudflare proxies IP
  2. Redis with EasyEngine do object-cache + full-page cache using the configuration in /etc/nginx/common/redis-php7.conf. But if you want to use W3TC you have to adapt yourself nginx configuration
  3. Nginx will never use more than 5% of your CPU & RAM. That’s the main reason to not use Apache anymore
  4. What settings do you use with mod_pagespeed ? Do you store cache in RAM via tmpfs or memcached ?
  5. And the last one : have you check your error logs to see if there are issues in your website code ?

Using Rate limiting only wp-login.php location. Removed w3tc, Fastcgi & redis locations are in var/run tmpfs Shm for fastcgi 200m & redis 128m Modpage speed location is var/pagespeed cache. Configuration is pagespeed FileCachePath /var/ngx_pagespeed_cache; pagespeed RewriteLevel CoreFilters; pagespeed EnableFilters combine_css,combine_javascript,collapse_whitespace,remove_comments; pagespeed ModifyCachingHeaders off; location ~ “.pagespeed.([a-z].)?[a-z]{2}.[^.]{10}.[^.]+” { add_header “” “”; } location ~ “^/pagespeed_static/” { } location ~ “^/ngx_pagespeed_beacon$” { }

Which is best for full page cache redis or fastcgi

No Apache backend Server 4cores (is this vcores are hyperthreaded to 8 threads or 2physical core with multithreaded as 4virtual or logical cores) 8gb ram 80gb SSD

Digital ocean Bangalore.

I was talking about pagespeed cache storage path, you can mount /var/ngx_pagespeed_cache in RAM with tmpfs to increase loading speed. I cannot tell you what is the best solution for full page cache, because it depend on your needs and on your websites components. But you also need to check your MySQL server configuration, and to try to identify what plugins or part of your theme is making your website loading slow.

I have 30+ wp installs each one have avg 15plugins.

2-3perfomance boost plugins speed booster pack, autoptimize,w3tc Security plugin all in one security. Genesis simple edits Gensis design pallet pro. Toc Mashable social share Social profiles Google captcha

Planned to decrease plugin count as lowest as possible.

I want store pagespeed in redis cache. But i don’t Know perfectly working with redis.

Redis have 128m memory and it’s located in var/run which is total of 1gb

What I increase size of tmps /var/run.

Debugging pagespeed not showing any errors. But that not minifying all J’s files.

Only minification working. Not combining css and jS. Now I need to learn about pagespeed mod and redis.

Really confused. Don’t know what I am doing? Thinking that problem fix by today but it going on since few months. Feeling depressed sometimes. But highly interested to learn.

Want to fix pagespeed issues first. How to integrate pagespeed cache with redis What’s the ideal memory size of redis now it’s 128m

Is fastcgi memory zone size equals to it’s cache size which located tmpfs.

Tmpfs size is 1gb . So raised fastcgi memory zone size 400m with 60 minutes validity. Is it good?

Mysql has no errors.

I have logged slow request which is less than 1second. But no slow queries on mysql.

How to mount var/pagespeedcache to ram via tmpfs? Is is better than storing in redis?

Redis use local storage only for data persistence, otherwise it keep everything in memory (until the memory limit is reached). But it seems Redis do not provide more features than memcached with pagespeed at the moment.

Redis support is experimental and has not yet had substantial real world use. Before rolling this out in production, be sure to test it well. If you run into problems, please let us know.

And if you use pagespeed, you can remove autoptimize. You have to enable logs and admin panel to monitor pagespeed. My example configuration is available on nginx-ee wiki :