Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

Vesta CP high CPU usage during backup

General questions about VestaCP
Post Reply
  • Print view
Advanced search
13 posts
  • 1
  • 2
  • Next
darkworks
Posts: 21
Joined: Wed Jan 20, 2016 5:10 am
Contact:
Contact darkworks
Website

Os: Debian 7x
Web: apache + nginx
Vesta CP high CPU usage during backup
  • Quote

Post by darkworks » Thu Aug 18, 2016 6:23 am

Hi
i have noticed that vesta cp is using high cpu during backup , i checked backup menu and run time was 8 hours , although i have just 5 websites , and when i checked graphs , it was it peaks during those 8 hours .

any idea to tweak it so that it not use so much cpu during daily backup process

thanks
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: Vesta CP high CPU usage during backup
  • Quote

Post by tjebbeke » Thu Aug 18, 2016 1:56 pm

Do you have a big database with much records?
Top

darkworks
Posts: 21
Joined: Wed Jan 20, 2016 5:10 am
Contact:
Contact darkworks
Website

Os: Debian 7x
Web: apache + nginx
Re: Vesta CP high CPU usage during backup
  • Quote

Post by darkworks » Fri Aug 19, 2016 1:57 am

ya one database with 2gb size
Top

SS88
Posts: 336
Joined: Thu Nov 19, 2015 12:40 pm

Re: Vesta CP high CPU usage during backup
  • Quote

Post by SS88 » Fri Aug 19, 2016 6:55 am

This is expected - but perhaps not 8 hours.

How large are your websites combined?
Do you know the processing power of the server you are on?
Are you on SSD drives?
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Vesta CP high CPU usage during backup
  • Quote

Post by mehargags » Fri Aug 19, 2016 7:08 am

Together with the questions asked before,
what kind of VPS do you use ? is it an OpenVZ or KVM ?
Who is your provider ?

It is entirely possible that your CPU is capped (many overselling providers do it) or your disk performance is really very low.

run some ioping benckmarks for disk and then do some CPU/RAM benchmarks and see what score you get.

8 hours time to backup is extremely bad thing... imagine if your DB tables are locked for hours to backup, your site users will be experiencing errors while transaction requests are sent to MySQL. Definitely try to find the problem ASAP.

If you need help send me PM with SSH details of your Server... I'll be happy to look into it!
Top

darkworks
Posts: 21
Joined: Wed Jan 20, 2016 5:10 am
Contact:
Contact darkworks
Website

Os: Debian 7x
Web: apache + nginx
Re: Vesta CP high CPU usage during backup
  • Quote

Post by darkworks » Fri Aug 19, 2016 9:52 am

ya i have 4 cores of cpu and 4 GB ram , and total sites could be 500 MB in size ... but one db is large 2 gb . i have vps from ssdnodes and ya drives are SSD

benchmark


CPU model: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
Number of cores: 4
CPU frequency: 2399.911 MHz
Total amount of RAM: 4096 MB
Total amount of swap: 0 MB
System uptime: 16 days, 15:45,
I/O speed: 10.7 MB/s
Bzip 25MB: 6.35s
Download 100MB file: 118MB/s



i have write my hosting company let see what they say about 10 mb i/o :(
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Vesta CP high CPU usage during backup
  • Quote

Post by mehargags » Sat Aug 20, 2016 6:38 am

[quote="darkworks"]ya i have 4 cores of cpu and 4 GB ram , and total sites could be 500 MB in size ... but one db is large 2 gb . i have vps from ssdnodes and ya drives are SSD


do a proper Benchmark using

1

Code: Select all

wget https://freevps.us/downloads/bench.sh
chmod +x bench.sh
./bench.sh

Code: Select all

iperf -c $host -P1 -t 60 -i 10

Code: Select all

apt-get install ioping fio hdparm -y

ioping -c 10 .

fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randwrite
####### PHP Benchmark ############

Code: Select all

wget http://www.php-benchmark-script.com/bench.zip
unzip bench.zip && rm -f bench.zip && mv bench.php phpbench.php
php phpbench.php
Top

darkworks
Posts: 21
Joined: Wed Jan 20, 2016 5:10 am
Contact:
Contact darkworks
Website

Os: Debian 7x
Web: apache + nginx
Re: Vesta CP high CPU usage during backup
  • Quote

Post by darkworks » Sat Aug 20, 2016 2:21 pm

did prooper benchmark

System Info
-----------
Processor : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
CPU Cores : 4
Frequency : 2399.911 MHz
Memory : 4096 MB
Swap : 0 MB
Uptime : 1 day, 3:00,
Speedtest (IPv4 only)
---------------------
Your public IPv4 is 104.255.231.24

Location Provider Speed
CDN Cachefly 64.6MB/s

Atlanta, GA, US Coloat 54.0MB/s
Dallas, TX, US Softlayer 103MB/s
Seattle, WA, US Softlayer 41.2MB/s
San Jose, CA, US Softlayer 42.4MB/s
Washington, DC, US Softlayer 41.9MB/s

Tokyo, Japan Linode 10.9MB/s
Singapore Softlayer 5.44MB/s

Rotterdam, Netherlands id3.net 13.7MB/s
Haarlem, Netherlands Leaseweb 150MB/s
Disk Speed
----------
I/O (1st run) : 372 MB/s
I/O (2nd run) : 218 MB/s
I/O (3rd run) : 211 MB/s
Average I/O : 267 MB/s
write: io=4096.0MB, bw=13362KB/s, iops=3340, runt=313887msec
cpu : usr=0.58%, sys=3.60%, ctx=283192, majf=0, minf=24
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.1%, >=64=0.0%
issued : total=r=0/w=1048576/d=0, short=r=0/w=0/d=0
latency : target=0, window=0, percentile=100.00%, depth=64

Run status group 0 (all jobs):
WRITE: io=4096.0MB, aggrb=13362KB/s, minb=13362KB/s, maxb=13362KB/s, mint=3138 87msec, maxt=313887msec
php benchmark

test_math : 1.345 sec.
test_stringmanipulation : 1.259 sec.
test_loops : 1.019 sec.
test_ifelse : 0.626 sec.
--------------------------------------
Total time: : 4.249 sec.
ok its fixed , it was due to smarty cache junk ... i excluded them from backup , now backup duration is 4 min

thanks
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Vesta CP high CPU usage during backup
  • Quote

Post by mehargags » Sun Aug 21, 2016 1:18 pm

Good catch!

some PHP frameworks create a /tmp directory with thoursands, millions of small session files that can be a pain for backup.
I had this problem with cakephp for 4 sites before, so what I usually do is goto -> Backup -> exclusions-> in Web-> put the /tmp or /cache directories location.

This way the backup will NOT try to backup those temp folders
Top

darkworks
Posts: 21
Joined: Wed Jan 20, 2016 5:10 am
Contact:
Contact darkworks
Website

Os: Debian 7x
Web: apache + nginx
Re: Vesta CP high CPU usage during backup
  • Quote

Post by darkworks » Sun Aug 21, 2016 6:00 pm

mehargags wrote:Good catch!

some PHP frameworks create a /tmp directory with thoursands, millions of small session files that can be a pain for backup.
I had this problem with cakephp for 4 sites before, so what I usually do is goto -> Backup -> exclusions-> in Web-> put the /tmp or /cache directories location.

This way the backup will NOT try to backup those temp folders


ya i did the same :)
Top


Post Reply
  • Print view

13 posts
  • 1
  • 2
  • Next

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password