[jira] [Commented] (NIFI-3229) When a queue contains only Penalized FlowFile's the next processor Tasks/Time statistics becomes extremely large

2020-04-22 Thread Peter Wicks (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17090172#comment-17090172
 ] 

Peter Wicks commented on NIFI-3229:
---

[~Kirhold] I've unassigned myself from this ticket. While I agree that I too 
would like to see a fix, but after discussing this with one of the experts, I 
don't know of the correct path forward. Would love to have someone else pick up 
the case.

> When a queue contains only Penalized FlowFile's the next processor Tasks/Time 
> statistics becomes extremely large
> 
>
> Key: NIFI-3229
> URL: https://issues.apache.org/jira/browse/NIFI-3229
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Dmitry Lukyanov
>Priority: Minor
> Attachments: flow.xml.gz, nifi-stats.png, nifi-stats2.png
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> fetchfile on `not.found` produces penalized flow file
> in this case i'm expecting the next processor will do one task execution when 
> flow file penalize time over.
> but according to stats it executes approximately 1-6 times.
> i understand that it could be a feature but stats became really unclear...
> maybe there should be two columns? 
> `All Task/Times` and `Committed Task/Times`



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (NIFI-3229) When a queue contains only Penalized FlowFile's the next processor Tasks/Time statistics becomes extremely large

2020-04-21 Thread Kirhold (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17089336#comment-17089336
 ] 

Kirhold commented on NIFI-3229:
---

I don't think it is an improvement but a bug. When there is penalized file in 
incoming queue and processor's run schedule is set to 0, then CPU load is 
significantly higher. As a workaround we set 10 sec per "small" processor, but 
it is problematic for processors that has more incoming files and take one file 
per run - then, we need keep 0sec.

I hope it can be resolved in future releases.

> When a queue contains only Penalized FlowFile's the next processor Tasks/Time 
> statistics becomes extremely large
> 
>
> Key: NIFI-3229
> URL: https://issues.apache.org/jira/browse/NIFI-3229
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Dmitry Lukyanov
>Assignee: Peter Wicks
>Priority: Minor
> Attachments: flow.xml.gz, nifi-stats.png, nifi-stats2.png
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> fetchfile on `not.found` produces penalized flow file
> in this case i'm expecting the next processor will do one task execution when 
> flow file penalize time over.
> but according to stats it executes approximately 1-6 times.
> i understand that it could be a feature but stats became really unclear...
> maybe there should be two columns? 
> `All Task/Times` and `Committed Task/Times`



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (NIFI-3229) When a queue contains only Penalized FlowFile's the next processor Tasks/Time statistics becomes extremely large

2018-12-04 Thread Nicholas Carenza (JIRA)


[ 
https://issues.apache.org/jira/browse/NIFI-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16708944#comment-16708944
 ] 

Nicholas Carenza commented on NIFI-3229:


What's next for this?

> When a queue contains only Penalized FlowFile's the next processor Tasks/Time 
> statistics becomes extremely large
> 
>
> Key: NIFI-3229
> URL: https://issues.apache.org/jira/browse/NIFI-3229
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Dmitry Lukyanov
>Assignee: Peter Wicks
>Priority: Minor
> Attachments: flow.xml.gz, nifi-stats.png, nifi-stats2.png
>
>
> fetchfile on `not.found` produces penalized flow file
> in this case i'm expecting the next processor will do one task execution when 
> flow file penalize time over.
> but according to stats it executes approximately 1-6 times.
> i understand that it could be a feature but stats became really unclear...
> maybe there should be two columns? 
> `All Task/Times` and `Committed Task/Times`



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (NIFI-3229) When a queue contains only Penalized FlowFile's the next processor Tasks/Time statistics becomes extremely large

2018-11-14 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/NIFI-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16687117#comment-16687117
 ] 

ASF GitHub Bot commented on NIFI-3229:
--

Github user patricker commented on the issue:

https://github.com/apache/nifi/pull/3131
  
@markap14 I built unit tests, but I'm having trouble running them at scale. 
I temporarily checked back in the original method so I could run side-by-side 
speed comparisons on the same `Connectable`. But if I exceed about 100k tests 
my unit tests seem to go out to lunch, even if I increase heap so they don't 
run out.

These are checked in right now to run 1 million iterations, but that has 
not succeeded for me... This is true of the unmodified method if run by itself 
also (at least on my poor little computer).


> When a queue contains only Penalized FlowFile's the next processor Tasks/Time 
> statistics becomes extremely large
> 
>
> Key: NIFI-3229
> URL: https://issues.apache.org/jira/browse/NIFI-3229
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Dmitry Lukyanov
>Assignee: Peter Wicks
>Priority: Minor
> Attachments: flow.xml.gz, nifi-stats.png, nifi-stats2.png
>
>
> fetchfile on `not.found` produces penalized flow file
> in this case i'm expecting the next processor will do one task execution when 
> flow file penalize time over.
> but according to stats it executes approximately 1-6 times.
> i understand that it could be a feature but stats became really unclear...
> maybe there should be two columns? 
> `All Task/Times` and `Committed Task/Times`



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (NIFI-3229) When a queue contains only Penalized FlowFile's the next processor Tasks/Time statistics becomes extremely large

2018-11-12 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/NIFI-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16683939#comment-16683939
 ] 

ASF GitHub Bot commented on NIFI-3229:
--

Github user patricker commented on the issue:

https://github.com/apache/nifi/pull/3131
  
@markap14 Sounds reasonable, I'll work on it.


> When a queue contains only Penalized FlowFile's the next processor Tasks/Time 
> statistics becomes extremely large
> 
>
> Key: NIFI-3229
> URL: https://issues.apache.org/jira/browse/NIFI-3229
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Dmitry Lukyanov
>Assignee: Peter Wicks
>Priority: Minor
> Attachments: flow.xml.gz, nifi-stats.png, nifi-stats2.png
>
>
> fetchfile on `not.found` produces penalized flow file
> in this case i'm expecting the next processor will do one task execution when 
> flow file penalize time over.
> but according to stats it executes approximately 1-6 times.
> i understand that it could be a feature but stats became really unclear...
> maybe there should be two columns? 
> `All Task/Times` and `Committed Task/Times`



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (NIFI-3229) When a queue contains only Penalized FlowFile's the next processor Tasks/Time statistics becomes extremely large

2018-11-12 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/NIFI-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16683895#comment-16683895
 ] 

ASF GitHub Bot commented on NIFI-3229:
--

Github user markap14 commented on the issue:

https://github.com/apache/nifi/pull/3131
  
@patricker you're right - it may perform just fine. However, the concern is 
not that we are holding a lock longer but rather that we are obtaining it twice 
as often now when there's data queued. The acquisition of the lock itself can 
be expensive. So all I am suggesting is that we don't want to make such a 
change without knowing how it's going to affect things. We'd want to gather 
some performance numbers before and after this changeset is applied.

Specifically, I'd want to setup a test suite that calculates things like:
How long does it take to check if there are FlowFiles queued 10 million 
times when there are no FlowFiles queued?
How long does it take to check if there are FlowFiles queued 10 million 
times when there are FlowFiles queued?
How do these numbers change when you have 1 thread vs. 2 threads vs. 12 
threads vs. 25 threads?

I'd want to run these tests 10-20 times in a row to ensure that the numbers 
are steady, and then get these numbers before and after the changeset is 
applied.
If the worst-case differs by say 5% then it's probably fine. If the worse 
case differs by say 50% then it probably makes sense to look for a different 
solution.


> When a queue contains only Penalized FlowFile's the next processor Tasks/Time 
> statistics becomes extremely large
> 
>
> Key: NIFI-3229
> URL: https://issues.apache.org/jira/browse/NIFI-3229
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Dmitry Lukyanov
>Assignee: Peter Wicks
>Priority: Minor
> Attachments: flow.xml.gz, nifi-stats.png, nifi-stats2.png
>
>
> fetchfile on `not.found` produces penalized flow file
> in this case i'm expecting the next processor will do one task execution when 
> flow file penalize time over.
> but according to stats it executes approximately 1-6 times.
> i understand that it could be a feature but stats became really unclear...
> maybe there should be two columns? 
> `All Task/Times` and `Committed Task/Times`



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (NIFI-3229) When a queue contains only Penalized FlowFile's the next processor Tasks/Time statistics becomes extremely large

2018-11-09 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/NIFI-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16681908#comment-16681908
 ] 

ASF GitHub Bot commented on NIFI-3229:
--

Github user patricker commented on the issue:

https://github.com/apache/nifi/pull/3131
  
@markap14 I was worried about the same thing, which is why the `if` 
statement is structured as it is. First, we do the standard check on 
`isActiveQueueEmpty`. This happens in the code now as you mentioned, and right 
now if this passes we create a writelock update the queue and call the 
processor.

All my change does is add one additional check, but only if the queue is 
not empty. So as far as I can tell, I'm locking one extra time for a queue that 
is already going to get locked, but not locking any queues that would not 
already get locked. Also, because I'm updating the queue during my check, when 
the processor does get called the lock should not last as long as it would 
otherwise, as there is less work to do. So overall lock time should be affected 
only minimally. Thoughts?


> When a queue contains only Penalized FlowFile's the next processor Tasks/Time 
> statistics becomes extremely large
> 
>
> Key: NIFI-3229
> URL: https://issues.apache.org/jira/browse/NIFI-3229
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Dmitry Lukyanov
>Assignee: Peter Wicks
>Priority: Minor
> Attachments: flow.xml.gz, nifi-stats.png, nifi-stats2.png
>
>
> fetchfile on `not.found` produces penalized flow file
> in this case i'm expecting the next processor will do one task execution when 
> flow file penalize time over.
> but according to stats it executes approximately 1-6 times.
> i understand that it could be a feature but stats became really unclear...
> maybe there should be two columns? 
> `All Task/Times` and `Committed Task/Times`



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (NIFI-3229) When a queue contains only Penalized FlowFile's the next processor Tasks/Time statistics becomes extremely large

2018-11-09 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/NIFI-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16681881#comment-16681881
 ] 

ASF GitHub Bot commented on NIFI-3229:
--

Github user markap14 commented on the issue:

https://github.com/apache/nifi/pull/3131
  
@patricker thanks for the PR! I had gone down this path before but I backed 
out the changes. The changes in this PR will result in obtaining a Write Lock 
on the queue of every incoming connection for every running processor in the 
graph. This can become quite expensive for a complex flow that is made up of 
thousands (or even 10's of thousands) of processors) and result in overall 
system performance suffering. This is why we are so care in the FlowFile 
Queue's implementation to ensure that isActiveQueueEmpty() never obtains a lock 
but instead only references AtomicReference variables.

We should be able to do better, though. For example, when we pull a 
FlowFile from the queue, we check if it's penalized. If so, we throw it back 
on. Since the queue is ordered, we could do some smart things like looking at 
the FlowFile expiration date, then keeping track of the fact that we know all 
FlowFiles are penalized until that time is reached - or until a non-penalized 
FlowFile is added to the queue.


> When a queue contains only Penalized FlowFile's the next processor Tasks/Time 
> statistics becomes extremely large
> 
>
> Key: NIFI-3229
> URL: https://issues.apache.org/jira/browse/NIFI-3229
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Dmitry Lukyanov
>Assignee: Peter Wicks
>Priority: Minor
> Attachments: flow.xml.gz, nifi-stats.png, nifi-stats2.png
>
>
> fetchfile on `not.found` produces penalized flow file
> in this case i'm expecting the next processor will do one task execution when 
> flow file penalize time over.
> but according to stats it executes approximately 1-6 times.
> i understand that it could be a feature but stats became really unclear...
> maybe there should be two columns? 
> `All Task/Times` and `Committed Task/Times`



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (NIFI-3229) When a queue contains only Penalized FlowFile's the next processor Tasks/Time statistics becomes extremely large

2018-11-05 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/NIFI-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16675682#comment-16675682
 ] 

ASF GitHub Bot commented on NIFI-3229:
--

GitHub user patricker opened a pull request:

https://github.com/apache/nifi/pull/3131

NIFI-3229 When a queue contains only Penalized FlowFile's the next pr…

…ocessor Tasks/Time statistics becomes extremely large

### For all changes:
- [x] Is there a JIRA ticket associated with this PR? Is it referenced 
 in the commit message?

- [x] Does your PR title start with NIFI- where  is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.

- [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?

- [x] Is your initial contribution a single, squashed commit?

### For code changes:
- [ ] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
- [ ] Have you written or updated unit tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
- [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
- [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
- [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?

### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in 
which it is rendered?

### Note:
Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/patricker/nifi NIFI-3229

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/nifi/pull/3131.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #3131


commit 3a42c7b671972001ed912ef8e907d5b8658554e9
Author: patricker 
Date:   2018-11-05T18:33:11Z

NIFI-3229 When a queue contains only Penalized FlowFile's the next 
processor Tasks/Time statistics becomes extremely large




> When a queue contains only Penalized FlowFile's the next processor Tasks/Time 
> statistics becomes extremely large
> 
>
> Key: NIFI-3229
> URL: https://issues.apache.org/jira/browse/NIFI-3229
> Project: Apache NiFi
>  Issue Type: Improvement
>Reporter: Dmitry Lukyanov
>Assignee: Peter Wicks
>Priority: Minor
> Attachments: flow.xml.gz, nifi-stats.png, nifi-stats2.png
>
>
> fetchfile on `not.found` produces penalized flow file
> in this case i'm expecting the next processor will do one task execution when 
> flow file penalize time over.
> but according to stats it executes approximately 1-6 times.
> i understand that it could be a feature but stats became really unclear...
> maybe there should be two columns? 
> `All Task/Times` and `Committed Task/Times`



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)