Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Dec 29, 2011 10:46 am 
Offline
Senior Newbie

Joined: Fri Dec 23, 2011 9:52 am
Posts: 18
Hi everybody,
I am starting experiencing with an Ubuntu Apache+Mysql server

I have seen that Apache starts lots of processes (one for each connection request) which I can monitor using ps aux while mysql has only one process and a number of threads which I can monitor using ps -eLf

Why mysql has only one process? Right now I have only one user for the database. Having multiple users connecting to the database would result in having multiple process? (thus reserving more cpu and ram for the db)

thank you :roll:


Top
   
 Post subject:
PostPosted: Thu Dec 29, 2011 11:23 am 
Offline
Senior Member

Joined: Tue May 03, 2011 11:55 am
Posts: 105
MySQL will run multiple threads for multiple users connecting concurrently to the database. This behavior can be controlled using the my.cnf settings file.
MySQL does have some memory allocations that get allocated to each connection for it to use, but not all of them are like this - some are global. I am not sure which ones are and are not. I know that the MySQL tuning primer (found here: http://day32.com/MySQL/) seems to give a good indication of the total possible RAM usage from MySQL (if all connections allowed by my.cnf were in use at once) so you might try running that to get an idea of what's going on.


Top
   
 Post subject:
PostPosted: Fri Dec 30, 2011 5:51 am 
Offline
Senior Newbie

Joined: Fri Dec 23, 2011 9:52 am
Posts: 18
Perfect, thank you for your help :)


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


Who is online

Users browsing this forum: No registered users and 2 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