我尝试创建约100个LinearState。它的流中仅包含一个N for-each loop
,该子流另一个IssueFlow
子流,每个tx发出一个状态。
这是在Corda 3.0,带有Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz 4GB RAM
线性状态包括
在CollectSignature的前40到50个状态中,每个参与者响应大约需要3到4秒。但是随着过程的进行,发起方最多可能需要14秒以上的时间才能收到响应。为什么随着体积的增加性能会下降?
下面的总持续时间基准
此处的示例日志,您可以看到发起方最多花费16秒来处理收集签名中的参与者响应。
从LENDER开始的时间: 2018-06-29T11:07:56,356Z
使用LENDER结束时间: 2018-06-29T11:08:12,669Z
[INFO ] 2018-06-29T11:07:56,356Z [Node thread-1] flow.[55168e42-bff4-4d75-94ba-304d63f1a58e].initiateSession - Initiating flow session with party OU=LENDER, O=LENDER, L=London, C=UK. Session id for tracing purposes is SessionId(toLong=-1958500197946881585). {} [INFO ] 2018-06-29T11:08:02,251Z [Thread-179 (ActiveMQ-client-global-threads)] messaging.P2PMessagingClient.artemisToCordaMessage - Received message from: p2p.inbound.DjcvsLH1DL2QVRWbG7ucYLKtmraM8ch2RhCL5TEMJxWCdW user: OU=LENDER, O=LENDER, L=London, C=UK topic: platform.session uuid: 50a1b9aa-4c15-4c8e-a744-8df109103837 {actor_id=corda, actor_owningIdentity=OU=BORROWER, O=BORROWER, L=London, C=UK, actor_store_id=NODE_CONFIG, invocation_id=2f62be30-746e-41c5-9939-719d0653c038, invocation_timestamp=2018-06-29T10:36:49.307Z, session_id=9d602c15-c391-434c-9f6c-c44f662e261c, session_timestamp=2018-06-29T06:55:33.044Z} [INFO ] 2018-06-29T11:08:05,281Z [Thread-179 (ActiveMQ-client-global-threads)] messaging.P2PMessagingClient.artemisToCordaMessage - Received message from: p2p.inbound.DjcvsLH1DL2QVRWbG7ucYLKtmraM8ch2RhCL5TEMJxWCdW user: OU=LENDER, O=LENDER, L=London, C=UK topic: platform.session uuid: ff4dd716-caaf-43e5-a462-f64844266659 {actor_id=corda, actor_owningIdentity=OU=BORROWER, O=BORROWER, L=London, C=UK, actor_store_id=NODE_CONFIG, invocation_id=2f62be30-746e-41c5-9939-719d0653c038, invocation_timestamp=2018-06-29T10:36:49.307Z, session_id=9d602c15-c391-434c-9f6c-c44f662e261c, session_timestamp=2018-06-29T06:55:33.044Z} [INFO ] 2018-06-29T11:08:12,669Z [Thread-177 (ActiveMQ-client-global-threads)] messaging.P2PMessagingClient.artemisToCordaMessage - Received message from: p2p.inbound.DjcvsLH1DL2QVRWbG7ucYLKtmraM8ch2RhCL5TEMJxWCdW user: OU=LENDER, O=LENDER, L=London, C=UK topic: platform.session uuid: b2ff1807-b9ef-49dd-aabb-d69253ce5f28 {actor_id=corda, actor_owningIdentity=OU=BORROWER, O=BORROWER, L=London, C=UK, actor_store_id=NODE_CONFIG, invocation_id=2622b6f6-82f7-417b-a1ea-3c2207bb1a03, invocation_timestamp=2018-06-29T11:04:40.745Z, session_id=9d602c15-c391-434c-9f6c-c44f662e261c, session_timestamp=2018-06-29T06:55:33.044Z} [INFO ] 2018-06-29T11:08:15,193Z [Node thread-1] flow.[55168e42-bff4-4d75-94ba-304d63f1a58e].initiateSession - Initiating flow session with party OU=REGULATOR, O=REGULATOR, L=London, C=UK. Session id for tracing purposes is SessionId(toLong=-8884253824391485917). {} [INFO ] 2018-06-29T11:08:16,810Z [Thread-179 (ActiveMQ-client-global-threads)] messaging.P2PMessagingClient.artemisToCordaMessage - Received message from: p2p.inbound.DjcvsLH1DL2QVRWbG7ucYLKtmraM8ch2RhCL5TEMJxWCdW user: OU=REGULATOR, O=REGULATOR, L=London, C=UK topic: platform.session uuid: fd68ae1d-fa64-4a90-aeb5-c987f73836c3 {actor_id=corda, actor_owningIdentity=OU=BORROWER, O=BORROWER, L=London, C=UK, actor_store_id=NODE_CONFIG, invocation_id=2f62be30-746e-41c5-9939-719d0653c038, invocation_timestamp=2018-06-29T10:36:49.307Z, session_id=9d602c15-c391-434c-9f6c-c44f662e261c, session_timestamp=2018-06-29T06:55:33.044Z} [INFO ] 2018-06-29T11:08:19,913Z [Thread-179 (ActiveMQ-client-global-threads)] messaging.P2PMessagingClient.artemisToCordaMessage - Received message from: p2p.inbound.DjcvsLH1DL2QVRWbG7ucYLKtmraM8ch2RhCL5TEMJxWCdW user: OU=REGULATOR, O=REGULATOR, L=London, C=UK topic: platform.session uuid: 3cadd008-4cf4-4e89-bcaf-92200c1f9c08 {actor_id=corda, actor_owningIdentity=OU=BORROWER, O=BORROWER, L=London, C=UK, actor_store_id=NODE_CONFIG, invocation_id=2f62be30-746e-41c5-9939-719d0653c038, invocation_timestamp=2018-06-29T10:36:49.307Z, session_id=9d602c15-c391-434c-9f6c-c44f662e261c, session_timestamp=2018-06-29T06:55:33.044Z} [INFO ] 2018-06-29T11:08:24,468Z [Thread-177 (ActiveMQ-client-global-threads)] messaging.P2PMessagingClient.artemisToCordaMessage - Received message from: p2p.inbound.DjcvsLH1DL2QVRWbG7ucYLKtmraM8ch2RhCL5TEMJxWCdW user: OU=REGULATOR, O=REGULATOR, L=London, C=UK topic: platform.session uuid: 5295d816-0605-42f4-b53a-d34761ed2b03 {actor_id=corda, actor_owningIdentity=OU=BORROWER, O=BORROWER, L=London, C=UK, actor_store_id=NODE_CONFIG, invocation_id=2622b6f6-82f7-417b-a1ea-3c2207bb1a03, invocation_timestamp=2018-06-29T11:04:40.745Z, session_id=9d602c15-c391-434c-9f6c-c44f662e261c, session_timestamp=2018-06-29T06:55:33.044Z} [INFO ] 2018-06-29T11:08:27,325Z [Node thread-1] flow.[55168e42-bff4-4d75-94ba-304d63f1a58e].initiateSession - Initiating flow session with party O=NetworkMapAndNotary, L=London, C=UK. Session id for tracing purposes is SessionId(toLong=4774527641719127102). {} [INFO ] 2018-06-29T11:08:29,355Z [Thread-179 (ActiveMQ-client-global-threads)] messaging.P2PMessagingClient.artemisToCordaMessage - Received message from: p2p.inbound.DjcvsLH1DL2QVRWbG7ucYLKtmraM8ch2RhCL5TEMJxWCdW user: O=NetworkMapAndNotary, L=London, C=UK topic: platform.session uuid: 7a149d3e-cea8-46e4-8d05-09bb43d6d18b {actor_id=corda, actor_owningIdentity=OU=BORROWER, O=BORROWER, L=London, C=UK, actor_store_id=NODE_CONFIG, invocation_id=2f62be30-746e-41c5-9939-719d0653c038, invocation_timestamp=2018-06-29T10:36:49.307Z, session_id=9d602c15-c391-434c-9f6c-c44f662e261c, session_timestamp=2018-06-29T06:55:33.044Z} [INFO ] 2018-06-29T11:08:32,224Z [Thread-179 (ActiveMQ-client-global-threads)] messaging.P2PMessagingClient.artemisToCordaMessage - Received message from: p2p.inbound.DjcvsLH1DL2QVRWbG7ucYLKtmraM8ch2RhCL5TEMJxWCdW user: O=NetworkMapAndNotary, L=London, C=UK topic: platform.session uuid: eb1b0a8c-a759-47aa-96f5-57e4a3ec27a4 {actor_id=corda, actor_owningIdentity=OU=BORROWER, O=BORROWER, L=London, C=UK, actor_store_id=NODE_CONFIG, invocation_id=2f62be30-746e-41c5-9939-719d0653c038, invocation_timestamp=2018-06-29T10:36:49.307Z, session_id=9d602c15-c391-434c-9f6c-c44f662e261c, session_timestamp=2018-06-29T06:55:33.044Z} [INFO ] 2018-06-29T11:08:35,331Z [Thread-179 (ActiveMQ-client-global-threads)] messaging.P2PMessagingClient.artemisToCordaMessage - Received message from: p2p.inbound.DjcvsLH1DL2QVRWbG7ucYLKtmraM8ch2RhCL5TEMJxWCdW user: O=NetworkMapAndNotary, L=London, C=UK topic: platform.session uuid: f25ea565-23b0-4dd6-bb2d-38fe9c5f0529 {actor_id=corda, actor_owningIdentity=OU=BORROWER, O=BORROWER, L=London, C=UK, actor_store_id=NODE_CONFIG, invocation_id=2f62be30-746e-41c5-9939-719d0653c038, invocation_timestamp=2018-06-29T10:36:49.307Z, session_id=9d602c15-c391-434c-9f6c-c44f662e261c, session_timestamp=2018-06-29T06:55:33.044Z} [INFO ] 2018-06-29T11:08:35,339Z [Node thread-1] vault.NodeVaultService._queryBy - Vault Query for contract type: interface net.corda.core.contracts.ContractState, criteria: VaultQueryCriteria(status=UNCONSUMED, contractStateTypes=null, stateRefs=[AA7F52DA4BC71835C46FCFBA4542372DC261F9885BA8B2614A9C111D24A5091A(0), 19CCA05079E7F5F34EB91C50F1EA7D7D7599662BB55A57B65E91F6D7BFE63602(1)], notary=null, softLockingCondition=null, timeCondition=null), pagination: PageSpecification(pageNumber=-1, pageSize=200), sorting: Sort(columns=[]) {} [INFO ] 2018-06-29T11:08:35,382Z [Node thread-1] flow.[55168e42-bff4-4d75-94ba-304d63f1a58e].initiateSession - Initiating flow session with party OU=LENDER, O=LENDER, L=London, C=UK. Session id for tracing purposes is SessionId(toLong=-607600376681252697). {} [INFO ] 2018-06-29T11:08:36,936Z [Thread-179 (ActiveMQ-client-global-threads)] messaging.P2PMessagingClient.artemisToCordaMessage - Received message from: p2p.inbound.DjcvsLH1DL2QVRWbG7ucYLKtmraM8ch2RhCL5TEMJxWCdW user: OU=LENDER, O=LENDER, L=London, C=UK topic: platform.session uuid: 64b87ae0-e744-4b56-aff6-25d4a2ef7c34 {actor_id=corda, actor_owningIdentity=OU=BORROWER, O=BORROWER, L=London, C=UK, actor_store_id=NODE_CONFIG, invocation_id=2f62be30-746e-41c5-9939-719d0653c038, invocation_timestamp=2018-06-29T10:36:49.307Z, session_id=9d602c15-c391-434c-9f6c-c44f662e261c, session_timestamp=2018-06-29T06:55:33.044Z} [INFO ] 2018-06-29T11:08:39,844Z [Thread-179 (ActiveMQ-client-global-threads)] messaging.P2PMessagingClient.artemisToCordaMessage - Received message from: p2p.inbound.DjcvsLH1DL2QVRWbG7ucYLKtmraM8ch2RhCL5TEMJxWCdW user: OU=LENDER, O=LENDER, L=London, C=UK topic: platform.session uuid: 8a5520a9-fafa-48b0-82cb-a951b60f6a4c {actor_id=corda, actor_owningIdentity=OU=BORROWER, O=BORROWER, L=London, C=UK, actor_store_id=NODE_CONFIG, invocation_id=2f62be30-746e-41c5-9939-719d0653c038, invocation_timestamp=2018-06-29T10:36:49.307Z, session_id=9d602c15-c391-434c-9f6c-c44f662e261c, session_timestamp=2018-06-29T06:55:33.044Z} [INFO ] 2018-06-29T11:08:42,980Z [Thread-179 (ActiveMQ-client-global-threads)] messaging.P2PMessagingClient.artemisToCordaMessage - Received message from: p2p.inbound.DjcvsLH1DL2QVRWbG7ucYLKtmraM8ch2RhCL5TEMJxWCdW user: OU=LENDER, O=LENDER, L=London, C=UK topic: platform.session uuid: 0760d9e0-9f6f-47e7-8875-0a89a805c8e3 {actor_id=corda, actor_owningIdentity=OU=BORROWER, O=BORROWER, L=London, C=UK, actor_store_id=NODE_CONFIG, invocation_id=2f62be30-746e-41c5-9939-719d0653c038, invocation_timestamp=2018-06-29T10:36:49.307Z, session_id=9d602c15-c391-434c-9f6c-c44f662e261c, session_timestamp=2018-06-29T06:55:33.044Z} [INFO ] 2018-06-29T11:08:42,981Z [Node thread-1] flow.[55168e42-bff4-4d75-94ba-304d63f1a58e].initiateSession - Initiating flow session with party OU=REGULATOR, O=REGULATOR, L=London, C=UK. Session id for tracing purposes is SessionId(toLong=4404924816331214061). {} [INFO ] 2018-06-29T11:08:46,011Z [Thread-179 (ActiveMQ-client-global-threads)] messaging.P2PMessagingClient.artemisToCordaMessage - Received message from: p2p.inbound.DjcvsLH1DL2QVRWbG7ucYLKtmraM8ch2RhCL5TEMJxWCdW user: OU=REGULATOR, O=REGULATOR, L=London, C=UK topic: platform.session uuid: 2ff5f6ee-59af-4e96-b9e5-b081cc59e5b7 {actor_id=corda, actor_owningIdentity=OU=BORROWER, O=BORROWER, L=London, C=UK, actor_store_id=NODE_CONFIG, invocation_id=2f62be30-746e-41c5-9939-719d0653c038, invocation_timestamp=2018-06-29T10:36:49.307Z, session_id=9d602c15-c391-434c-9f6c-c44f662e261c, session_timestamp=2018-06-29T06:55:33.044Z} [INFO ] 2018-06-29T11:08:47,435Z [Thread-179 (ActiveMQ-client-global-threads)] messaging.P2PMessagingClient.artemisToCordaMessage - Received message from: p2p.inbound.DjcvsLH1DL2QVRWbG7ucYLKtmraM8ch2RhCL5TEMJxWCdW user: OU=REGULATOR, O=REGULATOR, L=London, C=UK topic: platform.session uuid: 24e23ab9-3a38-4b26-a1dc-b113332bfa20 {actor_id=corda, actor_owningIdentity=OU=BORROWER, O=BORROWER, L=London, C=UK, actor_store_id=NODE_CONFIG, invocation_id=2f62be30-746e-41c5-9939-719d0653c038, invocation_timestamp=2018-06-29T10:36:49.307Z, session_id=9d602c15-c391-434c-9f6c-c44f662e261c, session_timestamp=2018-06-29T06:55:33.044Z} [INFO ] 2018-06-29T11:08:50,487Z [Thread-179 (ActiveMQ-client-global-threads)] messaging.P2PMessagingClient.artemisToCordaMessage - Received message from: p2p.inbound.DjcvsLH1DL2QVRWbG7ucYLKtmraM8ch2RhCL5TEMJxWCdW user: OU=REGULATOR, O=REGULATOR, L=London, C=UK topic: platform.session uuid: fbf75fab-5250-4a80-a3e6-96cf30c66082 {actor_id=corda, actor_owningIdentity=OU=BORROWER, O=BORROWER, L=London, C=UK, actor_store_id=NODE_CONFIG, invocation_id=2f62be30-746e-41c5-9939-719d0653c038, invocation_timestamp=2018-06-29T10:36:49.307Z, session_id=9d602c15-c391-434c-9f6c-c44f662e261c, session_timestamp=2018-06-29T06:55:33.044Z}
答案 0 :(得分:0)
在Corda中,节点每次在流中发送或接收信息时都会创建一个检查点(这些检查点过时会自动删除)。创建此检查点所需的时间部分取决于要序列化的对象的数量。
在这种情况下,for
循环的每次迭代都将一个新对象添加到列表中。随着列表的增加,检查点花费的时间越来越长。