Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello. I'm managing a RedHat VPS that is used for hosting a group of websites and I've been having some memory usage issues lately.
I've spoken with my hosting company and looked at some diagnostics and MySQL has a stranglehold on the system's memory. I have a total of 13 active databases (not counting the default "mysql" database), which are taking up 3% memory each. However, when I run the "top" command I see 18 instances of mysqld, each taking 3% memory.
My main question is about what exactly an instance of mysqld in the top listing entails-I thought it was one for each active database, but the are 5 more instances of mysqld than I have databases. Any idea what these are, and if so can I turn them off without losing any functionality?
Hello. I'm managing a RedHat VPS that is used for hosting a group of websites and I've been having some memory usage issues lately.
I've spoken with my hosting company and looked at some diagnostics and MySQL has a stranglehold on the system's memory. I have a total of 13 active databases (not counting the default "mysql" database), which are taking up 3% memory each. However, when I run the "top" command I see 18 instances of mysqld, each taking 3% memory.
My main question is about what exactly an instance of mysqld in the top listing entails-I thought it was one for each active database, but the are 5 more instances of mysqld than I have databases. Any idea what these are, and if so can I turn them off without losing any functionality?
Any help is greatly appreciated. Thanks.
I think your interpretation of the mysqld is incorrect. When mysqld starts, it does not create an instance for each database. It starts and listens for database connections, when a connection is requested mysqld forks and creates a new process to handle that connection. If you see 18 processes, then likely you have 17 active mysql connections. Some may be from users ODBC connections, others could be command line mysql connections. My system currently shows 30 mysqld processes, each with 2.7% of the system memory. Keep in mind that one single application instance could have several open odbc connections to the database, each will have it's own mysqld. One of our applications frequently has 4 simultaneous databases open at once.
Unless you are seeing degraded performance with the sites, why are you concerned about memory usage? Are the sites slow or unresponsive? I don't recall seeing anything like that in your post, only the concern that each process is using 3% of memory.
Unless you are seeing degraded performance with the sites, why are you concerned about memory usage? Are the sites slow or unresponsive? I don't recall seeing anything like that in your post, only the concern that each process is using 3% of memory.
Yes, degraded performance with the sites is the memory usage problem I was referring to-sorry for not being specific.
Altering the server variables as mentioned has apparently solved the problem-thanks for the help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.