Announcement Announcement Module
Collapse

myhosting.com Forum Guidelines

Welcome to the myhosting.com Forums! The purpose of this forum is to allow you to discuss topics relating to hosting and topics of interest with other myhosting.com Customers. The primary focus should relate to issues not generally included in our Wiki or Control Panel, or information not provided by our Customer Support Team. Some examples include programming and coding support, web site design ideas and SEO practices.

The forum is not meant as a replacement to our Wiki or Customer Support. We highly recommend searching our Wiki before posting on the forum. Also, if you have a question for our Customer Support team, please contact them as you would normally.

We ask that if you have any complaints or questions relating specifically to your account, that you address them to our Customer Support department. Do not post personal account information such as passwords or other sensitive and private information the forum, as this type of information is best kept secret. Also, please be respectful of other users and refrain from defamatory comments or use of coarse language.

We will visit the forum from time to time, and contribute to various topics. We reserve the right to delete any posts which are deemed offensive or against the spirit of the forum. Any spamming or illegal activity will not be tolerated. We also reserve the right to block any user who violates these guidelines.

To get started, we welcome you to sign up at our User Management site. Any account created there will have access to these forums, our Wiki, our Ideas site and commenting permission on our Status Blog.
See more
See less
Performance Tuning Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Performance Tuning

    Hello.

    I have a VPS with these features:
    • Intel(R) Xeon(R) CPU E5-2430 0 @ 2.20GHz, 11 cores
    • Real memory of 1024 MB total
    • OpenVZ Network Interface
    • CentOS Linux 6.4
    • Apache version 2.2.15
    • PHP Version 5.3.3
    • MySQL version 5.1.69

    I am just running a high performance long running PHP script that uses thread ans so it is scalable. I need the full performance from my VPS, but the script is doing its work very slow. Then I realized that when the script was running the max CPU and Memory usage was just 4% and 20% respectively.

    In this case, how can I get full performance from my VPS? Maybe setting it up properly? Any idea?

  • #2
    PS: the script does a lot of HTTP Post and Database operation.

    Comment


    • #3
      Chances are good CPU is not your bottleneck especially if you are seeing consistent performance (even if consistently slow performance with no major peaks or spikes). Have you checked your database for areas of optimization or PHP memory allocations?

      For database optimization, MySQL tuner (https://github.com/major/MySQLTuner-perl) can do great things, but it's not for the faint of heart as it requires that you monitor the situation over time and gather performance metrics to take a look at the impact of your changes. As usual, before you make any major changes, make backups so you can revert back

      Also, are you running a control panel like Plesk or cPanel? If so, you should be able to adjust your PHP memory configurations per vhost also.

      Comment


      • #4
        Thanks for you reply, Jeremya.

        I will check MySQL Tuner.

        Some updates: I just started 2 instances of my script and I got the double of work done, ans do my CPU and memory usage reached the double of before too. So I am pretty sure that somehow the server is limiting the resources of my script.

        Comment


        • #5
          Hi innbativel,

          That's more than possible and often is simply a result of limitations set by apache and/or your php module configuration (all of which can be altered within your VPS). The default configurations are designed for websites and limited to ensure all processes can run adequately without hogging all of the server resources.

          Comment


          • #6
            This would also imply your database is not the bottleneck

            Comment


            • #7
              Yes

              But I don't have experience doing this, so I would really apreciate if someone help me.

              So basically I need to give all my VPS resources to one script that will run in background (via cron job) everyday for many hours.

              Any idea?

              Comment


              • #8
                I mean, I need this script to run with no limits: no Memory limit, no CPU limit, no Database limits, no Bandwidth limits. I need this script to run at its best performance and I won't use this server for nothing else.

                Again, this script uses threads and does a lot of HTTP Post and Database operations.

                Comment


                • #9
                  Hi innbativel,

                  Could you run the test one more time? Some minor adjustments have been made to the configuration very recently and I'm curious to know if those have an impact on the speed in which your script functions (and secondarily whether that affects the resource consumption of the script on your VPS).

                  Comment


                  • #10
                    Hi innbativel,

                    Any luck?

                    Comment

                    Working...
                    X