Sign Up for OSTraining

Welcome, Guest
Username: Password: Remember me

TOPIC: drupal cpu throttling

drupal cpu throttling 1 year 1 month ago #43667

Hello ostraining super team!

I found my website (www.livigncitymagazine.com) extremely slow in the past weeks and learned about something called cpu throttling. I found some solutions in my website host (bluehost) but it is all information that I don't understand. I found in drupal.org that there is a module called "throttle", and I wonder if that could be a solution for my problem.
Thank you for any advice you can give me.

Sincerely,
Mariana :)
Please become a member of OSTraining to reply to this post.

drupal cpu throttling 1 year 1 month ago #43672

  • edandrea
  • edandrea's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 3106
  • Thank you received: 7
  • Karma: 0
Hi Mariana,

Throttle is used to slow things down, more than to speed things up. It's primary use is to stop denial of service attacks or some kind of flood of users trying to access the site at on time.

It is also used in Drupal by some modules to turn off things like images or processes that aren't needed, so it can help create a lighter page that will load faster.

Throttling service on a server is usually used in a shared server environment. The server will "throttle" your account to keep you from using too much CPU time and making it inaccessible to other accounts.

If your account is being throttled by the server, it usually means that your site uses too much cpu power. The bluehost information points to some of the things that cause heavy cpu loads.

A common cause is MySQL data base queries. If you have a module or a app that is data base intensive, it uses up a lot of cpu time communicating with the data base. That's why they suggest data base repair as one of the solutions.

The throttle module probably won't help your site speed. There are other, more basic issues to deal with first.

Cheers,
Ed
Please become a member of OSTraining to reply to this post.

drupal cpu throttling 1 year 1 month ago #43689

Hi Ed,
thanks for replying.
Well, I recently started many projects in the website that load constantly the users roles and updates it time to time. It is a work in progress that will lead to importing a local database on MySQL. I am afraid that these latest steps are taking too much time and causing this CPU throttling issue. I checked the CPU throttling page on bluehost and it looks very scary since pages are taking hundreds of thousands of seconds to load.
My question now is: I believe that a data base repair needs to be done, but I have no idea on how to do it; and what do you mean with "more basic issues to deal with first"?

Thank you for your great help and clarification.

Kind regards,
Mariana :)
Please become a member of OSTraining to reply to this post.

drupal cpu throttling 1 year 1 month ago #43691

  • edandrea
  • edandrea's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 3106
  • Thank you received: 7
  • Karma: 0
Hi Mariana,

Is your host using cPanel? if so you can click on the mysql data base icon and there is a utility there to repair the data base. If there are is a lot of activity you might want to do this on a regular basis. Go back to your bluehost solutions and check out the section on data base repair.
What are some Simple Steps you can perform to try to fix your database issues?

You can run a repair on all your databases. In the cPanel, click on the MySQL Databases icon and in the Repair section, choose a database to repair. You can safely run a Check and Repair routine on all of your databases.
You can try to optimize all of your databases. In the cPanel, click the PHP MyAdmin icon. On the next screen, choose a database name from the left side column. When the tables appear on the main screen, scroll to the bottom and click the link "Select All". Next, use the drop-down menu, and on the bottom, choose the "Optimize" option. You can do this optimize routine to all of the tables in all of your databases.

Performing these two simple steps will not harm your important data as these steps above are non-intrusive maintenance routines. As such, they may not fix the core issue as well. For instance, if you have severe data corruption, it can cause your queries to time out before they fully execute. Data corruption can be difficult to detect, and repair. Database corruption can occur if a database operation did not completely succeed. Partial data is a form of corruption which can break Referential Integrity, causing your web application to fail also. In short, the free Repair or Optimization routines that I just mentioned may not be sufficient to fix severe database corruption.

By more basic issues, I meant finding out which scripts are causing the most activity and disabling them or see what can be done to make them more efficient and getting rid of anything unnecessary. Adding the throttle module will just confuse the issue at this point.

Keep at it!

Cheers,
Ed
Please become a member of OSTraining to reply to this post.

drupal cpu throttling 1 year 1 month ago #43694

Thanks Ed!
I found out that I can see in the tmp folder a mysql_slow_query file that shows me what makes things slow. I saw it, but I cannot understand much of it. I recognize the database listed and some rows were problems occur.
If you don't mind, I am pasting the biggest file from today here. I hope it's fine :)
Can you help me figure out what all this means and how I can get rid of all these problems.

Sincerely, Mariana :)
# Thu Apr 12 09:02:38 2012
# Query_time: 1.586508 Lock_time: 0.001055 Rows_sent: 1 Rows_examined: 1
use livingci_livingupdated;
SET timestamp=1334242958;
SELECT message FROM uc_store_footers WHERE path_hash = '92fd05d8ffd92d564bac616903a6c8bf'

# Thu Apr 12 09:36:23 2012
# Query_time: 6.502032 Lock_time: 0.008239 Rows_sent: 0 Rows_examined: 29479
use livingci_livingupdated;
SET timestamp=1334244983;
SELECT t.word AS realword, i.word FROM search_total t LEFT JOIN search_index i ON t.word = i.word WHERE i.word IS NULL

# Thu Apr 12 09:42:37 2012
# Query_time: 1.019890 Lock_time: 0.000092 Rows_sent: 1 Rows_examined: 1
use livingci_livingupdated;
SET timestamp=1334245357;
SELECT n.nid, n.type, n.language, n.uid, n.status, n.created, n.changed, n.comment, n.promote, n.moderate, n.sticky, n.tnid, n.translate, r.vid, r.uid AS revision_uid, r.title, r.body, r.teaser, r.log, r.timestamp AS revision_timestamp, r.format, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE n.nid = 1469
Please become a member of OSTraining to reply to this post.

drupal cpu throttling 1 year 1 month ago #43703

  • edandrea
  • edandrea's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 3106
  • Thank you received: 7
  • Karma: 0
I'm sorry I'm not that much of a data base expert. This may be beyond the scope of what we can do. I'll ask Nick to take look at it and see if he has a suggestion. You might need to find more of a specialist.

Ed
Please become a member of OSTraining to reply to this post.

drupal cpu throttling 1 year 1 month ago #43704

Thank you, Ed.
I appreciate your help. If you know any specialist or company that could help us, please let me know.

Mariana :)
Please become a member of OSTraining to reply to this post.

drupal cpu throttling 1 year 1 month ago #43706

  • edandrea
  • edandrea's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 3106
  • Thank you received: 7
  • Karma: 0
I put a shout out to the rest of the team. We'll get their input. I don't like to give up too easy.

Cheers,
Ed
Please become a member of OSTraining to reply to this post.

Sign Up for OSTraining

Powered by Kunena Forum

Open Source Training is not affiliated with or endorsed by the Joomla, WordPress or Drupal projects.
All product names and trademarks are the property of their respective owners.

Copyright 2013 Open Source Training, LLC. All rights reserved.