Forum Moderators: open

Message Too Old, No Replies

Optimizing connection scheme

         

asantos

4:02 pm on Jun 29, 2009 (gmt 0)

10+ Year Member



Hi, i currently host a mobile web service with around 10K users. When they were only 1K users there was no problem... but as the users ammount grew up, our server starting having CPU usage overloads. This is what i get for the "mysqld" command by invoking "top" through SSH:

mysqld
VIRT: 134m
RES: 29m
%CPU: 200
%MEM: 4.4
TIME+ 82:07

That is of course A LOT of usage. The 10K users request a JSON file to their mobile phones every 5 minutes (that xml can be empty or with messages).

How could i improve this issue?

BTW, i use:
PHP5 + Adodb for PHP

Here is the connection code:

include(DIR_LIB.'adodb/adodb.inc.php');
$cnn = &ADONewConnection(DB_TYPE);
$cnn->cacheSecs = (86400);
$cnn->debug = false;
@$cnn->Connect(DB_HOST,DB_USER,DB_PASS,DB_NAME);

(i recently switched from PConnect to Connect to see if it helps to reduce the overload a little).