zjw1111 commented on PR #254:
URL: https://github.com/apache/paimon-cpp/pull/254#issuecomment-5449856902

   Thanks for the clarification. If the main concern is that the Paimon DSO 
embeds a second TBB runtime, could this be addressed by building Paimon against 
the same shared TBB used by the host service, for example with:
   
   ```bash
   -DTBB_SOURCE=SYSTEM -DTBB_ROOT=/path/to/the/host/tbb/prefix
   ```
   
   The existing dependency resolver already supports `TBB_SOURCE=SYSTEM`. If 
both the host and the Paimon DSO resolve to the same compatible `libtbb.so`, 
this should avoid embedding the bundled static TBB into the DSO and should let 
them share one runtime. Of course, this would need to be verified from the 
final `DT_NEEDED` entries / `ldd` output, since `TBB_SOURCE=SYSTEM` by itself 
does not guarantee that the selected library is shared or identical to the host 
copy.
   
   Also, Paimon currently appears to use TBB only for `concurrent_hash_map` and 
`concurrent_bounded_queue`; the producer/consumer threads themselves are 
created with `std::async`. Could you provide profiling or thread/runtime 
evidence showing that the second TBB copy actually initializes another worker 
pool and causes measurable oversubscription? That would help establish whether 
a non-TBB implementation is necessary, rather than simply reusing the host 
shared TBB.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to