conductor icon indicating copy to clipboard operation
conductor copied to clipboard

[Question] performance problems for decider queue

Open ro9er opened this issue 8 years ago • 17 comments

Hi, I have tried to do a performance test on conductor. This is the workflow diagram using a fork and join task. image The other tasks are all executed by workers. The thread pool size of the worker is 800, the task poll interval is 200 and the batch poll count is 20. I do testing by jmeter. The result is as follows: image I have gone through the data collected by spectator. The queue waiting time and task execution time keep stable. I viewed the code and found the bottleneck exists in the workflowSweeper. When tasks have been updated, workflows would be moved to decider queue and wait for sweeper to commit to the executor pool. The ability of consumers does not match the producer. In the process of testing, the size of decider queue kept increasing, which made the execution time of workflow kept raising. I haven tried to increase the executor pool size, but it doesn't make sense. I have noticed the sweeper thread invokes get of every future returned by the executor thread. Is there any ideas behind this code? Is there any document illustrate that?

In addition, I discovered another problem. In the performance testing, such situation appears. image The whole workflow execution finished while the status kept running. I think the bug still caused by the sweeper code.

Looking forward for your reply! Thanks for your help!

ro9er avatar Jul 20 '18 16:07 ro9er

Do you see an exception from conductor-server when the workflow is showing incorrect status?

saidatta avatar Jul 23 '18 06:07 saidatta

There is no error

ro9er avatar Jul 23 '18 06:07 ro9er

The whole workflow execution finished while the status kept running. I had the same problem. problum

I-am-william-tech avatar Jul 27 '18 06:07 I-am-william-tech

@ro9er @peng-w : Can you guys share the workflow and the task definitions (timeout values and retries).

mudit3774 avatar Jul 27 '18 07:07 mudit3774

the workflow definition is as follows: { "name": "demo", "description": "demo", "version": 3, "tasks": [ { "name": "dubboTask1", "taskReferenceName": "d1", "type": "SIMPLE", "inputParameters": { } }, { "name": "dubboTask2", "taskReferenceName": "d2", "type": "SIMPLE", "inputParameters": { } }, { "name": "forktask", "taskReferenceName": "forktask", "type": "FORK_JOIN", "inputParameters": { }, "forkTasks": [ [ { "name": "dubboTask3", "taskReferenceName": "d31", "type": "SIMPLE", "inputParameters": { } } ], [ { "name": "dubboTask4", "taskReferenceName": "d32", "type": "SIMPLE", "inputParameters": { } } ] ] }, { "name": "joinTask", "taskReferenceName": "joinTask", "type": "JOIN", "inputParameters": {}, "joinOn":["d31", "d32"] }, { "name": "notifyTask", "taskReferenceName": "d5", "type": "SIMPLE", "inputParameters": { } } ], "inputParameters": [], "schemaVersion": 2 }

One of the take definitions as as follows, others are the same except the task name: [ { "createdBy": "roger", "updatedBy": "roger", "name": "notifyTask", "description": "string", "retryCount": 0, "timeoutSeconds": 0, "inputKeys": [ "string" ], "outputKeys": [ "string" ], "timeoutPolicy": "RETRY", "retryLogic": "FIXED", "retryDelaySeconds": 0, "responseTimeoutSeconds": 0, "concurrentExecLimit": 0, "inputTemplate": {} } ]

ro9er avatar Jul 27 '18 09:07 ro9er

1、Metadata -> Tasks [ { "name": "forktask", "retryCount": 3, "timeoutSeconds": 1200, "timeoutPolicy": "TIME_OUT_WF", "retryLogic": "FIXED", "retryDelaySeconds": 600, "responseTimeoutSeconds": 3600 }, { "name": "mytask11", "retryCount": 3, "timeoutSeconds": 1200, "timeoutPolicy": "TIME_OUT_WF", "retryLogic": "FIXED", "retryDelaySeconds": 600, "responseTimeoutSeconds": 3600 }, { "name": "mytask12", "retryCount": 3, "timeoutSeconds": 1200, "timeoutPolicy": "TIME_OUT_WF", "retryLogic": "FIXED", "retryDelaySeconds": 600, "responseTimeoutSeconds": 3600 }, { "name": "mytask21", "retryCount": 3, "timeoutSeconds": 1200, "timeoutPolicy": "TIME_OUT_WF", "retryLogic": "FIXED", "retryDelaySeconds": 600, "responseTimeoutSeconds": 3600 }, { "name": "mytask22", "retryCount": 3, "timeoutSeconds": 1200, "timeoutPolicy": "TIME_OUT_WF", "retryLogic": "FIXED", "retryDelaySeconds": 600, "responseTimeoutSeconds": 3600 }, { "name": "jointask", "retryCount": 3, "timeoutSeconds": 1200, "timeoutPolicy": "TIME_OUT_WF", "retryLogic": "FIXED", "retryDelaySeconds": 600, "responseTimeoutSeconds": 3600 } ]

2、Metadata -> Workflow Defs [ { "name": "myworkflow1", "description": "my workflow for test", "version": 1, "tasks": [ { "name": "forktask", "taskReferenceName": "forktask", "type": "FORK_JOIN", "forkTasks": [ [ { "name": "mytask11", "taskReferenceName": "mytask11", "type": "SIMPLE" }, { "name": "mytask12", "taskReferenceName": "mytask12", "type": "SIMPLE" } ], [ { "name": "mytask21", "taskReferenceName": "mytask21", "type": "SIMPLE" }, { "name": "mytask22", "taskReferenceName": "mytask22", "type": "SIMPLE" } ] ] }, { "name": "taskjoin", "taskReferenceName": "taskjoin", "type": "JOIN", "joinOn": [ "mytask12", "mytask22" ] } ], "schemaVersion": 2 } ]

3、Execution

4、The version of conductor is 1.10.4

I-am-william-tech avatar Jul 28 '18 03:07 I-am-william-tech

You mentioned that whole work flow is finished..Can u please provide the workflow input being used..

dileepkeely avatar Aug 03 '18 19:08 dileepkeely

there's no input and output. its just a demo to test performance

ro9er avatar Aug 04 '18 12:08 ro9er

Where did u define the metadata of the tasks ?? Is it in the workflow def?

[ { "createdBy": "roger", "updatedBy": "roger", "name": "notifyTask", "description": "string", "retryCount": 0, "timeoutSeconds": 0, "inputKeys": [ "string" ], "outputKeys": [ "string" ], "timeoutPolicy": "RETRY", "retryLogic": "FIXED", "retryDelaySeconds": 0, "responseTimeoutSeconds": 0, "concurrentExecLimit": 0, "inputTemplate": {} } ]

How was the Json passed as input?

sreenivasulumd avatar Aug 08 '18 14:08 sreenivasulumd

Hi guys, any updates one this, we also met this issue, all tasks finished but workflow showing as RUNNING

JasperB avatar Nov 21 '18 05:11 JasperB

Hi Guys, Even we have encountered the same issue where the workflow finished executing all the task successfully but the workflow status is in Running state forever.

We are using version 2.5.2 & MySQL.

Appreciate any help!

surajrrao avatar Jan 11 '19 22:01 surajrrao

We're aware of this issue, and have this on our roadmap. But, we don't have resources to fix this immediately. If anyone would like to take this up in between, please feel free to send in a PR.

kishorebanala avatar Jan 14 '19 23:01 kishorebanala

This issue to related to https://github.com/Netflix/conductor/issues/871. Closing this, Please continue the discussion forward in #871.

kishorebanala avatar Jan 14 '19 23:01 kishorebanala

Hi guys,

We are currently running 2.8.1 version here and after running some performance tests using a workflow definition with ten http tasks forked, we had the same issue that was pointed here by @ro9er. Since in #871 there is a PR related already merged on conductor's master, we tought that this problem wouldn't happen again, but it did.

After running our performance test we observed this log on conductor from different threads (workers):

Image

Since #871 identifies two different problems in the same issue (race condition by workers causing incorrect workflow status and same task polled by different workers) I think that this issue is better for continuing the discussion since it only discuss one of that problems (and the one that we are facing here).

Are you guys facing this issue as well? @surajrrao @JasperB @ro9er

We noticed as well that Sweeper is now enabled by default, but how can this help us in this race conditions' cases? (it should help?) @kishorebanala @apanicker-nflx @cyzhao

emiteze avatar Mar 12 '19 21:03 emiteze

The whole workflow execution finished while the status kept running. I had the same problem. problum

what is the url?

yanghaogn avatar Mar 01 '22 08:03 yanghaogn

@yanghaogn This is a screenshot from the old UI, the new UI does not have a RUNNING tab, rather you can search by RUNNING status on the Executions page and click into the result. image

apanicker-nflx avatar Mar 07 '22 22:03 apanicker-nflx

Thanks for your reply

yanghaogn avatar Mar 08 '22 12:03 yanghaogn