Does pg_dump flag -j give performance improvement up to -j 16 or -j 32 or even -j 64? I am backing up and restoring a large DB (7+TB) ... I am using

pg_dump -j 8 -Fd


(8 parallel dump threads with directory formatting).

I just wondered if anybody has tested with a higher -j value like 16 or 32 or even 64?

Please advise ... Thanks much!
You will probably not see a performance increase.

"pg_dump" only dumps multiple tables in parallel.  It does not parallelize the dumping of data for any single table.  So the entire process will always take at least as long as it takes to dump the single slowest table, no matter how much parallelism you throw at it.  Most applications are dominated by a handful of large tables, so won't see much increase to assign more jobs than the number of large tables + 1.

And beyond that, you would need enough CPU and IO.  '-Fd' uses compression by default, and that compression is often the bottleneck (on the CPU) rather than IO.  But if you have enough large tables and enough cores, then IO would probably become the bottleneck.