Skip to contentSkip to conversation

Proposal for adding disable FileJournal option

DISCUSSION Haomai Wang 4 participants 9 messages Jan 9, 2014 – Jan 12, 2014

lore
Share & tools
lore
#0 lore raw

Hi all,

We know FileJournal plays a important role in FileStore backend, it can hugely reduce write latency and improve small write operations.

But in practice, there exists exceptions such as we already use FlashCache or cachepool(although it's not ready).

If cachepool enabled, we may use use journal in cache_pool but may not like to use journal in base_pool. The main reason why drop journal in base_pool is that journal take over a single physical device and waste too much in base_pool.

Like above, if I enable FlashCache or other cache, I'd not like to enable journal in OSD layer.

So is it necessary to disable journal in special(not really special) case?

Best regards,
Wheats

#1 lore raw

The FileJournal is also for data safety whenever we're using write ahead. To disable it we need a backing store that we know can provide us consistent checkpoints (i.e., we can use parallel journaling mode — so for the FileJournal, we're using btrfs, or maybe zfs someday). But for those systems you can already configure the system not to use a journal.
-Greg
Software Engineer #42 @ http://inktank.com | http://ceph.com

Quoted 22 lines · Haomai Wang

Hi all,

We know FileJournal plays a important role in FileStore backend, it can hugely reduce write latency and improve small write operations.

But in practice, there exists exceptions such as we already use FlashCache or cachepool(although it's not ready).

If cachepool enabled, we may use use journal in cache_pool but may not like to use journal in base_pool. The main reason why drop journal in base_pool is that journal take over a single physical device and waste too much in base_pool.

Like above, if I enable FlashCache or other cache, I'd not like to enable journal in OSD layer.

So is it necessary to disable journal in special(not really special) case?

Best regards,
Wheats

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

I had the samt question in the past but there seems no way to change it for the ceph team

Stefan

This mail was sent with my iPhone.

Quoted 35 lines

Am 09.01.2014 um 18:28 schrieb Gregory Farnum <[email protected]>:

The FileJournal is also for data safety whenever we're using write ahead. To disable it we need a backing store that we know can provide us consistent checkpoints (i.e., we can use parallel journaling mode — so for the FileJournal, we're using btrfs, or maybe zfs someday). But for those systems you can already configure the system not to use a journal.
-Greg
Software Engineer #42 @ http://inktank.com | http://ceph.com

Quoted 23 lines · Haomai Wang

Hi all,

We know FileJournal plays a important role in FileStore backend, it can hugely reduce write latency and improve small write operations.

But in practice, there exists exceptions such as we already use FlashCache or cachepool(although it's not ready).

If cachepool enabled, we may use use journal in cache_pool but may not like to use journal in base_pool. The main reason why drop journal in base_pool is that journal take over a single physical device and waste too much in base_pool.

Like above, if I enable FlashCache or other cache, I'd not like to enable journal in OSD layer.

So is it necessary to disable journal in special(not really special) case?

Best regards,
Wheats

Quoted 8 lines
Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
In reply to Gregory Farnum
Quoted 7 lines · Gregory Farnum

The FileJournal is also for data safety whenever we're using write ahead. To disable it we need a backing store that we know can provide us consistent checkpoints (i.e., we can use parallel journaling mode — so for the FileJournal, we're using btrfs, or maybe zfs someday). But for those systems you can already configure the system not to use a journal.

Yes, it depends on backend. For example, FileStore can write a object with sync to sure consistent. If adding a disable FileJournal option, we need some works on
FileStore to implement it.

Quoted 31 lines

-Greg
Software Engineer #42 @ http://inktank.com | http://ceph.com

Quoted 26 lines · Haomai Wang

Hi all,

We know FileJournal plays a important role in FileStore backend, it can hugely reduce write latency and improve small write operations.

But in practice, there exists exceptions such as we already use FlashCache or cachepool(although it's not ready).

If cachepool enabled, we may use use journal in cache_pool but may not like to use journal in base_pool. The main reason why drop journal in base_pool is that journal take over a single physical device and waste too much in base_pool.

Like above, if I enable FlashCache or other cache, I'd not like to enable journal in OSD layer.

So is it necessary to disable journal in special(not really special) case?

Best regards,
Wheats

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 7 lines
Best Regards,

Wheat
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw

The Journal is the part of implementation of ObjectStore Transaction Interface, while transaction is used by PG to write pglog with object data in one transaction.
So I think if the FileJournal could be disabled, there must be something else to implement the Transaction Interface. But it seems hard while no local file-system provide such function in my opinion.

Quoted 58 lines · Haomai Wang
Quoted 7 lines · Gregory Farnum

The FileJournal is also for data safety whenever we're using write ahead. To disable it we need a backing store that we know can provide us consistent checkpoints (i.e., we can use parallel journaling mode — so for the FileJournal, we're using btrfs, or maybe zfs someday). But for those systems you can already configure the system not to use a journal.

Yes, it depends on backend. For example, FileStore can write a object with sync to sure consistent. If adding a disable FileJournal option, we need some works on
FileStore to implement it.

Quoted 4 lines

-Greg
Software Engineer #42 @ http://inktank.com | http://ceph.com

Quoted 27 lines
Quoted 26 lines · Haomai Wang

Hi all,

We know FileJournal plays a important role in FileStore backend, it can hugely reduce write latency and improve small write operations.

But in practice, there exists exceptions such as we already use FlashCache or cachepool(although it's not ready).

If cachepool enabled, we may use use journal in cache_pool but may not like to use journal in base_pool. The main reason why drop journal in base_pool is that journal take over a single physical device and waste too much in base_pool.

Like above, if I enable FlashCache or other cache, I'd not like to enable journal in OSD layer.

So is it necessary to disable journal in special(not really special) case?

Best regards,
Wheats

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--

Best Regards,

Wheat
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 6 lines
Dong Yuan
Email:[email protected]
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw

Exactly. We can't do a safe update without a journal — what if power goes out while the write is happening? When we boot back up, we don't know what version the object is actually at. So if you're using btrfs, you can run without a journal already (and depend on snapshots for recovering after failures); if you are using xfs or ext4 a journal is required for any safety at all, even when it's fronted by a cache pool.

Quoted 70 lines · Dong Yuan

The Journal is the part of implementation of ObjectStore Transaction Interface, while transaction is used by PG to write pglog with object data in one transaction.
So I think if the FileJournal could be disabled, there must be something else to implement the Transaction Interface. But it seems hard while no local file-system provide such function in my opinion.

Quoted 51 lines · Haomai Wang
Quoted 7 lines · Gregory Farnum

The FileJournal is also for data safety whenever we're using write ahead. To disable it we need a backing store that we know can provide us consistent checkpoints (i.e., we can use parallel journaling mode — so for the FileJournal, we're using btrfs, or maybe zfs someday). But for those systems you can already configure the system not to use a journal.

Yes, it depends on backend. For example, FileStore can write a object with sync to sure consistent. If adding a disable FileJournal option, we need some works on
FileStore to implement it.

Quoted 4 lines

-Greg
Software Engineer #42 @ http://inktank.com | http://ceph.com

Quoted 27 lines
Quoted 26 lines · Haomai Wang

Hi all,

We know FileJournal plays a important role in FileStore backend, it can hugely reduce write latency and improve small write operations.

But in practice, there exists exceptions such as we already use FlashCache or cachepool(although it's not ready).

If cachepool enabled, we may use use journal in cache_pool but may not like to use journal in base_pool. The main reason why drop journal in base_pool is that journal take over a single physical device and waste too much in base_pool.

Like above, if I enable FlashCache or other cache, I'd not like to enable journal in OSD layer.

So is it necessary to disable journal in special(not really special) case?

Best regards,
Wheats

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--

Quoted 7 lines

Best Regards,

Wheat
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Quoted 3 lines

--
Dong Yuan
Email:[email protected]

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
Quoted 7 lines · Gregory Farnum

Exactly. We can't do a safe update without a journal — what if power goes out while the write is happening? When we boot back up, we don't know what version the object is actually at. So if you're using btrfs, you can run without a journal already (and depend on snapshots for recovering after failures); if you are using xfs or ext4 a journal is required for any safety at all, even when it's fronted by a cache pool.

I'm not fully agree with it. Why we can't call "fdatasync()" during each transaction to
ensure consistent if exists cache in the front of.

Quoted 75 lines · Dong Yuan
Quoted 73 lines

The Journal is the part of implementation of ObjectStore Transaction Interface, while transaction is used by PG to write pglog with object data in one transaction.
So I think if the FileJournal could be disabled, there must be something else to implement the Transaction Interface. But it seems hard while no local file-system provide such function in my opinion.

Quoted 51 lines · Haomai Wang
Quoted 7 lines · Gregory Farnum

The FileJournal is also for data safety whenever we're using write ahead. To disable it we need a backing store that we know can provide us consistent checkpoints (i.e., we can use parallel journaling mode — so for the FileJournal, we're using btrfs, or maybe zfs someday). But for those systems you can already configure the system not to use a journal.

Yes, it depends on backend. For example, FileStore can write a object with sync to sure consistent. If adding a disable FileJournal option, we need some works on
FileStore to implement it.

Quoted 4 lines

-Greg
Software Engineer #42 @ http://inktank.com | http://ceph.com

Quoted 27 lines
Quoted 26 lines · Haomai Wang

Hi all,

We know FileJournal plays a important role in FileStore backend, it can hugely reduce write latency and improve small write operations.

But in practice, there exists exceptions such as we already use FlashCache or cachepool(although it's not ready).

If cachepool enabled, we may use use journal in cache_pool but may not like to use journal in base_pool. The main reason why drop journal in base_pool is that journal take over a single physical device and waste too much in base_pool.

Like above, if I enable FlashCache or other cache, I'd not like to enable journal in OSD layer.

So is it necessary to disable journal in special(not really special) case?

Best regards,
Wheats

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--

Quoted 7 lines

Best Regards,

Wheat
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Dong Yuan
Email:[email protected]

Signature · 7 lines
Best Regards,

Wheat
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#7 lore raw

It is not only for consistent between memory and disk. The key point is to implement the atomicity of an trancation.

That is when an trancation needs to write an object and update the pglog at the same time, we must make sure the two IO do both or nether.

With the journal, when osd restore from failure, the reply process can redo the transcation. I think that is why the journal can not be disabled.

Quoted 95 lines · Haomai Wang
Quoted 7 lines · Gregory Farnum

Exactly. We can't do a safe update without a journal — what if power goes out while the write is happening? When we boot back up, we don't know what version the object is actually at. So if you're using btrfs, you can run without a journal already (and depend on snapshots for recovering after failures); if you are using xfs or ext4 a journal is required for any safety at all, even when it's fronted by a cache pool.

I'm not fully agree with it. Why we can't call "fdatasync()" during each transaction to
ensure consistent if exists cache in the front of.

Quoted 72 lines · Dong Yuan
Quoted 70 lines

The Journal is the part of implementation of ObjectStore Transaction Interface, while transaction is used by PG to write pglog with object data in one transaction.
So I think if the FileJournal could be disabled, there must be something else to implement the Transaction Interface. But it seems hard while no local file-system provide such function in my opinion.

Quoted 58 lines · Haomai Wang
Quoted 7 lines · Gregory Farnum

The FileJournal is also for data safety whenever we're using write ahead. To disable it we need a backing store that we know can provide us consistent checkpoints (i.e., we can use parallel journaling mode — so for the FileJournal, we're using btrfs, or maybe zfs someday). But for those systems you can already configure the system not to use a journal.

Yes, it depends on backend. For example, FileStore can write a object with sync to sure consistent. If adding a disable FileJournal option, we need some works on
FileStore to implement it.

Quoted 4 lines

-Greg
Software Engineer #42 @ http://inktank.com | http://ceph.com

Quoted 27 lines
Quoted 26 lines · Haomai Wang

Hi all,

We know FileJournal plays a important role in FileStore backend, it can hugely reduce write latency and improve small write operations.

But in practice, there exists exceptions such as we already use FlashCache or cachepool(although it's not ready).

If cachepool enabled, we may use use journal in cache_pool but may not like to use journal in base_pool. The main reason why drop journal in base_pool is that journal take over a single physical device and waste too much in base_pool.

Like above, if I enable FlashCache or other cache, I'd not like to enable journal in OSD layer.

So is it necessary to disable journal in special(not really special) case?

Best regards,
Wheats

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--

Best Regards,

Wheat
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Quoted 3 lines
Quoted 3 lines

--
Dong Yuan
Email:[email protected]

--
Best Regards,

Wheat

Signature · 6 lines
Dong Yuan
Email:[email protected]
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#8 lore raw
Quoted 10 lines · Dong Yuan

It is not only for consistent between memory and disk. The key point is to implement the atomicity of an trancation.

That is when an trancation needs to write an object and update the pglog at the same time, we must make sure the two IO do both or nether.

With the journal, when osd restore from failure, the reply process can redo the transcation. I think that is why the journal can not be disabled.

Hmm, I missed it. Journal is the guarantee for the atomic of transaction.

Thanks!

Quoted 103 lines · Haomai Wang
Quoted 91 lines · Gregory Farnum
Quoted 7 lines

Exactly. We can't do a safe update without a journal — what if power goes out while the write is happening? When we boot back up, we don't know what version the object is actually at. So if you're using btrfs, you can run without a journal already (and depend on snapshots for recovering after failures); if you are using xfs or ext4 a journal is required for any safety at all, even when it's fronted by a cache pool.

I'm not fully agree with it. Why we can't call "fdatasync()" during each transaction to
ensure consistent if exists cache in the front of.

Quoted 72 lines · Dong Yuan
Quoted 70 lines

The Journal is the part of implementation of ObjectStore Transaction Interface, while transaction is used by PG to write pglog with object data in one transaction.
So I think if the FileJournal could be disabled, there must be something else to implement the Transaction Interface. But it seems hard while no local file-system provide such function in my opinion.

Quoted 58 lines · Haomai Wang
Quoted 7 lines · Gregory Farnum

The FileJournal is also for data safety whenever we're using write ahead. To disable it we need a backing store that we know can provide us consistent checkpoints (i.e., we can use parallel journaling mode — so for the FileJournal, we're using btrfs, or maybe zfs someday). But for those systems you can already configure the system not to use a journal.

Yes, it depends on backend. For example, FileStore can write a object with sync to sure consistent. If adding a disable FileJournal option, we need some works on
FileStore to implement it.

Quoted 4 lines

-Greg
Software Engineer #42 @ http://inktank.com | http://ceph.com

Quoted 27 lines
Quoted 26 lines · Haomai Wang

Hi all,

We know FileJournal plays a important role in FileStore backend, it can hugely reduce write latency and improve small write operations.

But in practice, there exists exceptions such as we already use FlashCache or cachepool(although it's not ready).

If cachepool enabled, we may use use journal in cache_pool but may not like to use journal in base_pool. The main reason why drop journal in base_pool is that journal take over a single physical device and waste too much in base_pool.

Like above, if I enable FlashCache or other cache, I'd not like to enable journal in OSD layer.

So is it necessary to disable journal in special(not really special) case?

Best regards,
Wheats

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--

Best Regards,

Wheat
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Quoted 3 lines
Quoted 3 lines

--
Dong Yuan
Email:[email protected]

Quoted 4 lines

--
Best Regards,

Wheat

--
Dong Yuan
Email:[email protected]

Signature · 7 lines
Best Regards,

Wheat
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html