On Thu, Apr 17, 2014 at 3:03 PM, Manuel Arostegui <man...@tuenti.com> wrote:

>
>
>
> 2014-04-17 11:11 GMT+02:00 Ajay Garg <ajaygargn...@gmail.com>:
>
> On Thu, Apr 17, 2014 at 2:28 PM, Reindl Harald <h.rei...@thelounge.net
>> >wrote:
>>
>> >
>> >
>> > Am 17.04.2014 10:55, schrieb Ajay Garg:
>> > > I do understand the meaning of Unix "sync" function.
>> > >
>> > > So, you mean to say that "flushing" and "syncing" are same, in the
>> > context of MySQL?
>> >
>> > please get rid of top-posting and reply-all
>> >
>> > a flush without a sync is "dear operating system, may i ask you to write
>> > that to disk if you find the time to do so" while a sync is "write that
>> > to disk" without a nice asking
>> >
>>
>> Thanks Reindl, that clears it up !!
>
>
> Keep in mind that if you are using HW RAID controller (and a BBU) the
> concept of write-back and write-through are important to have in mind too
> whilst thinking about how and when your data is written to disk.
> If you enable sync_binlog and trx_commit to 1, it might not necessarily be
> committing on every transaction to disk, as it might depend on how you've
> configured your controller.
>
> If you have write-through configured, the data will be written to disk and
> cache at the same time (this has a performance drawback).
> If you have write-back configured, the data will be written to cache (and
> then to disk, but _not_ at the same time) so you might lose data if there's
> a power failure. When you have write-back, at an OS level your data has
> been sync'ed to disk even though this is not totally true.
> write-back is better for performance, but you have to keep in mind that
> you can lose data (which is not common, but you're not 100% safe).
>
> Hope this helps
>


Thanks Manuel for the note !!
It certainly is something to keep in mind !!



> Manuel.
>
>



-- 
Regards,
Ajay

Reply via email to