Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a server with 2 SSDs. I'm running a LAMP install and have an innoDB database on it.

my questions are :

1) would innoDB automatically use both SSDs or would it only use one ? 2) would I incur a significant performance hit if I use a 2 HDD instead of the 2 SSDs ?


share|improve this question

closed as not a real question by mdpc, kce, Ward, Khaled, Bryan Dec 30 '12 at 20:40

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

How are the drives configured? InnoDB doesn't know about the storage devices under its files, it just cares about the files; if you put the storage somewhere where it's using both SSDs, then it will. Please clarify exactly how your system is set up, and what you're looking to achieve. – Shane Madden Dec 29 '12 at 20:51
up vote 5 down vote accepted

would innoDB automatically use both SSDs or would it only use one ?

No, InnoDB (and MySQL) knows nothing about your storage subsystem. You need to configure the storage devices as needed (RAID, LVM, filesystems, etc.), mount the storage in a location of your choosing, and then instruct MySQL to use it.

would I incur a significant performance hit if I use a 2 HDD instead of the 2 SSDs ?

This completely depends on your workload and the capabilities of your block devices. If you have old or cheap SSDs but 15k Fibre Channel hard drives, well, those hard disks will walk all over your SSDs.

Spinning hard drives tend to do better with sequential workloads whereas SSDs tend to perform better with random IO.

share|improve this answer
thsnks, What should I do to make it use both SSDs as one ? – redmoon7777 Dec 29 '12 at 21:04
Use mdadm to create a RAID1 mirror pair, then mount that volume somewhere and mount it somewhere that MySQL can use it. If you need assistance doing either of those things, post them as separate questions, but search the site before posting, as both topics have likely been covered several times here already. – EEAA Dec 29 '12 at 21:07
thanks for your help – redmoon7777 Dec 29 '12 at 21:19
keep in mind that a mdraid raid1 will destroy your IOPS rate. It's fine if you habe sequential reads and writes, but it's very slow in random I/O. – mgabriel Dec 29 '12 at 21:55

You can make InnoDB use two or more separate devices without using RAId or something, you just need to specify multiple files in your innodb_data_file_path variable

Something like:

innodb_data_file_path = /ssd1/ibdata1:1024M;/ssd2/ibdata2:1024M;/ssd1/ibdata3:1024M;/ssd2/ibdata4:128M:autoextend

will put the first GB of data from your database on the first SSD, then the 2nd on the other, etc.

It is probably best to use the 'innodb_file_per_table' which makes a separate innodb file for each table, then you can just symlink different tables or databases to different drives, to load balance is however you think will give you the best performance where you need it.

There are both advantages and disadvantages to doing it this way. The best solution for speed is to have enough ram to keep all of the innodb data cached in memory as well.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.