Scott Haneda wrote:
OS X 10.3 and mysql 4.x, I have a situation where after time certain queries
get really slow, in the area of 30 seconds.  I seem to have pinned it down
to my use of my-large.cnf.  If I remove this file and let just the mysql
defaults in, then I seem to not have the trouble, at least, I have 8 hours
on it now with no degrade in performance.

On a machine with 896MB of ram, would there be anything in my-large.cnf that
would cause this?  I do run apache, which does some pretty minimal serving.

One of the most common things is excessive sort buffer, but 1 MB should not be too bad, and it is allocated only when you do group by or order by which cannot be done by going through a key. 256 MB key buffer should not be a big problem in theory, but I am not very familiar with OS X memory allocation model. If it very conservative, and will actually give you all of 256 MB before you initialize it, this could reduce the OS ability to cache the data file and possibly also cause unnecessary swapping.


On Linux this does not happen because the kernel does not give you the memory until you actually touch it, which has its up and down sides - on one hand, programs end up getting their buffers partially auto-tuned, which gives you excellent performance even when you get them wrong, but on the other hand, if the kernel runs out of RAM to the point that it cannot give you the needed memory that was earlier not in use by flushing the disk cache or swapping something out, your program just segfaults.


Perhaps I should be custom making a cfg file, if so, what do you look for to optimize your config?

I would try playing with buffer sizes and running different benchmarks. I would also write a small memory manipulator and play with it watching the system diagnostics in the mean time to understand how OS X memory model works.



-- Sasha Pachev Create online surveys at http://www.surveyz.com/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to