<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Setting many process variables through async service tasks slows down process execution performance in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/setting-many-process-variables-through-async-service-tasks-slows/m-p/19527#M8629</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm testing activiti performance with a slightly tweaked version of Joram Barrez activiti-benchmark project from github.&lt;/P&gt;&lt;P&gt;The activiti version is 6.0.0&lt;BR /&gt;I'm using MariaDb 10.2 running in a docker container as database backend.&lt;/P&gt;&lt;P&gt;My tweaked version uses another workflow than the ones used by Joram.&lt;BR /&gt;This workflow contains 10 service tasks and 10 script tasks.&lt;BR /&gt;All tasks are executed sequentially (no parallel gateways or the like).&lt;/P&gt;&lt;P&gt;The service tasks are realized by a descendant of TaskActivityBehavior, so they are being executed asynchronously.&lt;/P&gt;&lt;P&gt;The script tasks don't do anything besides creating a variable: var x = 0;&lt;/P&gt;&lt;P&gt;I adapted Joram's approach to complete user tasks for my needs to trigger my service tasks.&lt;/P&gt;&lt;P&gt;I tested two scenarios:&lt;/P&gt;&lt;P&gt;A: The service tasks don't set any process variables&lt;BR /&gt;B: The service tasks set 100 process variables per service task call&lt;/P&gt;&lt;P&gt;The tests were executed with up to 20 threads, which means up to 20 processes in parallel.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When setting many process variables in a scenario where many processes were executed in parallel,&lt;BR /&gt;the execution time per process increases a lot.&lt;/P&gt;&lt;P&gt;After further analysis, I found out, that setting a lot of variables leads to a lot of database call.&lt;/P&gt;&lt;P&gt;Here is what I'd like to know:&lt;/P&gt;&lt;P&gt;1. Is my observation correct, that setting many process variables causes the increase in average execution time for a process?&lt;BR /&gt;2. Is there a way to set process variables with less overhead?&lt;BR /&gt;3. Is there a suggestion for how many processes to start simultaneously with workflows of the described size (10 service tasks, 10 script tasks)?&lt;BR /&gt;I know, this heavily depends on the hardware activity runs on and probably also on the database. But maybe there is a rule of thumbs?&lt;/P&gt;&lt;P&gt;I'd like to add my benchmark results but can't find a way to attach a file to this post.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;Andi&lt;/P&gt;</description>
    <pubDate>Fri, 11 Oct 2019 11:45:56 GMT</pubDate>
    <dc:creator>andreasries</dc:creator>
    <dc:date>2019-10-11T11:45:56Z</dc:date>
    <item>
      <title>Setting many process variables through async service tasks slows down process execution performance</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/setting-many-process-variables-through-async-service-tasks-slows/m-p/19527#M8629</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm testing activiti performance with a slightly tweaked version of Joram Barrez activiti-benchmark project from github.&lt;/P&gt;&lt;P&gt;The activiti version is 6.0.0&lt;BR /&gt;I'm using MariaDb 10.2 running in a docker container as database backend.&lt;/P&gt;&lt;P&gt;My tweaked version uses another workflow than the ones used by Joram.&lt;BR /&gt;This workflow contains 10 service tasks and 10 script tasks.&lt;BR /&gt;All tasks are executed sequentially (no parallel gateways or the like).&lt;/P&gt;&lt;P&gt;The service tasks are realized by a descendant of TaskActivityBehavior, so they are being executed asynchronously.&lt;/P&gt;&lt;P&gt;The script tasks don't do anything besides creating a variable: var x = 0;&lt;/P&gt;&lt;P&gt;I adapted Joram's approach to complete user tasks for my needs to trigger my service tasks.&lt;/P&gt;&lt;P&gt;I tested two scenarios:&lt;/P&gt;&lt;P&gt;A: The service tasks don't set any process variables&lt;BR /&gt;B: The service tasks set 100 process variables per service task call&lt;/P&gt;&lt;P&gt;The tests were executed with up to 20 threads, which means up to 20 processes in parallel.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When setting many process variables in a scenario where many processes were executed in parallel,&lt;BR /&gt;the execution time per process increases a lot.&lt;/P&gt;&lt;P&gt;After further analysis, I found out, that setting a lot of variables leads to a lot of database call.&lt;/P&gt;&lt;P&gt;Here is what I'd like to know:&lt;/P&gt;&lt;P&gt;1. Is my observation correct, that setting many process variables causes the increase in average execution time for a process?&lt;BR /&gt;2. Is there a way to set process variables with less overhead?&lt;BR /&gt;3. Is there a suggestion for how many processes to start simultaneously with workflows of the described size (10 service tasks, 10 script tasks)?&lt;BR /&gt;I know, this heavily depends on the hardware activity runs on and probably also on the database. But maybe there is a rule of thumbs?&lt;/P&gt;&lt;P&gt;I'd like to add my benchmark results but can't find a way to attach a file to this post.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;Andi&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 11:45:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/setting-many-process-variables-through-async-service-tasks-slows/m-p/19527#M8629</guid>
      <dc:creator>andreasries</dc:creator>
      <dc:date>2019-10-11T11:45:56Z</dc:date>
    </item>
  </channel>
</rss>

