Technology Tools for Ministry

Community

Web-Empowered Church User Community
All Categories > Getting Started > Hosting > Memory issues on server
Total Posts: 5 - Pages (1): [1]
Author: C. Stephens
Posted: Oct 18 2007 - 12:07 AM
Subject: Memory issues on server
We went live two weeks ago on Typo3 and are on a dedicated server. The server has crashed twice and it appears to be related to memory issues. The memory has gone up to 87% used and the site slows down and then things stop working like mysql. Right at the moment it is 47% in use but I have seen it hovering at 60-70% quite often too. We have 1024MB of memory installed. I am going to request that the memory be taken up to 2Gigs this weekend. But the tech support also mentioned that we are using lots of mysql processing (avg 10-12 mysql processes). They suggested that php accelerator may help.

Any thoughts on what could be happening and what we need to make things more stable?
Author: Jeff Segars
Posted: Oct 18 2007 - 09:55 AM
Subject: re: Memory issues on server
Hey Cathy,
There's an article at http://typo3.org/development/articles/testing-and-tuning-typo3-performance/ that you might be able to point your hosting company to. In it,they highly recommend installing a PHP accelerator such as eAccelerator. I know Vine Hosting uses it on all their servers and saw big performance increases when it was installed.

The article also mentions some MySQL tweaks that will allow it to cache more data, and thus respond more quickly to queries.

I would also double to make sure that PHP does have a memory limit on it (you can check this in the phpinfo() section of the Install Tool. On a dedicated server, you want it set pretty high but its good to still have that limit so that some bad code doesn't eat up all the memory on your server.

Hope that helps a little!
Jeff
user picture Author: Glenn Kelley
Posted: Oct 18 2007 - 11:30 AM
Subject: re: Memory issues on server
One thing I have noticed is many servers do not have mysql and memory hashed out together.
MySQL either does not have enough ram - or it takes to much.

You may wish to have the additional ram put into place as well as have the system setup to run a report on mysql using a simple debug script

I can send you the script to run via cron easy enough if that will help you.

the report will show something similar to this on an hourly basis

MySQL 4.1.22-standard-l uptime 24 23:45:50 Tue Oct 16 23:00:01 2007

__ Key _________________________________________________________________
Buffer used 15.74M of 128.00M %Used: 12.29
Current 25.80M %Usage: 20.16
Write ratio 0.523
Read ratio 0.001

__ Questions ___________________________________________________________
Total 61.57M 28.5/s
QC Hits 44.63M 20.7/s %Total: 72.49
DMS 15.96M 7.4/s 25.92
Com_ 1.34M 0.6/s 2.17
-Unknown 412.20k 0.2/s 0.67
COM_QUIT 53.83k 0.0/s 0.09
Slow 1.26k 0.0/s 0.00 %DMS: 0.01
DMS 15.96M 7.4/s 25.92
SELECT 13.84M 6.4/s 22.49 86.76
DELETE 1.29M 0.6/s 2.09 8.08
INSERT 465.67k 0.2/s 0.76 2.92
UPDATE 357.17k 0.2/s 0.58 2.24
REPLACE 50 0.0/s 0.00 0.00
Com_ 1.34M 0.6/s 2.17
change_db 628.01k 0.3/s 1.02
admin_comma 419.23k 0.2/s 0.68
show_fields 164.67k 0.1/s 0.27

__ SELECT and Sort _____________________________________________________
Scan 292.08k 0.1/s %SELECT: 2.11
Range 575.41k 0.3/s 4.16
Full join 3.30k 0.0/s 0.02
Range check 0 0/s 0.00
Full rng join 8 0.0/s 0.00
Sort scan 175.12k 0.1/s
Sort range 668.58k 0.3/s
Sort mrg pass 6 0.0/s

__ Query Cache _________________________________________________________
Memory usage 25.96M of 32.00M %Used: 81.12
Block Fragmnt 11.30%
Hits 44.63M 20.7/s
Inserts 13.80M 6.4/s
Insrt:Prune 2.57:1 3.9/s
Hit:Insert 3.23:1

__ Table Locks _________________________________________________________
Waited 3.15k 0.0/s %Total: 0.02
Immediate 18.22M 8.4/s

__ Tables ______________________________________________________________
Open 1.02k of 1024 %Cache: 100.00
Opened 4.56k 0.0/s

__ Connections _________________________________________________________
Max used 50 of 500 %Max: 10.00
Total 224.07k 0.1/s

__ Created Temp ________________________________________________________
Disk table 97.20k 0.0/s
Table 201.00k 0.1/s
File 3 0.0/s

__ Threads _____________________________________________________________
Running 1 of 2
Cached 48 of 128 %Hit: 99.98
Created 50 0.0/s
Slow 0 0/s

__ Aborted _____________________________________________________________
Clients 340.49k 0.2/s
Connects 1 0.0/s

__ Bytes _______________________________________________________________
Sent 2.25G 1.0k/s
Received 2.57G 1.2k/s


Helps a ton when your looking for memory issues... which a good amount of the time are based on Typo3's usage of mysql


Also - the PHP Accelerator is good - but generally only speeds up delivery of the sites on the server - but does not - from what I have seen - help with the memory issues we have seen on typo3 servers...
Author: C. Stephens
Posted: Oct 18 2007 - 08:46 PM
Subject: re: Memory issues on server
Thank you for the suggestions and help. I am going to talk further with Glenn tomorrow about the issue.

And Jeff, I checked and we do not have a memory limit set. Under phpinfo() it says:
OTHER: memory_limit :
Note - nothing there.

How do I set this?
Author: Jeff Segars
Posted: Oct 19 2007 - 10:31 AM
Subject: re: Memory issues on server
Cathy,
This is something your hosting company would probably handle. The memory limit is set in the main PHP configuration file (php.ini) and having support for a memory limit sometimes requires that PHP is recompiled.

Thanks,
Jeff
Total Posts: 5 - Pages (1): [1]
You must login to post a message to this conference.