CPU Load goes up


#1

Hello ,

I have a VPS server :

  • 2G Ram, 60 G hardrive and 3 cores running at 1.2Ghz .
  • Piwik version 1.8.2
  • WebServer : Nginx

There is only Piwik running on the server . It is a statistics Server .

Whenever i connect to the Webinterface of Piwik the CPU load goes up to about 48 - 50 , and once i quit the Piwik inteface the load goes down to 0.1 .

Where should the problem come from ?

Thank you.


#2

Hi i noticed the ticket just opened I wanted to address your comment about the piwik and GA disparity.

What i first recommend you do is the following.

1 pick a time frame like a day or 2.

2 run a complete pages report from piwik then save an excel file of it.(This will list all pages and PVs for each)

3 Run a complete GA pages save an excel file report for the exact same time frame (again use PVs for each)

Now compare the the 2 excel files. Look for differences as far as pages that are or arent reporting from one or the other. I helped someone else where they found they had forgotten a complete section to add piwik code to.(im hoping the same is the case here). It will never be exact but they should be relatively close.

Good luck


#3

Hi ,

Thanks for your reply .

I will try what you told .

By the way the websites are running on WordPress and i use a Plugin for adding the tracking code .

Do you know whay the CPU load goes high whenever i connect to the Webinterface .

I tried using th old version of Piwik 1.7.1 and the load doesn’t go high.

Thanks


#4

You mention you are using a VPS, the web interface is it just the piwik login via a web browser you refer to as being the spike?

If you are logging into your VPS then running the admin you actually may be causing the CPU spike via the VPS interface itself, things like Cpanel or Plesk in themselves are or can be very CPU intensive as they are a complete gui on top of the linux system itself. Is there any way you set a CPU usage measure of the VPS to run, then logout of the VPS interface then wait 10 mins and try to login via the web admin in your piwik install then once done login back into the VPS and see the history?

I am hoping this at least eliminates the overhead that the GUI is causing the spike and not so much the piwik admin.

Good luck


#5

Hello ,

Yes i’m using a VPS , but the load is specific to the Piwik interface . When i open the Piwik inteface nothing else is running .
I tried to

Are there anyways to optimize it.

Thanks


#6

My point was the VPS interface itself is a large cause of CPU usage.

If you have a way to measure the CPU load with and without the interface to see if its just related that way.

If you open another web page while the VPS menu is active does it also do this CPU spike?


#7

Ok , when the Piwik webinteface is not launched the CPU load is around 0.1 - 0.3 , and once the Piwik webinterface opened the CPU load goes high


#8

ok good now can you open another web page on teh site and see the results from there?


(Matthieu Aubry) #9

You need to setup: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo


#10

This was a comment from another user and it reminded me of this CPU usage increase might not hurt to try. Good Luck

An Ubuntu bug [c] was consequently filed on Launchpad. The primary effect is high CPU load in kernel as well as user processes.

This bug affects all supported versions of Ubuntu. Note that this bug is very widespread, impacting almost all modern Linux operating systems.

A fix is currently being prepared for this issue. As a workaround for affected systems, either of the following actions should alleviate the CPU load:

  1. Execute the following command as root (or prepend ‘sudo’ if non-root):

date -u -s “$(date -u -R)”

OR

  1. Reboot

The permanent fix will be in the kernel well before the next leap second (as yet unannounced), which will be a minimum of six months away most likely in 2015.

Do not hesitate to contact Canonical Support if you require further help. You can do this via a support case within Landscape (https://landscape.canonical.com) or by phone (numbers listed in Landscape).

The Canonical Support Services Team

: Leap second - Wikipedia
[c]: Bug #1020285 “Addition of leap second causes spuriously high CPU...” : Bugs : linux package : Ubuntu
Canonical Group Limited 27th Floor, Millbank Tower 21-24 Millbank London SW1P 4QP United Kingdom


#11

Hi ,

Ok , i’ll try . I am running CentOS 6.2 on the server . The archive on Piwik is already configured .