Jump to content

New VPS and high CPU usage


Guest markopolo2002

Recommended Posts

Posted

Hi guys, wondering if any can help steer me in the right direction here. We've just moved from shared hosting across to VPS hosting and have 6 sites on the same VPS. They're all PHP and other than my main site they aren't generating much traffic as they are still in eary days.

My main site however is generating decent traffic although since we moved to the VPS I've definately noticed a decrease in the sites performance. Pages are sluggish and dare I say it shared hosting performed better!. If anyone can offer any advice I'd really appreciate it :)

Linux CentOS-5
2048MB RAM (Burstable 4096MB)
3.8Ghz CPU
MYSQL 5.0.67-community
PHP: 5.2.8 (apache2handler)

my.cnf file ...

[mysqld]

skip-bdb


[mysqld]

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

skip-locking

#skip-innodb

query_cache_limit=8M

query_cache_size=256M

query_cache_type=1

max_connections=500

max_user_connections=10

interactive_timeout=20

wait_timeout=20

connect_timeout=6

thread_cache_size=128

key_buffer=512M

join_buffer=1M

max_allowed_packet=16M

table_cache=1024

record_buffer=1M

sort_buffer_size=2M

read_buffer_size=2M

max_connect_errors=10

# Try number of CPU's*2 for thread_concurrency

thread_concurrency=8

myisam_sort_buffer_size=64M

#log-bin

server-id=1


[mysqldump]

quick

max_allowed_packet=16M


[mysql]

no-auto-rehash

#safe-updates


[isamchk]

key_buffer=256M

sort_buffer=256M

read_buffer=16M

write_buffer=16M


[myisamchk]

key_buffer=256M

sort_buffer=256M

read_buffer=16M

write_buffer=16M

System Processes ...

top - 18:33:33 up  1:31,  1 user,  load average: 0.11, 0.19, 0.23

Tasks:  51 total,   1 running,  48 sleeping,   0 stopped,   2 zombie

Cpu(s):  2.0% us,  0.9% sy,  0.0% ni, 97.1% id,  0.0% wa,  0.0% hi,  0.0% si

Mem:   3686400k total,   534652k used,  3151748k free,		0k buffers

Swap:		0k total,		0k used,		0k free,		0k cached


  PID USER	  PR  NI  VIRT  RES  SHR S %CPU %MEM	TIME+  COMMAND			

11567 nobody	15   0 28312  15m 3596 S	2  0.4   0:06.75 httpd			  

 6133 nobody	15   0  2108  916  728 R	2  0.0   0:00.02 top				

	1 root	  16   0  1980  656  568 S	0  0.0   0:00.03 init			   

16016 root	  16   0  1644  568  480 S	0  0.0   0:00.13 syslogd			

16019 root	  18   0  1588  400  336 S	0  0.0   0:00.00 klogd			  

16027 root	  16   0  1568  420  356 S	0  0.0   0:00.00 courierlogger	  

16028 root	  16   0  1928  624  520 S	0  0.0   0:00.00 authdaemond		

16030 root	  16   0  1928  372  256 S	0  0.0   0:00.08 authdaemond		

16031 root	  15   0  1928  372  256 S	0  0.0   0:00.07 authdaemond		

16044 root	  16   0  6960 1048  668 S	0  0.0   0:00.00 sshd			   

16060 root	  19   0  2636  864  700 S	0  0.0   0:00.00 xinetd			 

16153 root	  20   0  1572  344  288 S	0  0.0   0:00.00 courierlogger	  

16154 root	  18   0  1680  516  440 S	0  0.0   0:00.01 couriertcpd		

16163 root	  18   0  1572  344  288 S	0  0.0   0:00.00 courierlogger	  

16164 root	  18   0  1680  516  440 S	0  0.0   0:00.01 couriertcpd		

16171 root	  15   0  1572  424  356 S	0  0.0   0:00.10 courierlogger	  

16172 root	  15   0  1680  536  460 S	0  0.0   0:00.08 couriertcpd		

16180 root	  21   0  1572  344  288 S	0  0.0   0:00.00 courierlogger	  

16181 root	  18   0  1680  516  440 S	0  0.0   0:00.01 couriertcpd		

16234 mailnull  16   0 10120 1184  696 S	0  0.0   0:00.01 exim			   

16245 mailnull  18   0 10120 1112  636 S	0  0.0   0:00.00 exim			   

16299 root	  16   0 27584  24m 2384 S	0  0.7   0:02.70 spamd			  

16353 root	  15   0 24392  11m 4004 S	0  0.3   0:01.33 httpd			  

16364 root	  20   0  5076 1432 1112 S	0  0.0   0:00.06 pure-ftpd		  

16367 root	  18   0  4804 1088  856 S	0  0.0   0:00.00 pure-authd		 

16378 root	  16   0  3204 1108  576 S	0  0.0   0:00.03 crond			  

17460 root	  24   0 19772 6420 1316 S	0  0.2   0:00.00 httpd			  

17637 root	  16   0 27584  23m 1216 S	0  0.7   0:00.02 spamd			  

17936 root	  16   0 18180 7980  988 S	0  0.2   0:00.09 cpsrvd-ssl		 

17946 root	  20   0 15064 7804  496 S	0  0.2   0:00.00 cpdavd			 

17950 root	  34  19  3872 1840  952 S	0  0.0   0:00.05 cpanellogd		 

17988 root	  16   0  5788 4260 1496 S	0  0.1   0:00.62 tailwatchd		 

18001 root	  18   0  5396  700  436 S	0  0.0   0:00.00 saslauthd		  

18007 root	  18   0  5396  428  164 S	0  0.0   0:00.00 saslauthd		  

18037 root	  19   0  1600  428  348 S	0  0.0   0:00.00 portsentry		 

19534 root	  16   0 10000 2840 2252 S	0  0.1   0:00.12 sshd			   

20047 root	  16   0  6524 1552 1160 S	0  0.0   0:00.09 sftp-server		

20048 root	  16   0  2376 1328 1116 S	0  0.0   0:00.04 bash			   

27999 nobody	16   0 30676  17m 3348 S	0  0.5   0:20.65 httpd			  

29924 nobody	15   0 29452  16m 3384 S	0  0.5   0:07.27 httpd			  

 9271 nobody	16   0 28572  15m 3344 S	0  0.4   0:14.05 httpd			  

11566 nobody	16   0 27880  14m 3368 S	0  0.4   0:04.14 httpd			  

15766 root	  18   0  2368 1152  996 S	0  0.0   0:00.01 mysqld_safe		

15803 mysql	 16   0  381m  27m 4552 S	0  0.8   0:33.96 mysqld			 

16334 nobody	16   0 28716  15m 3320 S	0  0.4   0:04.57 httpd			  

30111 root	  18   0	 0	0	0 Z	0  0.0   0:00.05 authProg  

30152 root	  18   0	 0	0	0 Z	0  0.0   0:00.05 authProg  

30249 nobody	16   0 27912  14m 3320 S	0  0.4   0:03.73 httpd			  

30250 nobody	15   0 28596  15m 3312 S	0  0.4   0:02.11 httpd			  

32216 nobody	15   0 32668  19m 3320 S	0  0.5   0:01.99 httpd			  

 1664 nobody	16   0 28092  14m 3260 S	0  0.4   0:00.57 httpd



Our CPU seems to spike considerably, I've seen it upto 70% with just 20 users online! Any advice appreciated.
Many thanks in advance.
Marko

Posted

OK, I've tweaked, pushed, pulled, and tore the my.cfg to bits over the past 24 hours and absolutely nothing is making a difference whatsoever therefore I'm now of the belief my sql is problematic for other reasons. Is there anything I can do to troubleshoot MySQL at all, my main concern is the time it's taking pageloads as I don't believe for a second it's the server as the other sites I have here are loading much faster than they were on the old shared server. My ACP loads great and I can navigate it with speed, it's only when on my front-end that I'm seeing considerable delay with pageloads.
Any help greatly appreciated.
Cheers
Marko

Posted

Sorry to ask an obvious question here, but have you asked anyone else whether or not they're experiencing this problem? I ask because I just checked out your site (or at least I think I checked out the one your talking about) and it was instantaneous for me.

If your other websites don't rely heavily on SQL, its likely that the problem is with your MySQL configuration.

Posted

Hi and yes I have asked a few of our regular visitors who tell me the same as yourself but I first noticed the site lagging from my own computer (wasn't at all like this on the old shared server) as well as from other internet connections such as family and friends. I've since sent a mail out to all members informing them that the move is complete and asking for their opinions on how they are finding the new server so I'm hopeful for some feedback at least. I was about to ask where you were located as so far a few from the US have said it's really good and I'm in the UK but I see from your details you're also UK so I guess that rules connectivity from here to the netherlands out where the server is located.

Even at that, the other few sites on the server definately seem much faster than what I remember and this is what confuses me, if they are noticeably faster for me I can't understand why freewarebb isn't?!. The other sites are definately not MySQL heavy, we do have another IPB on the same server but this doesn't use anywhere near the amount of resources that freewarebb does and on top of this I'm definately noticing massive CPU useage whenever I optimize the tables from within the ACP, and I'm now talking 150%-250% and even checking just now I'm seeing around 30-40 guests on the site and the CPU usage is around 60%-70%, again surely this can't be right for the amount of people on the site and although I can understand if they are generating queries though I can only imagine what would happen to my CPU if 1000 people were on!!

I might be worrying myself over nothing at the end of the day but you know what it's like when you have a niggle, it just keeps niggling!! Anything else you can think of that I may not already have checked it greatfully received :)
Thanks
Marko

Posted

Not sure if it's useful but here's another snippet of my system proccesses where mysqld & httpd seems to be hammering the CPU

top - 01:08:21 up 41 min,  0 users,  load average: 0.47, 0.71, 0.60

Tasks:  57 total,   2 running,  53 sleeping,   0 stopped,   2 zombie

Cpu(s):  5.3% us,  2.4% sy,  0.0% ni, 92.4% id,  0.0% wa,  0.0% hi,  0.0% si

Mem:   3686400k total,   560312k used,  3126088k free,		0k buffers

Swap:		0k total,		0k used,		0k free,		0k cached


  PID USER	  PR  NI  VIRT  RES  SHR S %CPU %MEM	TIME+  COMMAND			

24103 mysql	 15   0  392m  62m 4800 S   94  1.7  11:16.87 mysqld			 

13718 nobody	17   0 30528  16m 3416 R   41  0.5   0:00.22 httpd			  

 1461 nobody	16   0 31356  18m 3740 S   27  0.5   0:29.83 httpd			  

18238 nobody	15   0 36884  22m 3664 S   18  0.6   0:17.25 httpd			  

24303 root	  17   0 24384  11m 4048 S	4  0.3   0:01.10 httpd			  

11832 nobody	15   0 29160  15m 3340 S	2  0.4   0:25.77 httpd			  

17543 nobody	16   0 27488  14m 3252 S	2  0.4   0:02.97 httpd			  

28578 nobody	16   0 26980  14m 3624 S	2  0.4   0:02.14 httpd			  

28581 nobody	15   0 26504  13m 3312 S	2  0.4   0:02.18 httpd			  

15622 nobody	15   0  2108  916  728 R	2  0.0   0:00.03 top				

	1 root	  15   0  1980  656  568 S	0  0.0   0:00.04 init			   

23935 root	  16   0  1644  568  480 S	0  0.0   0:00.07 syslogd			

23938 root	  20   0  1588  400  336 S	0  0.0   0:00.00 klogd			  

23946 root	  21   0  1568  420  356 S	0  0.0   0:00.00 courierlogger	  

23947 root	  16   0  1928  624  520 S	0  0.0   0:00.00 authdaemond		

23949 root	  15   0  1928  372  256 S	0  0.0   0:00.03 authdaemond		

23950 root	  16   0  1928  372  256 S	0  0.0   0:00.03 authdaemond		

23963 root	  16   0  6960 1048  668 S	0  0.0   0:00.00 sshd			   

23986 root	  18   0  2636  864  700 S	0  0.0   0:00.01 xinetd			 

24027 root	  18   0  2368 1152  996 S	0  0.0   0:00.02 mysqld_safe		

24153 root	  20   0  1572  344  288 S	0  0.0   0:00.00 courierlogger	  

24154 root	  21   0  1680  516  440 S	0  0.0   0:00.01 couriertcpd		

24161 root	  20   0  1572  344  288 S	0  0.0   0:00.00 courierlogger	  

24162 root	  18   0  1680  516  440 S	0  0.0   0:00.01 couriertcpd		

24168 root	  15   0  1572  424  356 S	0  0.0   0:00.03 courierlogger	  

24169 root	  15   0  1680  536  460 S	0  0.0   0:00.06 couriertcpd		

24174 root	  18   0  1572  344  288 S	0  0.0   0:00.00 courierlogger	  

24175 root	  18   0  1680  516  440 S	0  0.0   0:00.01 couriertcpd		

24218 mailnull  16   0 10124 1176  692 S	0  0.0   0:00.01 exim			   

24222 mailnull  20   0 10124 1120  636 S	0  0.0   0:00.00 exim			   

24271 root	  16   0 27584  24m 2384 S	0  0.7   0:02.83 spamd			  

24312 root	  20   0  5076 1432 1112 S	0  0.0   0:00.05 pure-ftpd		  

24314 root	  18   0  4804 1088  856 S	0  0.0   0:00.00 pure-authd		 

24331 root	  15   0  3204 1108  576 S	0  0.0   0:00.03 crond			  

24370 root	  25   0 19772 6412 1316 S	0  0.2   0:00.00 httpd			  

25681 root	  16   0 27584  23m 1216 S	0  0.7   0:00.01 spamd			  

25771 root	  16   0 18180 7980  988 S	0  0.2   0:00.05 cpsrvd-ssl		 

25779 root	  18   0 15064 7804  496 S	0  0.2   0:00.00 cpdavd			 

25783 root	  34  19  3872 1840  952 S	0  0.0   0:00.06 cpanellogd		 

25851 root	  15   0  5788 4260 1496 S	0  0.1   0:00.38 tailwatchd		 

25863 root	  25   0  5396  700  436 S	0  0.0   0:00.00 saslauthd		  

25865 root	  25   0  5396  428  164 S	0  0.0   0:00.00 saslauthd		  

25891 root	  18   0  1600  428  348 S	0  0.0   0:00.00 portsentry		 

18221 nobody	15   0 27376  14m 3640 S	0  0.4   0:15.54 httpd			  

13627 nobody	15   0 27680  14m 3340 S	0  0.4   0:06.69 httpd			  

 1915 nobody	15   0 28196  14m 3284 S	0  0.4   0:02.44 httpd			  

27710 root	  18   0	 0	0	0 Z	0  0.0   0:00.07 authProg  

30404 root	  22   0	 0	0	0 Z	0  0.0   0:00.08 authProg  

32283 nobody	15   0 28904  15m 3328 S	0  0.4   0:03.76 httpd			  

13733 nobody	15   0 24520  10m 2784 S	0  0.3   0:00.52 httpd			  

15606 nobody	16   0 24384 9.9m 2196 S	0  0.3   0:00.00 httpd			  

15611 nobody	16   0 24384 9.9m 2188 S	0  0.3   0:00.00 httpd			  

15612 nobody	16   0 24384 9.9m 2188 S	0  0.3   0:00.00 httpd			  

15623 nobody	16   0 24384 9.9m 2188 S	0  0.3   0:00.00 httpd			  

15625 nobody	18   0 24384 9.9m 2188 S	0  0.3   0:00.00 httpd			  

15626 nobody	17   0 24384 9.9m 2188 S	0  0.3   0:00.00 httpd			  

15627 nobody	17   0 24384 9.9m 2188 S	0  0.3   0:00.00 httpd

Posted

Ok.

Might I suggest you take another top report and post it here. One from when you have the most people online would be best. That way, we can see what process it is that is causing your high load. From that we can rule out MySQL as the problem or confirm that it is the problem.

Posted

I will definately do that, yes but for now I just updated a download on the site and as the screen was refreshing I grabbed this from the ACP ...

  PID USER	  PR  NI  VIRT  RES  SHR S %CPU %MEM	TIME+  COMMAND			

24103 mysql	 16   0  392m  63m 4808 S  134  1.8  12:25.45 mysqld			 

28143 nobody	16   0 37180  22m 3260 R   27  0.6   0:01.30 httpd			  

23748 nobody	15   0 37632  23m 3628 S   14  0.7   0:05.63 httpd

Posted

Hmm, seems though I'm having more issues than I thought, been keeping an eye on our nameservers also as they are new and it seems though we've just dropped of the internet also! Oh happy days :huh: Thanks for the help by the way and hopefully I'll kick some butt in a sec and be back up shortly :)
Marko

Posted

I think it would be much easier for you to tune MySQL yourself, as you have instant access to the command line to tell what is making a difference and so on. A while back, someone here had a similar problem and I posted a few suggestions, I think if you read through the post I made, you might be able to make a good configuration file yourself.

This is the post:

http://forums.invisionpower.com/index.php?...p;#entry1735806

Note that I accidentally put "MB" behind the "thread_cache" value. Its not meant to be there. "thread_cache" refers to a number of tables, not Memory Allocation.

Posted

OK, made the changes to a few entries based on the thread you pointed me to and now my my.cfg file looks like:

[mysqld]

skip-bdb


[mysqld]

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

skip-locking

#skip-innodb

query_cache_limit=2M

query_cache_size=4M

query_cache_type=1

max_connections=100

max_user_connections=100

interactive_timeout=100

wait_timeout=20

connect_timeout=10

max_heap_table_size = 64M

thread_cache=32

key_buffer=256M

join_buffer=1M

max_allowed_packet=64M

max_connect_errors=1000

table_cache=256M

record_buffer=1M

sort_buffer_size=2M

read_buffer_size=8M

read_rnd_buffer_size=1M

max_connect_errors=10

# Try number of CPU's*2 for thread_concurrency

thread_concurrency=8

myisam_sort_buffer_size=64M

#log-bin

server-id=1


[mysqldump]

quick

max_allowed_packet=16M


[mysql]

no-auto-rehash

#safe-updates


[isamchk]

key_buffer=64M

sort_buffer=64M

read_buffer=16M

write_buffer=16M


[myisamchk]

key_buffer=64M

sort_buffer=64M

read_buffer=16M

write_buffer=16M



If anyone can see room for improvement please feel free to let me know but for now I'll see how these settings go and they're in place right now, though I don't initially feel a difference but I'll keep an eye on the stats and post back.
Thanks
Marko

Posted

I have absolutely no idea what all that means, but I do have a little story.

My last host kept cutting me off because my CPU useage was through the roof, even though the site was static, and contained only a few photos I was sharing with family in England.

Then I found the Guest Book, which I had forgotten all about, it has literally THOUSANDS of links and other rubbish, when I deleted it the problems disappeared.

Posted

I had thought that we may be running old mods or something also and I checked for that but still nothing, and any mods we had running before were actually removed a long time ago anyway, even before our previous shared hosting. Thing is also, I suspected the bandwidth being a problem on our VPS but on our shared hosting we could download a file from the server at around 30-40Kbps and now on the new VPS we're able to download at 10X this!! so it's definately not bandwidth and further proves the ability of the server I guess.

Yesterday I got tuning-primer on the site also and will let the MySQL run for 48 hours uninterupted before I run the tuning-primer and see if this can suggest any further changes also but please keep the suggestions coming if possible, I'm all ears! :)
Marko

Posted

Here's our stats with around 70 users on line now ...

top - 17:32:47 up  5:18,  0 users,  load average: 1.06, 1.03, 0.90

Tasks:  55 total,   4 running,  49 sleeping,   0 stopped,   2 zombie

Cpu(s):  6.8% us,  3.0% sy,  0.0% ni, 90.1% id,  0.0% wa,  0.0% hi,  0.0% si

Mem:   3686400k total,   691508k used,  2994892k free,		0k buffers

Swap:		0k total,		0k used,		0k free,		0k cached


  PID USER	  PR  NI  VIRT  RES  SHR S %CPU %MEM	TIME+  COMMAND			

24311 nobody	16   0 33356  19m 3248 R   90  0.5   0:00.46 httpd			  

12072 nobody	16   0 32344  18m 3340 R   82  0.5   0:09.43 httpd			  

18176 nobody	15   0 32192  18m 3340 R   80  0.5   0:05.73 httpd			  

 9903 mysql	 15   0  387m  75m 4872 S	6  2.1 109:46.24 mysqld			 

19967 nobody	15   0 28956  15m 3592 S	2  0.4   0:01.95 httpd			  

25740 nobody	15   0  2108  916  728 R	2  0.0   0:00.03 top				

	1 root	  15   0  1980  656  568 S	0  0.0   0:00.19 init			   

 9800 root	  16   0  1644  568  480 S	0  0.0   0:01.34 syslogd			

 9803 root	  19   0  1588  400  336 S	0  0.0   0:00.00 klogd			  

 9811 root	  16   0  1568  420  356 S	0  0.0   0:00.00 courierlogger	  

 9812 root	  15   0  1928  624  520 S	0  0.0   0:00.00 authdaemond		

 9814 root	  16   0  1928  380  264 S	0  0.0   0:00.32 authdaemond		

 9815 root	  16   0  1928  380  264 S	0  0.0   0:00.32 authdaemond		

 9827 root	  16   0  6960 1048  668 S	0  0.0   0:00.72 sshd			   

 9841 root	  20   0  2636  864  700 S	0  0.0   0:00.00 xinetd			 

 9859 root	  18   0  2368 1152  996 S	0  0.0   0:00.02 mysqld_safe		

 9935 root	  15   0  1572  424  356 S	0  0.0   0:00.03 courierlogger	  

 9936 root	  16   0  1680  536  460 S	0  0.0   0:00.02 couriertcpd		

 9942 root	  20   0  1572  344  288 S	0  0.0   0:00.00 courierlogger	  

 9943 root	  18   0  1680  516  440 S	0  0.0   0:00.00 couriertcpd		

 9948 root	  16   0  1572  424  356 S	0  0.0   0:00.41 courierlogger	  

 9949 root	  16   0  1680  536  460 S	0  0.0   0:00.36 couriertcpd		

 9956 root	  22   0  1572  344  288 S	0  0.0   0:00.00 courierlogger	  

 9957 root	  18   0  1680  516  440 S	0  0.0   0:00.01 couriertcpd		

10050 mailnull  16   0 10128 1164  676 S	0  0.0   0:00.06 exim			   

10056 mailnull  16   0 10116 1176  696 S	0  0.0   0:00.09 exim			   

10061 mailnull  19   0 10120 1116  636 S	0  0.0   0:00.00 exim			   

10098 root	  16   0 27584  24m 2388 S	0  0.7   0:03.31 spamd			  

10148 root	  16   0 24392  11m 4048 S	0  0.3   0:14.99 httpd			  

10161 root	  16   0  5076 1460 1136 S	0  0.0   0:00.08 pure-ftpd		  

10163 root	  16   0  4804 1092  860 S	0  0.0   0:00.02 pure-authd		 

10174 root	  15   0  3204 1108  576 S	0  0.0   0:00.12 crond			  

10198 root	  25   0 19772 6420 1316 S	0  0.2   0:00.00 httpd			  

11472 root	  15   0 27980  24m 1820 S	0  0.7   0:15.03 spamd			  

11636 root	  16   0 18180 7980  988 S	0  0.2   0:00.34 cpsrvd-ssl		 

11642 root	  15   0 15064 7804  496 S	0  0.2   0:00.00 cpdavd			 

11646 root	  34  19  3872 1840  952 S	0  0.0   0:00.06 cpanellogd		 

11694 root	  16   0  8484 5960 1980 S	0  0.2   0:02.94 tailwatchd		 

11712 root	  18   0  5396  700  436 S	0  0.0   0:00.00 saslauthd		  

11715 root	  18   0  5396  428  164 S	0  0.0   0:00.00 saslauthd		  

11741 root	  22   0  1600  428  348 S	0  0.0   0:00.00 portsentry		 

11848 named	 21   0  109m 4756 1968 S	0  0.1   0:04.80 named			  

 9426 root	  18   0	 0	0	0 Z	0  0.0   0:00.07 authProg  

16255 nobody	16   0 27940  14m 3340 S	0  0.4   0:03.85 httpd			  

16378 nobody	16   0 29908  16m 3620 S	0  0.5   0:05.82 httpd			  

17736 root	  21   0	 0	0	0 Z	0  0.0   0:00.05 authProg  

18053 nobody	15   0 31340  18m 3664 S	0  0.5   0:03.81 httpd			  

18102 nobody	16   0 32532  19m 3640 S	0  0.5   0:02.09 httpd			  

19948 nobody	16   0 27292  14m 3340 S	0  0.4   0:04.88 httpd			  

23965 nobody	15   0 28600  15m 3332 S	0  0.4   0:01.28 httpd			  

24066 nobody	16   0 27004  13m 3252 S	0  0.4   0:00.46 httpd			  

24129 nobody	16   0 33084  20m 3568 S	0  0.6   0:01.89 httpd			  

24134 nobody	15   0 28016  14m 3320 S	0  0.4   0:00.64 httpd			  

24510 nobody	15   0 24528  10m 2752 S	0  0.3   0:00.00 httpd			  

24513 nobody	16   0 24528  10m 2788 S	0  0.3   0:00.01 httpd

... and 10 mins later

  PID USER	  PR  NI  VIRT  RES  SHR S %CPU %MEM	TIME+  COMMAND			

 9903 mysql	 15   0  386m  74m 4872 S  194  2.1 116:26.23 mysqld			 

 8006 nobody	16   0 36652  22m 3220 S   20  0.6   0:00.77 httpd			  

32689 nobody	16   0 32764  19m 3596 S	8  0.5   0:07.52 httpd			  

27762 nobody	15   0 27924  14m 3332 S	6  0.4   0:06.70 httpd			  

 8039 nobody	15   0  2108  916  728 R	4  0.0   0:00.03 top				

 6038 nobody	15   0 28176  15m 3648 S	2  0.4   0:07.11 httpd			  

 7268 nobody	15   0 27460  14m 3304 S	2  0.4   0:00.97 httpd



From these figures am I right in thinking my CPU is taking a hammering but my memory is grossly under-used?

Posted

I'm now also noticing multiple error logs such as "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' " and "MySQL server has gone away", could this possibly be related to the poor performance and excessive CPU usage?

Posted

How many errors of that type are you receiving? If there are a lot of them, it could be one source of your problem.

Might want to check the path to MySQL Sockets, if its incorrect, correct that and see if you get any increased performance. Although I did notice your running CentOS 5, I too run that operating system and use the same path your using and its correct. You can always check this though, navigate to that path and see if there is a file there named "mysql.sock". The best program I have found for this is WinSCP, it allows you to connect to your server through SFTP and gives you a folder view of your entire system, this is much easier than navigating through your system using the command line.

Although, from your first top report, it seems that Apache is just as much of a problem if not more. You should check out Apache's error logs too, might give some insight into what's up.

Posted

Hi again, I was receiving quite a lot of these but after resetting the perms on "mysql.sock" it seemed to rid that error and I'm now not seeing any more (yet :unsure: ), so yes the file does definately exist so hopefully resetting the permissions may have solved that one. As for the Apache log, it was 50Mb in size and I'm guessing for such a new setup 50Mb is a problem. The main of the errors are:

File does not exist: /home/######/public_html/jscripts/"+ipb_var_image_url+"



.... which I have no idea about though I'm still searching here for the answer to that one - any idea if that could be causing the board to appear slow and max out our CPU?
Cheers
Marko

Posted

I thought that might have been what you were receiving in your error logs. Its a problem that I have seen here quite a lot. Its a problem with the links that lead to the Javascript files, because they are relative, in some situations they will not lead to a file, they then start looping and can cause some pretty erratic behaviour on the web server. Have a read of this topic and see if it helps to stop the problem:

http://forums.invisionpower.com/index.php?showtopic=272023

Posted

Thanks again for the pointers. If we can assume that this is the (or at least the biggest) issue surrounding my site I'm wondering why it's only developed after the server move and wasn't present on the old shared server, but hey if there's a fix then I'm happy. Taking what was said from the thread above I'm wondering if anyone else has tried running the queries ...

UPDATE `ibf_skin_templates` SET section_content = replace( section_content, 'src="jscripts/', 'src="/jscripts/' );

UPDATE `ibf_skin_templates` SET section_content = replace( section_content, "src='jscripts/", "src='/jscripts/" );



... which is one of the recommended fixes which I'd like to implement, is this a risky decision or straight-forward as it would appear?
Thanks
Marko

Posted

Hmm, more "cannot find" issues from the apache log now ...

File does not exist: /home/#######/public_html/style_images/ip.boardpr, referer: http://www.freewarebb.com/uTorrent-182-file135.html



I actually implemented the .htaccess method of rewriting the jscripts issue and so far it seems to have worked, but with the new errors above I just have a feeling this isn't pannin out too well!

Posted

Im not too sure what could be causing that error. Seems to be related to the IP.Board Pro skin though, rather than your default skin. Are you receiving just as many of those errors as you were the with the Javascript problem? Also, has Apache calmed down at all yet?

Posted

This really is weird, the IP Board Pro skin was removed a long time ago and I can't understand how a skin that doesn't exist can generate errors as it can't be accessed in the first place!. There aren't as many errors as with the javascript but I think if I left it long enough it could start filling up. Without checking the CPU usages and such I'm still seeing no visable difference in the performance of the site, for me the pages are still sluggish though I will keep an eye on the stats and in the meantime would you consider it to be worth installing the IP Board Pro skin ?
Cheers
Marko

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...