Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Improve TTFB from my VPS
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Improve TTFB from my VPS

inklightinklight Member
edited December 2014 in Requests

I have 512MB VPS and I used webpagetest.org to test my site TTFB after every tweaking I do .
Current Time to First Byte: 203ms
My current installation is
(Nginx PH5-fpm APC MySQL-InnoDB)
Nginx PH5-fpm config nothing special
**APC config **

apc.stat=0 
apc.shm_size    64M
apc.shm_strings_buffer  4M
apc.ttl=3600
apc.user_ttl=7200

rest are defualt settings
**MySQL config **

innodb_buffer_pool_size = 64M
innodb_additional_mem_pool_size = 3M
query_cache_size = 64M
query_cache_type=1
query_cache_limit=1M

this is current Mem status

            total       used       free     shared    buffers     cached

Mem:           502        490         11          0         65        276

-/+ buffers/cache:        148        354

I have **354MB **free which can be helpful to improve my site speed .

Can I make MySQL load my DB from RAM directly specially its 10MB only
And can I move my static files specially whole wordpress directory size is 194M including wp-contents folder .

I already read about how to move MySql to RamFS Ref

but I don't know if this safe and what happened if server shutdown or restarted could I lost all MySQL DB and static files !

Thanked by 1Droid

Comments

  • NyrNyr Community Contributor, Veteran

    "Time To First Byte" will depend more on network distance than anything and doesn't mean much.

  • SilvengaSilvenga Member
    edited December 2014

    InnoDB is practically an in-memory database (the tables are loaded into RAM) with flushing, no need to optimise there.

    How are you testing your TTFB?

  • inklightinklight Member
    edited December 2014

    @Nyr said:
    "Time To First Byte" will depend more on network distance than anything and doesn't mean much.

    Google use it as one of PageSpeed measure this is my site test result

    Reduce server response time
    In our test, your server responded in 0.23 seconds
    

    they call it server responded BTW I do the test from same stat one www.webpagetest.org which is Texas and result still in 228ms <<this time what take from server to send first response . I don't take DNS Lookup time in count when i doing my testes

  • Where is your VPS located?

  • inklightinklight Member
    edited December 2014

    @Silvenga said:
    InnoDB is practically an in-memory database (the tables are loaded into RAM) with flushing, no need to optimise there.

    How are you testing your TTFB?

    I know InnoDB do that but I don't know what is best tweaking wither if my current are enough .
    I test TTFB with www.webpagetest.org

    @PetaByet said:
    Where is your VPS located?

    VPS located Texas Houston I test it using Webpagetest From: San Antonio, Texas
    BTW no answer me if I can put my Wordpress folder in RAM using RamFS

  • inklight said: BTW no answer me if I can put my Wordpress folder in RAM using RamFS

    Don't, the Linux kernel should be caching your files into memory - no use trying to optimise optimisations.

    And don't use www.webpagetest.org. I ran a test on my blog and got 809ms for first byte and 2,227ms for the full page.

    Then I ran Pingdom and got 44ms for first byte, 258ms for the full page and scripts.

  • @Silvenga said:

    your www.webpagetest.org result is** 80ms** you should press in details and see Waterfall View .

    I ran test to your blog using San Antonio, Texas location and you got 52ms

    for Pingdom.com TTFB is Connect+Wait for your test =44ms+7ms= 51ms

    My result on was 78ms+155ms=230ms here
    Any way I'll forget caching WP folder idea is there any more tweaking should I add .

  • inklight said: your www.webpagetest.org result is** 80ms** you should press in details and see Waterfall View .

    The first byte sections says 0.809s for me = 809ms (although I didn't see the Texas testing location before). 100ms looks better.

    I'm confused, you said the VPS is located in Houston, Texas. However, the server appears to located in Chicago, Illinois.

    inklight said: there any more tweaking should I add .

    Simple, Varnish.

Sign In or Register to comment.