Pentium(R) Dual-Core CPU E6500 @ 2.93GHz
8 MB RAM
2 x 1TB SATA Disks (RAID1 Software)
I know that RAID1 Software with SATA disks is not the best option for storage but it's the one we can/could afford it in our School.
Today, after reading some post about MySQL performance I decided to test for the forst time changing innodb_flush_log_at_trx_commit=1 to innodb_flush_log_at_trx_commit=2.
As a result of this I experience a huge improvement in performance. Probably this was (one of) the bottleneck in my installation.
But according with the MySQL documentation (http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit)
When the value is 2, the log buffer is written out to the file at each commit, but the flush to disk operation is not performed on it. However, the flushing on the log file takes place once per second also when the value is 2. Note that the once-per-second flushing is not 100% guaranteed to happen every second, due to process scheduling issues.
With a value of 2, only an operating system crash or a power outage can erase the last second of transactions. InnoDB's crash recovery works regardless of the value.
We can afford to lose for example some submissions from a quiz or an assignment done in the last hour. If this happens, we can sort it out at School.
And my questions are:
What would be the worst scenario for a Moodle admin if a crash caused by this issue occurs?
Would it be possible to recover (with usual MySQL tools: analyse, repair,.. ) the integrity of the database after such a crash?
Would Only the last DB records (transactions) be affected (lost) or is there any risk of losing even everything?
I'd really appreciate your feedback and suggestions about this issue.