Scripts and database queries are stressing the cpu

Discussion regarding Joomla! 2.5 Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
playtony
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Sat Nov 03, 2012 11:38 pm

Scripts and database queries are stressing the cpu

Post by playtony » Tue Dec 18, 2012 11:57 am

I did upgrade 3 days ago to Joomla 2.5.8 from 1.7, but also did upgraded some extensions. My site is running now very slow, and keeps crashing always when I reach about 100 visitors at same time :'(

I asked my hosting provider for help, and got this message:

"its no server problem, this depends on your scripts. You could access through ssh as user and type in the command top. Here you can see that the scripts and database queries are stressing the cpu of the system:

29654 redstarb 20 0 219m 61m 37m R 100 0.8 0:48.16 php53.fcgi
29665 redstarb 20 0 224m 61m 33m R 100 0.8 0:44.07 php53.fcgi
29669 redstarb 20 0 207m 45m 33m R 96 0.6 0:40.35 php53.fcgi
18005 mysql 20 0 384m 100m 7744 S 90 1.3 3116:03 mysqld
29667 redstarb 20 0 226m 60m 29m S 67 0.8 0:22.13 php53.fcgi
29650 redstarb 20 0 226m 62m 32m S 63 0.8 0:31.99 php53.fcgi
29658 redstarb 20 0 218m 58m 34m S 22 0.7 0:45.21 php53.fcgi
29648 redstarb 20 0 221m 62m 36m S 16 0.8 0:34.51 php53.fcgi
29663 redstarb 20 0 208m 45m 32m R 4 0.6 0:30.50 php53.fcgi"

Could you maybe assist with this problem, as it is above my knowledge?

Thanks!

User avatar
sitesrus
Joomla! Ace
Joomla! Ace
Posts: 1469
Joined: Mon Nov 12, 2012 10:48 pm

Re: Scripts and database queries are stressing the cpu

Post by sitesrus » Tue Dec 18, 2012 6:16 pm

It's strange that you weren't experiencing these problems before...I wouldn't expect an updated Joomla and extensions to be a lot "heavier" than they were before.

Sometimes you just need better hardware. Switching to VPS and dedicated gives you better hardware to handle the stress that's dedicated to your site and not shared, and you can additionally install software to better optimize your platform (like apache modules, php opcode caches, etc.). It's more pricy but cheaper shared hosting has its limits :(.

Aside from Joomla or third party developers modifying they're code, i'm not sure what you can do.

Try using forum post assistant so we can see your details in a safe manner for your server. Provide an url so we can profile your site in firebug and even try it on a site or two that gives loading time information.

Good luck!
I like working with Joomla :). I offer the following professional services: Custom extension development, SEO/marketing, maintenance/support, security and WCAG audits, and will work on websites at a reasonable rate.

playtony
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Sat Nov 03, 2012 11:38 pm

Re: Scripts and database queries are stressing the cpu

Post by playtony » Tue Dec 18, 2012 6:37 pm

Thank you very much for your reply! My website address is www.redstarbelgrade.info

I do have a dedicated managed server at Hetzner, so it is very strange that it cannot handle more that 150 visitors at same time, and just few days ago it was easily over 500.

I also do recall creating sitemap.xml at the same time. Could this cause this issue? I deleted it from server today, but my issue still remains...

User avatar
sitesrus
Joomla! Ace
Joomla! Ace
Posts: 1469
Joined: Mon Nov 12, 2012 10:48 pm

Re: Scripts and database queries are stressing the cpu

Post by sitesrus » Tue Dec 18, 2012 6:55 pm

Sitemap is just a nice markup file for crawlers to look at like google to give you better rankings.

If it's your own server you can:

1)Install and optimize an opcode cache like APC (cache php so it's faster) which will help all php and configure joomla settings to use that cache (more benefit)
2)Modify mysql configuration to do more caching so you can query less
3)Install apache modules mod_gzip or mod_deflate to compress content
4)set up .htaccess directives to cache content on clients machines longer
5)Modify your server settings to spawn more processes for connection and allow more overall connections to your server
6)Use joomla caching

What are your hardware specs for the machine? A lot of my suggestions use more memory and cpu which I think is a good trade off for speed and performance, but it costs more for better hardware.

Even look into hosting your database on another cheaper vps and caching the crap out of it and having your site on your current machine.

Look into using a CDN (content delivery network) to spread your content across nodes closer to clients to relieve load on your servers and speed up their visits.
I like working with Joomla :). I offer the following professional services: Custom extension development, SEO/marketing, maintenance/support, security and WCAG audits, and will work on websites at a reasonable rate.


Locked

Return to “Performance - Joomla! 2.5”