This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

[7.401] Spiking CPU

Some time after updating to 7.401, our firewall is showing spiking CPU utilization on periodic intervals which starts around 6am and stops at midnight.

I managed to log in to the console and catch the culprit in the act, it's a postgres process for the reporting user using 100% CPU.

Known issue?  Should I open a support ticket?

> ps aux|grep postgres

postgres  3241  0.0  0.5  48816  5356 ?        S    Mar20   0:50 /usr/bin/postgres -D /var/storage/pgsql/data
postgres  3247  0.0  3.3  48944 34956 ?        Ss   Mar20   0:02 postgres: writer process                    
postgres  3248  0.0  0.1  48816  1092 ?        Ss   Mar20   0:01 postgres: wal writer process                
postgres  3249  0.0  0.1  49112  1352 ?        Ss   Mar20   0:00 postgres: autovacuum launcher process       
postgres  3250  0.0  0.1   6968  1076 ?        Ss   Mar20   0:40 postgres: stats collector process           
postgres  4052  0.0  3.5  49640 37036 ?        Ss   Mar20  21:02 postgres: reporting reporting [local] idle  
postgres  4331  0.0  1.0  50000 10964 ?        Ss   Mar20   0:00 postgres: postgres smtp 127.0.0.1(38284) idle
postgres 17723  0.0  0.4  50028  4732 ?        Ss   17:20   0:01 postgres: postgres smtp 127.0.0.1(53737) idle
postgres 21328 91.6  6.5  88728 67624 ?        Rs   17:47   2:10 postgres: reporting reporting [local] SELECT


Edit: This affects 7.402 as well.


This thread was automatically locked due to age.
  • There are other threads that discuss turning turning off Hyperthreading.  It sounds like that might help you.
  • No Hyperthreading turned on here...
  • Running 7.401 on Core2Duo 3gigs of RAM.

    Getting 50% + CPU usage.  Strange thing is it happens same times every day.
    (see attached JPG)

    Here is the usage line with "53.1" being CPU:
    postgres 17082 53.1  2.5 125640 80164 ?        Ds   17:32   0:56  \_ postgres: reporting reporting [local] SELECT

    I ran the above SSH database commands and at first it helped but then the usage was back up above 50%.  [:S]

    Is this addressed at all in 7.402?

    Thanks


    Could this just be your database update?  When did you upgrade to 7.4xx?
  • Updated a few weeks ago so that is not an issue.

    Take a look at the attached JPG ... see how we start getting CPU spikes around 3 pm.  And also how the memory starts filling up?   It does this every day.   [:S]
  • I'd submit a support request to Astaro.

    Cheers - Bob
  • If you ran all the Postgres rebuild commands, I'm with Bob.  Open a support ticket.  You've got something else going on. The consistent 3:00 start time looks like a database issue of some sort.
  • This still affects 7.402 as well on my system.  I've explicitly run the reindex and a vacuum full analyze on the reporting database now.  We'll see how that works...
  • As previously posted above, I was running ASG software that was a 7.3 install and was upgraded to 7.401.

    An Astaro tech thought it might be a problem related to the 7.3 update to 7.4.

    So I took another box and installed a clean version of 7.402 from ISO, imported my config and am running it now.

    I am now only getting about 40% CPU spikes and no memory hog problems ... see screen shot.

    The CPU usage is still postgres:

    USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
    postgres 15409 44.3  3.1 125668 98212 ?        Rs   18:47   2:26  \_ postgres: reporting reporting [local] SELECT

    I am still interested in knowing what these CPU spikes are.
    I have a ticket open with Astaro support and will follow up with them.

    Thanks
  • For now if you're not worried about the reporting, just go and disable the accounting reporting.  That "fixed" the CPU spikes for me.

    Go to Reporting->Settings and uncheck Accounting.  Wait 12-24 hours and the spikes should stop.

  • I am now only getting about 40% CPU spikes and no memory hog problems ... see screen shot.

    The CPU usage is still postgres:

    USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
    postgres 15409 44.3  3.1 125668 98212 ?        Rs   18:47   2:26  \_ postgres: reporting reporting [local] SELECT

    I am still interested in knowing what these CPU spikes are.
    I have a ticket open with Astaro support and will follow up with them.

    Thanks


    I'm pretty sure this is the inline reporting, which queries the reporting database every 15 minutes for the latest reporting data. You can run this process manually (/usr/local/bin/gen_inline_reporting_data.plx; it will do no harm to run it manually) to see where the most time is spent at. It will print out every database call that is run on the database, and how much time was spent running it. 
    On a different sidenote I can't see what the problem is - if those spikes were detrimental to the performance of the system an investigation would be in order, but as the graph looks your CPU is rarely doing anything at all. Where's the harm in it doing at least something for it's ROI [:)]

    Regards,
     andreas