Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

When Do Mysql (GM) processes close?

Quote Reply
When Do Mysql (GM) processes close?
Even when there are no gm users online the mysql processes are shown there in ps -aux. When actually do these processes go off. Or is this persistent Connection" which really never closes till httpd is restarted?

Anup
Quote Reply
Re: [anup123] When Do Mysql (GM) processes close? In reply to
If you are using mod_perl then persistant connections are used.
Quote Reply
Re: [Paul] When Do Mysql (GM) processes close? In reply to
Yes I am on mod_perl Does it mean that mysql processes will keep on increasing? When do these connections close really?

What would happen if it exceeds 100? (ps -aux|grep mysqld) because i do not really see the processes going off.

Please ignore my igorance on the subject. I am a newbie Wink

Anup
Quote Reply
Re: [anup123] When Do Mysql (GM) processes close? In reply to
No, they shouldn't keep increasing. I'm not 100% sure about how it works but I expect that there are a defined number of persistant connections that all clients will use. Instead of disconnecting as with non persistant connections, they will just remain connected but will be freed up for the next client to use after another has finished.
Quote Reply
Re: [Paul] When Do Mysql (GM) processes close? In reply to
OK. It seems things are clearer to me after i tried a simulation test of 15 users simultaneously login to a GM account. It was 18 processes (mysql) is pstree before and 18 after start of simulation and 18 at end of simulation.

If you can interpret anything meaningul i am posting the results here. Please do let me know if anything meaningful can be made out of it. Just for academic interest.

------------

Report generated by WAPT v2.0

Test started at: May 16 21:45:05 2001
Test finished at: May 16 21:46:40 2001
Scenario name: Scenario1
Test run comment:
Virtual users: 15
Iterations: 1
Test executed by: Test executed at: client


--- Basic statistics ---

Request name: req_1
Min request processing time: 18702.78
Avg request processing time: 43364.82
Max request processing time: 93954.34

--- Network traffic details ---

Total bytes sent: 2685
Total bytes received: 78180

Average server bandwidth (Kbits/sec): 6.82
Average user bandwidth (Kbits/sec): 0.45

--- Summary times ---

Virtual Users statistics:
User Reqs Time AR/S AT/R
1 1 29000 0.03 29000.00
2 1 62290 0.02 62290.00
3 1 21667 0.05 21667.00
4 1 54442 0.02 54442.00
5 1 54765 0.02 54765.00
6 1 47437 0.02 47437.00
7 1 48222 0.02 48222.00
8 1 19329 0.05 19329.00
9 1 55984 0.02 55984.00
10 1 32398 0.03 32398.00
11 1 32305 0.03 32305.00
12 1 46435 0.02 46435.00
13 1 94564 0.01 94564.00
14 1 20433 0.05 20433.00
15 1 39505 0.03 39505.00

Total work time: 94904
Total requests made: 15

Total average requests per second: 0.78

--- HTTP response codes details ---

Code Count
200 15

All timings are in millisecond

------------------------------------

Anup
Quote Reply
Re: [anup123] When Do Mysql (GM) processes close? In reply to
Under mod_perl, our programs use persistent database connections - so once established, a connection will generally stay connected. Each time a GMail request starts, it gets one of the pre-established database connections, and when it's done it releases it back so that one of the next GMail requests can reuse the connection. This effectively eliminates the database connection overhead and results in a fairly decent optimization. A new connection will be created only if no connections are available when the connection needs to be established.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com