Increasing number of open_files -- no takers on this one?
Sam Taylor 28 June 2002 21:36:43
Greetings All --
I sent this message to the list a couple of days ago... didn't receive any comments/feedback/suggestions...
if no one knows the answer, can anyone throw me a lifeline and give me a suggestion as to how I can go about diagnosing the situation, or at least share some of your own experiences (is what I'm seeing normal for MySQL??)
Couple of questions about MySQL and the "open_files" stat as reported by "mysqladmin extended-status".
I've changed my configuration (both MySQL and Linux) to increase the max number of open files -- I don't have a problem here. But, I do see that the "open_files" stat returned from "mysqladmin extended-status" continues to grow...
Can anyone tell me what operations cause MySQL to open files (and keep them open)?
I'm running a Java (JSP/Servlets/mmJDBC) web application that is using MySQL, and over the course of a few days I see the number of open files increasing... after 4 days of usage the number was at 17,000+. What is typical for MySQL? What are other people seeing for "open_files"?
Can anyone recommend a diagnostic technique that I can use to determine why I'm keeping so many files open?
I'm not hitting any boundary conditions at this point, but it seems to me that I could, and I'd like to understand the situation a little better before I have a crisis.
To request this thread, e-mail <mysql-thread113347@lists.mysql.com> To unsubscribe, e-mail <mysql-unsubscribe-gcdmg-mysql=m.gmane.org@lists.mysql.com> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
In the last episode (Jun 28), Sam Taylor said:> Greetings All -->
I sent this message to the list a couple of days ago... didn't> receive any comments/feedback/suggestions...>
if no one knows the answer, can anyone throw me a lifeline and give> me a suggestion as to how I can go about diagnosing the situation, or> at least share some of your own experiences (is what I'm seeing> normal for MySQL??)
open_files is simply the number of filehandles mysql has open. It'll grow until it hits open_files_limit.
To request this thread, e-mail <mysql-thread113359@lists.mysql.com> To unsubscribe, e-mail <mysql-unsubscribe-gcdmg-mysql=m.gmane.org@lists.mysql.com> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
hmmm, yes... I understand this point quit well... what I was hoping to learn from the community is:
why does mysql keep the file handles open?
can I do anything (configuration/crafting of SQL statements) that will prevent mysql from amassing such a large number of open file handles?
what is a reasonable/normal number of file handles for mysql to have open? For example, I have both linux and mysql configured to allow 64K max files, will this be sufficient?
Please bear in mind that I realize that you don't know how I've coded my application, you don't know about my server load, and you don't know about the hundreds of other variables that could affect this situation... I was just hoping to get some general information from this group of experienced mysql "gurus" that might help me avoid stepping in a huge pile of... well, you know what I mean...
Sam
-----Original Message----- From: Dan Nelson [mailto:dnelson@allantgroup.com] Sent: Friday, June 28, 2002 4:44 PM To: Sam Taylor Cc: mysql@lists.mysql.com Subject: Re: Increasing number of open_files -- no takers on this one?
In the last episode (Jun 28), Sam Taylor said:> Greetings All -->
I sent this message to the list a couple of days ago... didn't> receive any comments/feedback/suggestions...>
if no one knows the answer, can anyone throw me a lifeline and give> me a suggestion as to how I can go about diagnosing the situation, or> at least share some of your own experiences (is what I'm seeing> normal for MySQL??)
open_files is simply the number of filehandles mysql has open. It'll grow until it hits open_files_limit.
To request this thread, e-mail <mysql-thread113362@lists.mysql.com> To unsubscribe, e-mail <mysql-unsubscribe-gcdmg-mysql=m.gmane.org@lists.mysql.com> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
In the last episode (Jun 28), Sam Taylor said:> hmmm, yes... I understand this point quit well... what I was hoping> to learn from the community is:>
why does mysql keep the file handles open?
To keep from having to re-open them the next time someone asks for data from that table.
can I do anything (configuration/crafting of SQL statements) that will> prevent mysql from amassing such a large number of open file handles?
Are you getting errors from the kernel complaining it's running out of file handles? If not, then why in the world do you want to limit it?
what is a reasonable/normal number of file handles for mysql to have> open? For example, I have both linux and mysql configured to allow> 64K max files, will this be sufficient?
If you have less than 30k tables or less than 12k simultaneous clients, then it would probably be sufficient.
Please read the documentation url I pasted in the last message. It explains about the table cache and how it relates to the filehandles mysql opens.
To request this thread, e-mail <mysql-thread113370@lists.mysql.com> To unsubscribe, e-mail <mysql-unsubscribe-gcdmg-mysql=m.gmane.org@lists.mysql.com> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
If you would like to report an abuse of our service, such as a spam message, please . Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .