Howdy, Stranger!

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


Help with Speeding up Piwik When Piwik Server URL is Hidden
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.

Help with Speeding up Piwik When Piwik Server URL is Hidden

I set a Piwik Server and hid its URL according to this Piwik User Guide: https://piwik.org/faq/how-to/faq_132/

I try to make my websites fast, and this is the slowest thing in the waterfall at tools.pingdom.com.

Does anyone know how to speed this up? It looks to me that the Piwik tracking takes about 5 to 10 times longer than Google Analytics. My Piwik Server is on a VPS that appears to have plenty of resources, and I am not talking hundreds of hits, maybe 50 a day.

I am happy to pay for a solution to this problem. I can provide a link to save tests at pingdom so you can see what I am looking to solve. Also, if this isn't a fixable problem, inherently slow, can't be made fast, I'd like to know that too. Maybe I should just drop Piwik tracking.

Comments

  • YuraYura Member

    @MTUser2012 said:
    It looks to me that the Piwik tracking takes about 5 to 10 times longer than Google Analytics. My Piwik Server is on a VPS that appears to have plenty of resources, and I am not talking hundreds of hits, maybe 50 a day.

    Latency is not a resource but it could be cause of your problem. Or maybe not. Based on relevant information, or lack thereof, you provided it's up to anyone's guess.

    Thanked by 1MTUser2012
  • OK. Thanks for the comment. Would you be willing to take a look? I understand that I haven't provided a lot of relevant info in the post. I'd like to keep my website info, and my attempt to improve it, out of Google's index. If you are interested, I'll message you the info from tools.pingdom.com.

    @Yura said:

    @MTUser2012 said:
    It looks to me that the Piwik tracking takes about 5 to 10 times longer than Google Analytics. My Piwik Server is on a VPS that appears to have plenty of resources, and I am not talking hundreds of hits, maybe 50 a day.

    Latency is not a resource but it could be cause of your problem. Or maybe not. Based on relevant information, or lack thereof, you provided it's up to anyone's guess.

  • eva2000eva2000 Veteran
    edited May 2017

    Nothing you can do as piwik tracker proxy needs to make a remote call to the real piwik server from your site. Only thing to speed up is ensure your site location and piwik server location are close in proximity. So if you site is in Los Angeles, make sure piwik server is also in Los Angeles. The further away piwik server is from your site, the larger the latency you would see on page load waterfall displays

    hmm, haven't done this myself but wonder what would happen if you put piwik server behind cloudflare :)

    anyway pingdom isn't all that useful for page speed testing, use webpagetest.org instead and look for more important metrics than just overall pageload speed i.e. speedindex, first meaningful paint times etc.

    Thanked by 1inthecloudblog
  • Thanks for the help. I see your point about the location of the Piwik server. It is hard as not all my sites are hosted in the same place. The cloudflare suggestion is interesting. Maybe I should ask about that that in the Piwik forum.

    I do test with webpagetest.org as well.

    @eva2000 said:
    Nothing you can do as piwik tracker proxy needs to make a remote call to the real piwik server from your site. Only thing to speed up is ensure your site location and piwik server location are close in proximity. So if you site is in Los Angeles, make sure piwik server is also in Los Angeles. The further away piwik server is from your site, the larger the latency you would see on page load waterfall displays

    hmm, haven't done this myself but wonder what would happen if you put piwik server behind cloudflare :)

    anyway pingdom isn't all that useful for page speed testing, use webpagetest.org instead and look for more important metrics than just overall pageload speed i.e. speedindex, first meaningful paint times etc.

  • yomeroyomero Member

    MTUser2012 said: The cloudflare suggestion is interesting

    eva2000 said: if you put piwik server behind cloudflare

    Since piwik (AFAIK) draws pixels on the websites, none of these requests should be cached at all, otherwise your results will be inaccurate. So, putting Cloudflare would require disabling caching, and will increase latency having to walk extra hops to your server (in most cases).

    IIRC, most issues with piwik, are related to the slow database, due to it's high requirements of system resources for medium-high volume websites. After some time, when your DB starts to fill, it gets very slow.

    Your piwik install is fresh (and small)? Your websites have a lot of traffic?

    Thanked by 1MTUser2012
  • YuraYura Member

    @yomero said:
    Since piwik (AFAIK) draws pixels on the websites, none of these requests should be cached at all, otherwise your results will be inaccurate. So, putting Cloudflare would require disabling caching, and will increase latency having to walk extra hops to your server (in most cases).

    Yes.

    Also, Piwik supports load balancing via shared mysql database. Instructions are on their site.

    IIRC, most issues with piwik, are related to the slow database, due to it's high requirements of system resources for medium-high volume websites. After some time, when your DB starts to fill, it gets very slow.

    Do you experience this? At what amount of events per day? If you have this problem and use sql database you may want to migrate into Redis. Piwik supports that, performance should increase.

  • raindog308raindog308 Administrator, Veteran

    eva2000 said: So if you site is in Los Angeles, make sure piwik server is also in Los Angeles.

    Once you leave the same DC, latency grows dramatically. If the OP is running piwik on a separate URL solely because of security, maybe running it on the same server (served from a different subdomain) would meet the need. Or on a different server/VM in the same DC.

    Disclaimer: not a piwik user.

    Thanked by 1bersy
Sign In or Register to comment.