Results 1 to 21 of 21

Thread: Optimizing VPS

  1. #1
    Join Date
    Mar 2012
    Location
    Cebu, Philippines
    Posts
    214

    Optimizing VPS

    I have an OpenVZ VPS, CentOS 6, 64bit, WHM/Cpanel installed, Apache 2.2, PHP 5.3.8, MySQL.

    Hardware specs are:
    2048MB RAM
    2048MB VSwap
    4 CPU Core Access

    Most of the time, the CPU load is between 1-2 but my provider only allows 0.9 and below.

    How can I optimize my VPS to help lower CPU load?
    Cebu Web Solutions - Cpanel Web Hosting | Cebu Web Designs

  2. #2
    Join Date
    Dec 2005
    Posts
    3,077
    Firstly you need to figure out what is causing the load, is Apache / MySQL using high CPU or are there other things going on e.g. iowait?

    Switch to Apache 2.4, use MPM Worker or Event and if PHP is really 5.3.8 get that upgraded to 5.3.28 or 5.4.23

  3. #3
    Join Date
    Mar 2012
    Location
    Cebu, Philippines
    Posts
    214
    The load usually get higher when running PHP and MySQL files from each CPanel users.

    Is Apache 2.4 backwards compatible? What are the advantages of Apache 2.4?
    Cebu Web Solutions - Cpanel Web Hosting | Cebu Web Designs

  4. #4
    Join Date
    Oct 2009
    Location
    United States
    Posts
    2,612
    I would recommend to run MySQL tunner on the server and paste the results here, so we can review them.

    Also what type or content are you hosting on the VPS? WordPress?
    Snoork Hosting - Enterprise Servers | DDoS Protected Network
    99.9% Network Uptime | 15 Minute Ticket Response Time | 24/7 Live Chat
    Check Out Our Dedicated Server Specials For Amazing Discounts & Promotions

  5. #5
    Sorry Openvz is S... you need real isolate resource , Openvz was ok 2007 ,but today tech , better running KVM or Xen
    CloudFastservers.com|Cloud VPS Openstack KVM |Cloud VPS Windows
    █ Cloud VPS and Hosting |24/7/365 Support
    █ Data center and servers location: USA Florida, Europe Netherland
    We are *not* a reseller. We own our servers, switches, routers and racks.

  6. #6
    Join Date
    Mar 2012
    Location
    Cebu, Philippines
    Posts
    214
    Most sites uses CMSs like Drupal, Joomla and Wordpress.
    I have put some settings in my.cnf and will monitor it first.

    Will look into KVM, we may use KVM on some of our next VPS.

    Any advantage of using KVM in terms of CPU usage?
    Cebu Web Solutions - Cpanel Web Hosting | Cebu Web Designs

  7. #7
    Join Date
    May 2013
    Location
    United States
    Posts
    180
    Quote Originally Posted by pauloray View Post
    I have an OpenVZ VPS, CentOS 6, 64bit, WHM/Cpanel installed, Apache 2.2, PHP 5.3.8, MySQL.

    Hardware specs are:
    2048MB RAM
    2048MB VSwap
    4 CPU Core Access

    Most of the time, the CPU load is between 1-2 but my provider only allows 0.9 and below.

    How can I optimize my VPS to help lower CPU load?
    You can hire a cheap cPanel server management services such as http://www.mycpadmin.com/ to secure and tweak your server as well as fix any issues that you come across. I also suggest changing your PHP Handler to FCGI as that'll help reduce server load.

    Quote Originally Posted by pauloray View Post
    The load usually get higher when running PHP and MySQL files from each CPanel users.

    Is Apache 2.4 backwards compatible? What are the advantages of Apache 2.4?
    Apache 2.4 is more updated Apache and has tweaks here and there. You can find more info at http://httpd.apache.org/docs/current...tures_2_4.html

  8. #8
    Equal CPU usage that's is the name of the game
    CloudFastservers.com|Cloud VPS Openstack KVM |Cloud VPS Windows
    █ Cloud VPS and Hosting |24/7/365 Support
    █ Data center and servers location: USA Florida, Europe Netherland
    We are *not* a reseller. We own our servers, switches, routers and racks.

  9. #9
    Join Date
    Dec 2006
    Posts
    4,149
    I find nginx to be a more efficient alternative to Apache, give it a shot.
    For a more drop-in replacement to Apache, try Litespeed (free and paid versions available).

    You also want to work on optimizing MySQL - google that.

  10. #10
    Join Date
    Mar 2012
    Location
    Cebu, Philippines
    Posts
    214
    Quote Originally Posted by tsj5j View Post
    I find nginx to be a more efficient alternative to Apache, give it a shot.
    For a more drop-in replacement to Apache, try Litespeed (free and paid versions available).

    You also want to work on optimizing MySQL - google that.
    Thanks.

    Will check Litespeed (Free and Paid) and compare with Nginx.
    Cebu Web Solutions - Cpanel Web Hosting | Cebu Web Designs

  11. #11
    Join Date
    Oct 2009
    Location
    United States
    Posts
    2,612
    Quote Originally Posted by pauloray View Post
    Thanks.

    Will check Litespeed (Free and Paid) and compare with Nginx.
    I would recommend Nginx over LiteSpeed for high traffic sites. I have found Nginx to outperform LiteSpeed.
    Snoork Hosting - Enterprise Servers | DDoS Protected Network
    99.9% Network Uptime | 15 Minute Ticket Response Time | 24/7 Live Chat
    Check Out Our Dedicated Server Specials For Amazing Discounts & Promotions

  12. #12
    Join Date
    Mar 2012
    Location
    Cebu, Philippines
    Posts
    214
    Have you guys tried nginxcp.com on your server?

    Any issue you encounter after installing it?

    Some of our sites use .htaccess, will it be affected after installing nginx?
    Cebu Web Solutions - Cpanel Web Hosting | Cebu Web Designs

  13. #13
    Join Date
    Dec 2007
    Location
    LocalHost
    Posts
    1,303
    Quote Originally Posted by pauloray View Post
    Have you guys tried nginxcp.com on your server?

    Any issue you encounter after installing it?

    Some of our sites use .htaccess, will it be affected after installing nginx?
    Nginxcp is a very good solution for adding nginx on a cPanel server. You may also want to consider paid plugin http://cpnginx.com


    Before applying any tweak, you need to first know what is causing high server load. Can you post the result of following SSH commands.
    Code:
    top
    And then press shift + P


    Code:
    free -m
    YagHost - Pure SSD Hosting | Since 2007 | Average Response Time: 15 min
    Web Hosting | Reseller Hosting | Managed VPS Hosting
    99.9% Server Uptime Guarantee | 24/7 Rapid Response Tech Support | 30 Day Money Back Guarantee
    LopHost.com - Web Hosting Tutorials

  14. #14
    Join Date
    Mar 2003
    Location
    WebHostingTalk
    Posts
    16,947
    Quote Originally Posted by pauloray View Post
    Most of the time, the CPU load is between 1-2 but my provider only allows 0.9 and below.
    They only allow 0.9 load? What is the use of your CPU cores? What happened if you are hosting more php sites?
    Specially 4 You
    .
    JoneSolutions.Com ( Jones.Solutions ) is on the net 24/7 providing stable and reliable web hosting solutions and services since 2001

  15. #15
    Join Date
    Mar 2012
    Location
    Cebu, Philippines
    Posts
    214
    What do you guys prefer?

    The nginxcp (free) or cpnginx (paid)?

    I think the both have the same features.

    Also, if ever I install Nginx on my Cpanel VPS and some websites for error, can I simply uninstall Nginx and will websites will get back to normal right away?

    I am thinking of using Nginx but I want to make sure that it will not harm existing websites on our servers.
    Cebu Web Solutions - Cpanel Web Hosting | Cebu Web Designs

  16. #16
    Join Date
    Oct 2009
    Location
    United States
    Posts
    2,612
    Quote Originally Posted by pauloray View Post
    What do you guys prefer?

    The nginxcp (free) or cpnginx (paid)?

    I think the both have the same features.

    Also, if ever I install Nginx on my Cpanel VPS and some websites for error, can I simply uninstall Nginx and will websites will get back to normal right away?

    I am thinking of using Nginx but I want to make sure that it will not harm existing websites on our servers.
    I have used both NginxCP and CPNginx. I prefer the NginxCP thought.

    Yes, you can simply run the uninstall command and it will return everything back to as it was previously.
    Snoork Hosting - Enterprise Servers | DDoS Protected Network
    99.9% Network Uptime | 15 Minute Ticket Response Time | 24/7 Live Chat
    Check Out Our Dedicated Server Specials For Amazing Discounts & Promotions

  17. #17
    Join Date
    Mar 2012
    Location
    Cebu, Philippines
    Posts
    214
    Quote Originally Posted by Snoork Hosting View Post
    I have used both NginxCP and CPNginx. I prefer the NginxCP thought.

    Yes, you can simply run the uninstall command and it will return everything back to as it was previously.
    Thanks.

    As what I understood, if I install NginxCP, this does not replace Apache, right?

    If it does not replace Apache, and I want to install modules like mod_pagespeed, I should still use the guide for installing mod_pagespeed for Nginx server, right?
    Cebu Web Solutions - Cpanel Web Hosting | Cebu Web Designs

  18. #18
    Join Date
    Feb 2013
    Posts
    83
    I think it is time to move forward for a new vps (on xen or KVM) , you can also buy a second vps for mysql database. It is always better to have your clients mysql in other server.

  19. #19
    Join Date
    Oct 2009
    Location
    United States
    Posts
    2,612
    Quote Originally Posted by pauloray View Post
    Thanks.

    As what I understood, if I install NginxCP, this does not replace Apache, right?

    If it does not replace Apache, and I want to install modules like mod_pagespeed, I should still use the guide for installing mod_pagespeed for Nginx server, right?
    Correct. NginxCP works along with Apache.

    If I'm correct, you should follow the installation guide for Apache.
    Snoork Hosting - Enterprise Servers | DDoS Protected Network
    99.9% Network Uptime | 15 Minute Ticket Response Time | 24/7 Live Chat
    Check Out Our Dedicated Server Specials For Amazing Discounts & Promotions

  20. #20
    Quote Originally Posted by pauloray View Post
    What do you guys prefer?

    The nginxcp (free) or cpnginx (paid)?

    I think the both have the same features.

    Also, if ever I install Nginx on my Cpanel VPS and some websites for error, can I simply uninstall Nginx and will websites will get back to normal right away?

    I am thinking of using Nginx but I want to make sure that it will not harm existing websites on our servers.
    Only issue I found with using nginxcp is it can affect cPanel traffic statistics and that Apache status shows requests coming from server IP instead of the real IP. You do not get those issues when using LiteSpeed out of the box, so LiteSpeed definitely has an advantage there.

  21. #21
    Join Date
    Oct 2009
    Location
    United States
    Posts
    2,612
    Quote Originally Posted by HostXNow View Post
    Only issue I found with using nginxcp is it can affect cPanel traffic statistics and that Apache status shows requests coming from server IP instead of the real IP. You do not get those issues when using LiteSpeed out of the box, so LiteSpeed definitely has an advantage there.
    I think they implemented the mod_rpaf into the NginxCP few months ago, which now show's the user's IP instead of the server's IP.
    Snoork Hosting - Enterprise Servers | DDoS Protected Network
    99.9% Network Uptime | 15 Minute Ticket Response Time | 24/7 Live Chat
    Check Out Our Dedicated Server Specials For Amazing Discounts & Promotions

Similar Threads

  1. Help Optimizing VPs
    By QuickCloudDeploy in forum VPS Hosting
    Replies: 20
    Last Post: 03-26-2012, 10:26 PM
  2. No use in optimizing VPS
    By lottos in forum VPS Hosting
    Replies: 26
    Last Post: 10-03-2010, 05:47 PM
  3. Need Help Optimizing my VPS
    By Xtreme2damax in forum Hosting Security and Technology
    Replies: 11
    Last Post: 07-18-2010, 12:32 PM
  4. Replies: 10
    Last Post: 03-03-2010, 09:20 PM
  5. VPS Optimizing
    By GazCBG in forum Hosting Security and Technology
    Replies: 1
    Last Post: 02-13-2007, 05:49 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •