@TVGanesh
The following statement is not accurate:
"I read that typically the number of concurrent tasks is roughly equal to 2 or 4 times the cores"
The general recommendation is that the "Max Timer Driven Thread Count" is set to 2 to 4 times the number of cores. This setting is all relative to the other process running on your server (or you mac in this case).
The "Max Timer Driven Thread Count" setting establishes the max number of threads that can be handed out to requesting components that want to execute. (This is a soft limit, there are some scenarios where a thread can be obtained even when active threads executing has reached this configured max count).
The "Max Timer Driven Thread Count" is configured under the NiFi Global Menu --> Controller Settings --> General (tab). When you adjust this value, monitor your cpu usage and adjust accordingly.
Keep in mind that adding additional concurrent tasks to your processor will not improve the processing of a single FlowFile. The concurrency allows the processor to work on different FlowFiles pulled from the inbound connection queue concurrently. In the case of the ExecuteStreamCommand processor, the ability to execute the same command concurrently also is dependent of the command you are executing.
A small number will be displayed in the upper right corner of the processor illustrating the number of currently active threads in use by that processor at time of last browser refresh (NiFi browser auto refresh default is every 30 seconds).
Hope this helps,
Matt