In article <20020828151013.GA12910@stripped>,
Dan Nelson <dnelson@stripped> writes:
> On a similar topic, many OSes support "Direct I/O" on files, which
> causes reads and writes to bypass the system's buffer cache. It's
> usually enabled by adding the O_DIRECT (or O_DIRECTIO) flag to your
> open() call. From a quick Google search, FreeBSD and IRIX use
> O_DIRECT, Tru64 uses O_DIRECTIO, and Solaris has you call a directio()
> function on the file descriptor after you open the file.
> Adding this should really help performance on large InnoDB tablespaces,
> and keeps you from having to fall back to raw partitions for unbuffered
> IO, which are a pain to manage.
Why?
* raw /dev/raw/rawN /dev/whatever
* chown mysql.daemon /dev/raw/rawN /dev/whatever (not sure which)
* innodb_data_file_path = /dev/raw/rawN:xxxMnewraw
* innodb_data_file_path = /dev/raw/rawN:xxxMraw
and you're done.
It's hard to change/extend such a setup, but unbuffered raw devices
have the advantage that they bypass not only the buffer cache, but
also the filesystem.
[ Filter fodder: SQL query ]