Time To First Byte with varnish cache - 12 seconds












1















I installed varnish cache and verified using official guide.



In official guide mention 5ms to load the url with varnish but mine it is 12s.



Info:



OS : ubuntu 14.0.4, webserver : apache2, php : 7, php memory_limit : 2G, Varnish : varnish-4.0.5



Below attached my store front(http://host/codebase/production) chrome console output



Easy for your reference



what I need to tune? please feel free to post answer/comment, any help would be much appreciated, we can keep consolidating answer of tuning page load speed.










share|improve this question
















bumped to the homepage by Community 10 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    Depending on VCL you have in use, Varnish may not cache the page with subdirectory-like installation. Most likely you get Age: 0 when verifying configuration - this means the page was not cached.

    – Daniel V.
    Aug 8 '17 at 21:19











  • thanks! you right it is not cache the page, one of my extension use cacheable="false", I removed it, now ttfb reduced to 1s. I think 1s also huge load time as per the official guide. any thoughts?

    – Bilal Usean
    Aug 8 '17 at 21:25













  • Do you have positive value in Age: now?

    – Daniel V.
    Aug 9 '17 at 4:58











  • yes, +ve value...

    – Bilal Usean
    Aug 9 '17 at 7:24
















1















I installed varnish cache and verified using official guide.



In official guide mention 5ms to load the url with varnish but mine it is 12s.



Info:



OS : ubuntu 14.0.4, webserver : apache2, php : 7, php memory_limit : 2G, Varnish : varnish-4.0.5



Below attached my store front(http://host/codebase/production) chrome console output



Easy for your reference



what I need to tune? please feel free to post answer/comment, any help would be much appreciated, we can keep consolidating answer of tuning page load speed.










share|improve this question
















bumped to the homepage by Community 10 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    Depending on VCL you have in use, Varnish may not cache the page with subdirectory-like installation. Most likely you get Age: 0 when verifying configuration - this means the page was not cached.

    – Daniel V.
    Aug 8 '17 at 21:19











  • thanks! you right it is not cache the page, one of my extension use cacheable="false", I removed it, now ttfb reduced to 1s. I think 1s also huge load time as per the official guide. any thoughts?

    – Bilal Usean
    Aug 8 '17 at 21:25













  • Do you have positive value in Age: now?

    – Daniel V.
    Aug 9 '17 at 4:58











  • yes, +ve value...

    – Bilal Usean
    Aug 9 '17 at 7:24














1












1








1


1






I installed varnish cache and verified using official guide.



In official guide mention 5ms to load the url with varnish but mine it is 12s.



Info:



OS : ubuntu 14.0.4, webserver : apache2, php : 7, php memory_limit : 2G, Varnish : varnish-4.0.5



Below attached my store front(http://host/codebase/production) chrome console output



Easy for your reference



what I need to tune? please feel free to post answer/comment, any help would be much appreciated, we can keep consolidating answer of tuning page load speed.










share|improve this question
















I installed varnish cache and verified using official guide.



In official guide mention 5ms to load the url with varnish but mine it is 12s.



Info:



OS : ubuntu 14.0.4, webserver : apache2, php : 7, php memory_limit : 2G, Varnish : varnish-4.0.5



Below attached my store front(http://host/codebase/production) chrome console output



Easy for your reference



what I need to tune? please feel free to post answer/comment, any help would be much appreciated, we can keep consolidating answer of tuning page load speed.







magento2 magento-2.1 performance full-page-cache varnish






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 10 '17 at 14:32







Bilal Usean

















asked Aug 8 '17 at 20:46









Bilal UseanBilal Usean

4,49923385




4,49923385





bumped to the homepage by Community 10 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 10 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 1





    Depending on VCL you have in use, Varnish may not cache the page with subdirectory-like installation. Most likely you get Age: 0 when verifying configuration - this means the page was not cached.

    – Daniel V.
    Aug 8 '17 at 21:19











  • thanks! you right it is not cache the page, one of my extension use cacheable="false", I removed it, now ttfb reduced to 1s. I think 1s also huge load time as per the official guide. any thoughts?

    – Bilal Usean
    Aug 8 '17 at 21:25













  • Do you have positive value in Age: now?

    – Daniel V.
    Aug 9 '17 at 4:58











  • yes, +ve value...

    – Bilal Usean
    Aug 9 '17 at 7:24














  • 1





    Depending on VCL you have in use, Varnish may not cache the page with subdirectory-like installation. Most likely you get Age: 0 when verifying configuration - this means the page was not cached.

    – Daniel V.
    Aug 8 '17 at 21:19











  • thanks! you right it is not cache the page, one of my extension use cacheable="false", I removed it, now ttfb reduced to 1s. I think 1s also huge load time as per the official guide. any thoughts?

    – Bilal Usean
    Aug 8 '17 at 21:25













  • Do you have positive value in Age: now?

    – Daniel V.
    Aug 9 '17 at 4:58











  • yes, +ve value...

    – Bilal Usean
    Aug 9 '17 at 7:24








1




1





Depending on VCL you have in use, Varnish may not cache the page with subdirectory-like installation. Most likely you get Age: 0 when verifying configuration - this means the page was not cached.

– Daniel V.
Aug 8 '17 at 21:19





Depending on VCL you have in use, Varnish may not cache the page with subdirectory-like installation. Most likely you get Age: 0 when verifying configuration - this means the page was not cached.

– Daniel V.
Aug 8 '17 at 21:19













thanks! you right it is not cache the page, one of my extension use cacheable="false", I removed it, now ttfb reduced to 1s. I think 1s also huge load time as per the official guide. any thoughts?

– Bilal Usean
Aug 8 '17 at 21:25







thanks! you right it is not cache the page, one of my extension use cacheable="false", I removed it, now ttfb reduced to 1s. I think 1s also huge load time as per the official guide. any thoughts?

– Bilal Usean
Aug 8 '17 at 21:25















Do you have positive value in Age: now?

– Daniel V.
Aug 9 '17 at 4:58





Do you have positive value in Age: now?

– Daniel V.
Aug 9 '17 at 4:58













yes, +ve value...

– Bilal Usean
Aug 9 '17 at 7:24





yes, +ve value...

– Bilal Usean
Aug 9 '17 at 7:24










1 Answer
1






active

oldest

votes


















0














i have export varnish vcl config in backend and move it to varnish config folder



configuration in my dev enviroment

Enable all cache types

No js or css minify or bundle. Dev site no need this feature

Backend port 8080 i'm using nginx server listening 8080 port





Move magento exported file varnish.vcl (located in magentoroot/var) to /etc/varnish/ change name to default.vcl
I use ubuntu os and change default varnish port 6081 to 80 for listen all traffic user



daemon varnish config service located in /etc/varnish/default




DAEMON_OPTS="-a :80 -T localhost:6082 -f /etc/varnish/default.vcl"




Change port nignx to 8080



After that restart all service such as nginx, varnish, php



Above is all my experiences in my dev machine






share|improve this answer
























  • thanks! I completed the configuration, varnish works but somehow ttfb 1s, but official verification mention 5ms, how to tune to achieve 5ms? that is my question

    – Bilal Usean
    Aug 10 '17 at 14:48











  • I'm not sure 5ms is theory. For clean install magento. Check system.log or exception log for more information. My local usually load around 1-2 sec

    – mrtuvn
    Aug 10 '17 at 15:05













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f188415%2ftime-to-first-byte-with-varnish-cache-12-seconds%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














i have export varnish vcl config in backend and move it to varnish config folder



configuration in my dev enviroment

Enable all cache types

No js or css minify or bundle. Dev site no need this feature

Backend port 8080 i'm using nginx server listening 8080 port





Move magento exported file varnish.vcl (located in magentoroot/var) to /etc/varnish/ change name to default.vcl
I use ubuntu os and change default varnish port 6081 to 80 for listen all traffic user



daemon varnish config service located in /etc/varnish/default




DAEMON_OPTS="-a :80 -T localhost:6082 -f /etc/varnish/default.vcl"




Change port nignx to 8080



After that restart all service such as nginx, varnish, php



Above is all my experiences in my dev machine






share|improve this answer
























  • thanks! I completed the configuration, varnish works but somehow ttfb 1s, but official verification mention 5ms, how to tune to achieve 5ms? that is my question

    – Bilal Usean
    Aug 10 '17 at 14:48











  • I'm not sure 5ms is theory. For clean install magento. Check system.log or exception log for more information. My local usually load around 1-2 sec

    – mrtuvn
    Aug 10 '17 at 15:05


















0














i have export varnish vcl config in backend and move it to varnish config folder



configuration in my dev enviroment

Enable all cache types

No js or css minify or bundle. Dev site no need this feature

Backend port 8080 i'm using nginx server listening 8080 port





Move magento exported file varnish.vcl (located in magentoroot/var) to /etc/varnish/ change name to default.vcl
I use ubuntu os and change default varnish port 6081 to 80 for listen all traffic user



daemon varnish config service located in /etc/varnish/default




DAEMON_OPTS="-a :80 -T localhost:6082 -f /etc/varnish/default.vcl"




Change port nignx to 8080



After that restart all service such as nginx, varnish, php



Above is all my experiences in my dev machine






share|improve this answer
























  • thanks! I completed the configuration, varnish works but somehow ttfb 1s, but official verification mention 5ms, how to tune to achieve 5ms? that is my question

    – Bilal Usean
    Aug 10 '17 at 14:48











  • I'm not sure 5ms is theory. For clean install magento. Check system.log or exception log for more information. My local usually load around 1-2 sec

    – mrtuvn
    Aug 10 '17 at 15:05
















0












0








0







i have export varnish vcl config in backend and move it to varnish config folder



configuration in my dev enviroment

Enable all cache types

No js or css minify or bundle. Dev site no need this feature

Backend port 8080 i'm using nginx server listening 8080 port





Move magento exported file varnish.vcl (located in magentoroot/var) to /etc/varnish/ change name to default.vcl
I use ubuntu os and change default varnish port 6081 to 80 for listen all traffic user



daemon varnish config service located in /etc/varnish/default




DAEMON_OPTS="-a :80 -T localhost:6082 -f /etc/varnish/default.vcl"




Change port nignx to 8080



After that restart all service such as nginx, varnish, php



Above is all my experiences in my dev machine






share|improve this answer













i have export varnish vcl config in backend and move it to varnish config folder



configuration in my dev enviroment

Enable all cache types

No js or css minify or bundle. Dev site no need this feature

Backend port 8080 i'm using nginx server listening 8080 port





Move magento exported file varnish.vcl (located in magentoroot/var) to /etc/varnish/ change name to default.vcl
I use ubuntu os and change default varnish port 6081 to 80 for listen all traffic user



daemon varnish config service located in /etc/varnish/default




DAEMON_OPTS="-a :80 -T localhost:6082 -f /etc/varnish/default.vcl"




Change port nignx to 8080



After that restart all service such as nginx, varnish, php



Above is all my experiences in my dev machine







share|improve this answer












share|improve this answer



share|improve this answer










answered Aug 10 '17 at 2:30









mrtuvnmrtuvn

1,7351729




1,7351729













  • thanks! I completed the configuration, varnish works but somehow ttfb 1s, but official verification mention 5ms, how to tune to achieve 5ms? that is my question

    – Bilal Usean
    Aug 10 '17 at 14:48











  • I'm not sure 5ms is theory. For clean install magento. Check system.log or exception log for more information. My local usually load around 1-2 sec

    – mrtuvn
    Aug 10 '17 at 15:05





















  • thanks! I completed the configuration, varnish works but somehow ttfb 1s, but official verification mention 5ms, how to tune to achieve 5ms? that is my question

    – Bilal Usean
    Aug 10 '17 at 14:48











  • I'm not sure 5ms is theory. For clean install magento. Check system.log or exception log for more information. My local usually load around 1-2 sec

    – mrtuvn
    Aug 10 '17 at 15:05



















thanks! I completed the configuration, varnish works but somehow ttfb 1s, but official verification mention 5ms, how to tune to achieve 5ms? that is my question

– Bilal Usean
Aug 10 '17 at 14:48





thanks! I completed the configuration, varnish works but somehow ttfb 1s, but official verification mention 5ms, how to tune to achieve 5ms? that is my question

– Bilal Usean
Aug 10 '17 at 14:48













I'm not sure 5ms is theory. For clean install magento. Check system.log or exception log for more information. My local usually load around 1-2 sec

– mrtuvn
Aug 10 '17 at 15:05







I'm not sure 5ms is theory. For clean install magento. Check system.log or exception log for more information. My local usually load around 1-2 sec

– mrtuvn
Aug 10 '17 at 15:05




















draft saved

draft discarded




















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f188415%2ftime-to-first-byte-with-varnish-cache-12-seconds%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Polycentropodidae

Magento 2 Error message: Invalid state change requested

Paulmy