Skip to contentSkip to conversation

LTTng tracing: ReplicatedPG::log_operation

DISCUSSION Andreas Bluemle 3 participants 4 messages Dec 2, 2014 – Dec 4, 2014

lore
Share & tools
lore
#0 lore raw

Hi,

during code profiling using LTTng, I encounter that during processing of write requests to the cluster, the ceph-osd spends a lot of time in the ReplicatedPG::log_operation before the the actual writes to journal and object in the FileStore are triggered.

This happens in ReplicatedBackend::submit_transaction.

What I wonder is
- what is the purpose of the log_operation?
If I am not mistaken, then it is neither the write-to-journal nor the write-to-object; both of these are triggered from the queue_operation following that log_operation.

- can the sequence between the log_operation and the actual queue_operation be reversed in ReplicatedBackend::submit_transaction?

Regards

Andreas Bluemle

Signature · 6 lines
Andreas Bluemle                     mailto:[email protected]
ITXperts GmbH                       http://www.itxperts.de
Balanstrasse 73, Geb. 08            Phone: (+49) 89 89044917
D-81541 Muenchen (Germany)          Fax:   (+49) 89 89044910

Company details: http://www.itxperts.de/imprint.htm
#1 lore raw
Quoted 8 lines · Andreas Bluemle

Hi,

during code profiling using LTTng, I encounter that during processing of write requests to the cluster, the ceph-osd spends a lot of time in the ReplicatedPG::log_operation before the the actual writes to journal and object in the FileStore are triggered.

Quoted 7 lines

This happens in ReplicatedBackend::submit_transaction.

What I wonder is
- what is the purpose of the log_operation?
If I am not mistaken, then it is neither the write-to-journal nor the write-to-object; both of these are triggered from the queue_operation following that log_operation.

This is setting up the changes to the pg log, and encoding them into the transaction.

Quoted 3 lines

- can the sequence between the log_operation and the actual queue_operation be reversed in ReplicatedBackend::submit_transaction?

Nope, it needs to go into the transaction and get journaled. I'm kind of surprised this is a big time sink, but there is a lot of encoding so if you're running against a fast system I suppose it could be relatively large.
-Greg

#2 lore raw

Hi Gregory,

Quoted 21 lines · On Tue, 2 Dec 2014 10:32:50 -0800 Gregory Farnum <[email protected]> wrote:
Quoted 8 lines · Andreas Bluemle

Hi,

during code profiling using LTTng, I encounter that during processing of write requests to the cluster, the ceph-osd spends a lot of time in the ReplicatedPG::log_operation before the the actual writes to journal and object in the FileStore are triggered.

Quoted 7 lines

This happens in ReplicatedBackend::submit_transaction.

What I wonder is
- what is the purpose of the log_operation?
If I am not mistaken, then it is neither the write-to-journal nor the write-to-object; both of these are triggered from the queue_operation following that log_operation.

This is setting up the changes to the pg log, and encoding them into the transaction.

Quoted 8 lines
Quoted 3 lines

- can the sequence between the log_operation and the actual queue_operation be reversed in ReplicatedBackend::submit_transaction?

Nope, it needs to go into the transaction and get journaled. I'm kind of surprised this is a big time sink, but there is a lot of encoding so if you're running against a fast system I suppose it could be relatively large.

From what I see on my test system, adding the pg log entry consumes about 60 microseconds - which is about 12 % of the overall time spent for a write request on a replicating OSD, which is sth. like 460 microseconds between receipt of the MSG_OSD_SUBOP at the messenger until the corresponding MSG_OSD_SUBOPREPLY is sent back to the primary OSD.

Quoted 7 lines

-Greg
--
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
Andreas Bluemle                     mailto:[email protected]
ITXperts GmbH                       http://www.itxperts.de
Balanstrasse 73, Geb. 08            Phone: (+49) 89 89044917
D-81541 Muenchen (Germany)          Fax:   (+49) 89 89044910

Company details: http://www.itxperts.de/imprint.htm
#3 lore raw

Yes, it give a small but significant to performance hit. But it's necessary and may exists optimization space.

Quoted 63 lines · Andreas Bluemle

Hi Gregory,

Quoted 21 lines · On Tue, 2 Dec 2014 10:32:50 -0800 Gregory Farnum <[email protected]> wrote:
Quoted 8 lines · Andreas Bluemle

Hi,

during code profiling using LTTng, I encounter that during processing of write requests to the cluster, the ceph-osd spends a lot of time in the ReplicatedPG::log_operation before the the actual writes to journal and object in the FileStore are triggered.

Quoted 7 lines

This happens in ReplicatedBackend::submit_transaction.

What I wonder is
- what is the purpose of the log_operation?
If I am not mistaken, then it is neither the write-to-journal nor the write-to-object; both of these are triggered from the queue_operation following that log_operation.

This is setting up the changes to the pg log, and encoding them into the transaction.

Quoted 8 lines
Quoted 3 lines

- can the sequence between the log_operation and the actual queue_operation be reversed in ReplicatedBackend::submit_transaction?

Nope, it needs to go into the transaction and get journaled. I'm kind of surprised this is a big time sink, but there is a lot of encoding so if you're running against a fast system I suppose it could be relatively large.

From what I see on my test system, adding the pg log entry consumes about 60 microseconds - which is about 12 % of the overall time spent for a write request on a replicating OSD, which is sth. like 460 microseconds between receipt of the MSG_OSD_SUBOP at the messenger until the corresponding MSG_OSD_SUBOPREPLY is sent back to the primary OSD.

Quoted 7 lines

-Greg
--
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

--

Andreas Bluemle                     mailto:[email protected]
ITXperts GmbH                       http://www.itxperts.de
Balanstrasse 73, Geb. 08            Phone: (+49) 89 89044917
D-81541 Muenchen (Germany)          Fax:   (+49) 89 89044910

Company details: http://www.itxperts.de/imprint.htm
--
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 · 3 lines
Best Regards,

Wheat