By Pushkar Gaikwad on
ok, my host pulled the plug of mysql because it was making 38 queries (whatever that means). I am on fairly powerful VPS and the site is not big at all, so now I need to know how to optimize drupal and more important mysql for better performance ? any ideas,tips,suggestion and links to resources will be highly appreciated.
Comments
A VPS host pulled the plug because of too many queries?
That doesn't sound right - a VPS host shouldn't care how many queries you run (a shared host would though). It is up to them to put a hard limit on your slice of the total RAM/CPU etc, and you should be free to overload your virtual server to your hearts desire without them looking over your shoulder.
Anyway, 38 queries is a tiny number. I would go looking for a better host.
--
Anton
New to Drupal? | Troubleshooting FAQ
Example knowledge base built with Drupal
subscribing to thread I'm
subscribing to thread
I'm going to be running a school website, and I have real concerns about the resources drupal is going to use when 100 pupils average (400 peak) all access it at the same time. My host is great, but they have a 'three strikes and you're out' policy. I'm interested in *any* ways of obtaining information about what drupal does in the background and how much of the webhost resources are used.
It might help someone answer your question if you list the modules you have installed and how often cron is run.
I think you can exhaust your php memory and sql limits by making a complex 'view' with the view module.
Do you use 'Views' much?
Is there a 'throttle' module in v5.x? If you can find out what specific activities are loading your sql (eg. Search), you can make them unavailable when too many users access the site.
Do you use drupal caching at all?
Cheers
Heavyweight?
Views and CCK are momory-hungry, and so are also media-oriented modules, especially those resizing images.
Drupal is recommended to run with no less the 64Mb ram (php memory limit), but 96Megis or more would be required for larger amounts of people. 64M or 96M is *not* a lot today.
Then, you should enable caching - the non-aggressive caching speeds up performance significantly, for non-athenticated users.
- Alexei Rayu.
Drupal Related Services | SiteHound Drupal Free Distro
Caching is the key to reducing DB queries
Well, you can install Devel module, and enable SQL query logging to see what the queries are, and roughly where the queries come from. The first step will be to enable Normal Caching in /admin/settings/performance, but it's basically normal for Drupal to use quite a few SQL queries for logged-in users (depends on what modules you've got installed/enabled).
If your VPS has the ability to do so, you might look at some of the caching modules: memcache, advanced caching, boost, fastpath_fscache, block cache, etc. All of these will reduce the number of queries your webserver makes to your SQL server, the amount of CPU consumed to serve pages, and make it faster too.
Perhaps the notes from a presentation I did a while back will help? http://taniwhasolutions.com/files/DrupalCachingAndOptimizationStrategies...
"38 queries"?? What are they talking about. Per second?