To Linux DB Admins - MySQL on "raw" partition

EricMartello

Senior member
Apr 17, 2003
910
0
0
I've heard that it is possible to place MySQL databases directly onto raw, unformatted disk partitions to bypass file system overhead and improve the database performance. Has anyone tried this type of configuration on an active DB server? What are the pros/cons of doing this?
 

heymrdj

Diamond Member
May 28, 2007
3,999
63
91
This really depends on what you're doing, mainly in the categories of size and activity of the database. The main purpose is to avoid io bottlenecks, but much of the same can be achieved through simple caching and management by the database engine. Mileage may vary of course, some people will find a better increase in performance.

However even with large 30GB experimental DB's, I've not seen the purpose in it unless the server was already strained to the point one should be utilizing load balancing.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Filesystem overhead is very low in most cases these days, I would imagine the tradeoffs aren't worth it except in the most extreme of circumstances.
 

whiteonline

Member
Dec 13, 2009
40
0
66
Disks have gotten much faster since the days of needing raw slices (they are not called partitions in Unix speak), as filesystems have followed suit. The filesystem is the last place I would look at for IO performance issues.
What will best improve your IO performance is to make sure your queries are optimized, tables indexed properly and your MySQL configuration is proper for the server and load. You will get negligible performance boost (if any) from using raw disk.

Hack MySQL is one of the best sites I have come across to help with DB optimization (especially with index/query optimization).