Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Aug 04, 2004 3:00 pm 
Offline
Senior Newbie

Joined: Wed Aug 04, 2004 2:51 pm
Posts: 11
Hi guys
I'm not really a linux guru, but i have already searched google and all the forums i could find w/o a solution.

My linode 64 is running a debian config, with the latest php, sql and apache 1.3.

Everytime there is a sql query server load goes high, cpu usage can be 100% on a simple query for a phpbb, thus a very slow loading of my pages.

i'm not getting that many hits, and from top i can see i'm the only one trying to access the pages, and i see the mysql taking 90-100% of the cpu for some time

I run Exhibit engine for photo galleries, and sql queries often take 1500-5000 millisec

here's an example of my photo site : http://www.underwaterpics.org/
and for a phpbb (sorry it's in french language) : http://diabeteplongee.com/phpBB2/

i'm not sure of what to do :(
do i need to upgrade to a larger linode ? i'm affraid it's a config problem and that it still be slow with a more expensive setup

thanks !

Alex


Top
   
PostPosted: Thu Aug 05, 2004 11:32 am 
Offline
Junior Member

Joined: Thu May 13, 2004 8:08 am
Posts: 27
Hi there,

I rent a linode64 (with Debian) as well, and I have quite several dynamic websites running with acceptable performance. I'm using various CMSs and scripts as well - Mambo, drupal, phpwiki, etc; no problem.

But indeed some CMS / script can hit even a powerful server rather hard. I remember an article that compares various CMSs, where the worst are about 50x slower than the fastest !

I thought Exhibit is the culprit, but then I realise that phpbb is having performance problem as well... (phpbb is quite light on server resources)

Sorry if this is not helping you directly - but basically I think this is indeed config issue, the server should be already adequate for your need.


cheers, HS


Alexis2 wrote:
Hi guys
I'm not really a linux guru, but i have already searched google and all the forums i could find w/o a solution.

My linode 64 is running a debian config, with the latest php, sql and apache 1.3.

Everytime there is a sql query server load goes high, cpu usage can be 100% on a simple query for a phpbb, thus a very slow loading of my pages.

i'm not getting that many hits, and from top i can see i'm the only one trying to access the pages, and i see the mysql taking 90-100% of the cpu for some time

I run Exhibit engine for photo galleries, and sql queries often take 1500-5000 millisec

here's an example of my photo site : http://www.underwaterpics.org/
and for a phpbb (sorry it's in french language) : http://diabeteplongee.com/phpBB2/

i'm not sure of what to do :(
do i need to upgrade to a larger linode ? i'm affraid it's a config problem and that it still be slow with a more expensive setup

thanks !

Alex


Top
   
 Post subject:
PostPosted: Thu Aug 05, 2004 11:40 am 
Offline
Senior Newbie

Joined: Fri Apr 23, 2004 3:08 pm
Posts: 19
You can try tweaking your my.cnf to use less memory. Here are the relavent lines in mine:

Code:
[mysqld]
skip-innodb
skip-bdb

skip-locking
key_buffer=16k
max_allowed_packet=1M
table_cache = 4
sort_buffer_size = 64K
net_buffer_length = 2K
thread_stack=64K
# keep secure by default!
##bind-address    = 127.0.0.1
##port          = 3306
# this can make it even more secure:
skip-networking


If you use innodb or bdb, then you wouldn't add those lines. Also, all connections to my database happen through a socket, so I do not even need networking support. You should run a 'ps aux' command before and after to see how much the memory usage went down. After you edit this file, you will have to restart mysqld.

Hope this helps.
-John


Top
   
 Post subject:
PostPosted: Thu Aug 05, 2004 1:41 pm 
Offline
Senior Member

Joined: Wed Oct 29, 2003 12:27 pm
Posts: 50
Don't forget that indexes can make a huge difference to database performance. You might want to somehow check to see if those slow queries are using indexes properly. The authors of the software should have done this but .... you never know.

I had several sites happily running PHP and MySQL for quite some time on a Linode 64. I eventually went to a 96 but my main memory hog was Spamassassin.

Cheers
Ross


Top
   
PostPosted: Thu Sep 02, 2004 10:01 pm 
Offline

Joined: Thu Sep 02, 2004 9:33 pm
Posts: 1
I run spamassasin on linode64 with mysql etc.. how much difference did the extra 32 ram make by moving to a linode 96?

I have also found that by tuning the my.cnf file, purging the ib_logfiles in the mysql data folder and the ibdata file (with mysql not running of course) I have quite drastically reduced both my load average and the performance hit of the mysql processes.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group