Member since
07-30-2019
3473
Posts
1642
Kudos Received
1021
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 309 | 06-15-2026 08:08 AM | |
| 530 | 06-03-2026 06:06 PM | |
| 754 | 05-06-2026 09:16 AM | |
| 1753 | 05-04-2026 05:20 AM | |
| 845 | 05-01-2026 10:15 AM |
02-21-2023
09:20 AM
@PurpleK It is not clear what you mean when you say "Files that are in the 500GB+ range are taking several hours to move onto the unpack stage.". So FlowFile(s) are released to a downstream connection until processing of the source file is complete. The source file will still be represented in the queued count of the connection feeding a processors even while that processor is executing on that FlowFile. When you moving on to unpack stage, are you referring to some upstream processor feeding the connection to the UnpackContent processor taking awhile to queue some FlowFile on that downstream connection, or are you referring to once the file is queued it take awhile for unpack to complete execution on it creating on the unpacked FlowFiles and then remove original zip from upstream connection queue? Step 1 is identify the exact place(s) it is slow. Adding additional concurrent tasks to a processor has no impact on speeding up the execution on a specific source FlowFile. 1 thread get assigned to each execution of the processor and in the case of unpackContent, each tread executes against 1 FlowFile from upstream connection. Adding multiple concurrent tasks will allow multiple upstream FlowFiles to be processed concurrently. IMPORTANT: Increment concurrent tasks slowly while monitoring CPU load averages. Adding too many concurrent tasks on any one processor can impact other processors in your dataflow Event Driven Processor scheduling strategy is deprecated and will eventually go away (mostly like next major release) and should not be used. So increasing the Max Event driven Thread count under controller settings will have no impact unless you are using that strategy in your flow. It does create event threads, but they would not consume CPU if you are not using event driven scheduling anywhere in your dataflow(s). NiFi is a data agnostic service, meaning it can handle any stat type in its raw binary format. NiFi can do this because it wraps that binary content in a NiFi FlowFile. A NiFi FlowFile is what you see moving form processor to processor in your dataflows and int becomes the responsibility of the processor to understand the FlowFile's content should it need to read it. I bring this up because a FlowFile adds a small bit of overhead as it has to generate FlowFile metadata for every FlowFile created. When it comes to your 500GB+ zip files... 1. Do they consist of many small and/or large files? NiFi must create a FlowFile for each file that results from unpacking the original zip. 2. Do you see a lot of Java Garbage Collection (GC) pauses happening? All GC is stop the world. GC is normal operation or any JVM, but if GC is happening very often it can impact flow performance with constant pauses due to stop the world nature of GC. The larger the JVM memory that longer the stop the world event will be. 3. Any exceptions in your niif-app.log? You may also find this article helpful, it is old but majority of guidance is still very valid. Latest NiFi version support Java 8 and Java11, so you can ignore the G1GC recommendations if your are using Java 11. https://community.cloudera.com/t5/Community-Articles/HDF-CFM-NIFI-Best-practices-for-setting-up-a-high/ta-p/244999 Hopefully the concurrent tasks on your processor(s) excuting against the content of lareg FlowFiles will help you better utilize your hardware and achieve overall better throughput. Keep in mind that it only allows concurrent execution on multiple source FlowFiles, so will not improve speed at which a single FlowFile will be processed by a given processor. If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped. Thank you, Matt
... View more
02-13-2023
09:23 AM
Not ruling out something environmental here, but what is being observed is validation working and processor execution not while both those processes should be using the same basic code. The 3 loggers that would produce Debug logging output suggested in my previous post may shed more light on the difference in the output logging when validation is done versus running (starting) the processor. So that is probably the best place to start.
... View more
02-13-2023
07:19 AM
1 Kudo
@lben if you saw a bulletin on the processor reporting a failure in execution, that should also be in the nifi-app.log. You can also modify the logback.xml to change the log level of NiFi or even just the ListSFTP processor class to hopefully capture more detail on the failure. Does SFTP to target server work from command line as the NiFi service user? SFTP is just FTP over SSH. But yes, SFTP servers can be configured to only allow SFTP connections. So to get more logging out of the listSFTP processor class you could add these loggers the area where all the other loggers start to show up in the NiFi logback.xml: <logger name="org.apache.nifi.processors.standard.ListSFTP" level="DEBUG"/> <logger name="net.schmizz.sshj" level="DEBUG"/> <logger name="com.hierynomus.sshj" level="DEBUG" /> Thanks, Matt
... View more
02-13-2023
06:39 AM
@JohnF The NiFi Resource Identifier "/resources" exists to authorize third party authorizers like Apache Ranger to retrieve a list of all current NiFi Resource Identifiers (That returned list will change anytime some new component is added in NIFi). In a NiFi setup to use a local authorization provider (fie-access-policy-provider) this NiFi Resource Identify would not need to be used. As NiFi is already aware of all policies in its UI for setting up policies. So no need for it to be exposed. When using some external Authorizer, it would then be that Authorizer that is providing the authorizations needed to NiFi and within that external Authorizer it could authorize the "/resources" NiFi resource Identifier, if it wanted to get that listing to facilitate easier authorization policy implementation by being able to present that list of Identifiers to the end user. If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped. Thank you, Matt
... View more
02-13-2023
06:22 AM
@lben if you try to ssh to the target host from the NiFi host as the NiFi service user (User that owns the running NiFi), does it connect successfully or does it timeout at command line as well? If you made multiple connection attempts in a row from command line, do they all succeed? Is that the complete error from the nifi-app.log? Was it followed with a stack trace that you can share? Thanks, Matt
... View more
02-09-2023
12:59 PM
1 Kudo
@hkh Based on RFC1123, the use of ": or /" in a hostname is not valid. https://www.rfc-editor.org/rfc/rfc1123 From command line on the server where NiFi is running as the user who owns the NiFi running process, can you "ssh <username>@myhostname://test.net" successfully? So I am still a bit confused on you having an SFTP-server running on a server with a hostname containing these characters. It may very well be that these invalid characters re resulting in the unknownHostException coming out of the Java SSH library used by the NiFi putSFTP processor. As far as an alternative to putSFTP, that would require knowing more about your endpoint you are trying to write to in order to provide such suggestions. Thank you, Matt
... View more
02-08-2023
01:04 PM
@tcain Also noticed that Apache NiFi recently changed the default run schedule on some processors from "0 sec" (run as often as possible) to "1 min". ConsumeMQTT is one of the processor that had that default changed. So when ConsumeMQTT is started (put in to a running state), it will schedule execution immediately and then will not get scheduled to execute again for 1 min. So it is possible that you have a delay in consumption simply because the processor is not being scheduled often enough. Try changing the run schedule on the consumeMQTT to "0 sec" and re-run your test. (should be "0 sec" on all 3 of your processors.). Will also be making recommendation that this particular processor be reverted back to a default of 0 sec in Apache NiFi. If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped. Thank you, Matt
... View more
02-08-2023
12:33 PM
@tcain I see you are using a processor that is not part of the default Apache NIFi distribution (encodeProtobuf), so can't really comment on the performance of configurations specific to that processor. Can you share your configuration used in your 3 processors to include the Settings, Scheduling, Properties, and Relationship tabs? That will help in understanding your current dataflow implementation setup. I am very interested initially in the scheduling tab for each processor you are using. 2. The status bar jus above the the canvas in the NiFi UI will give a summary of all the component counts used on your canvas and their current status (enabled, disabled, running, stopped, invalid, etc). Based on your description is expect on a "3" next to: 3. The Max Timer Driven Thread Count setting can be found by going to Global menu ---> Controller Settings. Although it does not sound like this may be issues since you have only 3 processors on your canvas and nothing else, correct? simply changing this value does not translate in a processor being able to do concurrent execution. 4. You can see your current JVM details (for standalone NiFi) via global menu --> summary --> system diagnostics (lower right) or (for Clustered NiFi), global menu --> cluster --> JVM tab. 5. ... 6. How large is the JSON you are sending through your pipeline? 7. What do you observe specific to lineage of your processed FlowFile. You could run a provenance query. Immediately after processing a FlowFile through your dataflow, you can run a data provenance query. global menu ---> data provenance. Screenshot of that return may be helpful as well to show execution times of each processor. You can also click the small "view details" icon to the far left of each event for that FlowFile. From there you can see things like event duration and lineage duration. This can help narrow down where specifically the slow down is occurring. I look forward to your detailed feedback and the additional information you can share here. If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped. Thank you, Matt
... View more
02-08-2023
10:02 AM
@hkh I see that you have changed the hostname for security reasons, but I am confused by the "://" in your hostname. Is that present in the real hostname? Thanks, Matt
... View more
02-06-2023
07:40 AM
@tcain Here are some general things you should look at when encountering performance related issues: 1. How large are your dataflow(s) on yoru NiFi canvas? 2. How many running processors? 3. How large is yoru Max Timer Driven Thread count resource pool? (This is pool of threads sed by all processors to execute code, default is 10. This should be incremented in small amounts as you monitor your CPU load average to make sure you system is not CPU saturated.) 4. How is the health of your NiFi's JVM (Garbage collection happening very often, how long are the GC pauses)? 5. How is your disk I/O for the disk(s) hosting your NiFi content_repository, flowfile_repository, and provenance_repositories? 6. How many concurrent tasks are set on your processor furthest downstream with a backlog on its inbound connection (concurrent task should be carefully increased in strategic components. Setting too high can have adverse affect on performance depriving other processors from being able to execute optimally)? If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped. Thank you, Matt
... View more