Date: Wed, 16 Jan 2002 23:53:07 +0100 From: "Rogier R. Mulhuijzen" <drwilco@drwilco.net> To: jgrosch@mooseriver.com, hackers@FreeBSD.ORG Cc: freebsd-questions@FreeBSD.ORG Subject: Re: [nicole@unixgirl.com: What is biord?] Message-ID: <5.1.0.14.0.20020116233750.02874e18@mail.drwilco.net> In-Reply-To: <20020116141825.A45998@mooseriver.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > Hello > I have a mysql database that seems slow and when looking at it in top it >always seems to be in a state of biord > What the heck is biord I can't find this anywere > > Thanks Block I/O ReaD (if I'm not terribly mistaken. I'm thinking it could be Buf IO too, but that would be confusing to the layman =) ) Basically it's doing a lot of read IO or your disks are very slow. Which is not a big surprise because databases normally spend a lot of time in disk IO. I'm not up to speed on MySQL tuning, but I've done a fair amount of Oracle tuning, and there's two approaches that can be taken: 1) lessen the amount of IO. 2) make the IO faster. Making it faster can be the most expensive in money (buying SCSI RAID arrays), and not always as effective. Lessening the IO is usually a little more costly in the time department, but can be a LOT more effective. When lessening the IO, again there are mainly 2 things to be done. 1) have more blocks buffered. 2) make queries use less blocks More buffering is an easy fix on a machine with lots of memory. I am not familiar with MySQL's internals, but Oracle uses its own buffercache (optimized for RDBMS usage) and you can specify how big that should be. When a machine has 512megs of RAM and the database is the only thing on the machine, making the buffers take up half of that is not a silly thing at all. (You wont believe how often I come across machines that are ill configured that way. HUGE amount of RAM, and only 5% is used...) Making queries use less blocks is the hardest part, but a lot of the times placing indexes on columns that are used in joins or in WHERE clauses can make a huge difference. Also not using too many tables in a single query helps (eliminate wannahave columns in favor of faster musthave results). You could always find some MySQl guru's of course =) I hope this sheds a little light on the subject, DocWilco P.S.: this really belongs on freebsd-questions@freebsd.org so I'm cross posting this answer there To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.1.0.14.0.20020116233750.02874e18>