You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fury.apache.org by "chaokunyang (via GitHub)" <gi...@apache.org> on 2024/01/11 10:56:41 UTC
[I] [Java] Use `org.apache.fury.pool.ThreadPoolFury` as default ThreadSafeFury implementation [incubator-fury]
chaokunyang opened a new issue, #1335:
URL: https://github.com/apache/incubator-fury/issues/1335
## Is your feature request related to a problem? Please describe.
Currently we use `org.apache.fury.ThreadLocalFury` as the default implementation of `ThreadSafeFury`. It create a Fury instance for every thread. But threading model is not controlable by Fury, if users create threads frequently, Fury creation may become bottleneck or introduce extra latency.
## Describe the solution you'd like
Use `org.apache.fury.pool.ThreadPoolFury` as default ThreadSafeFury implementation.
We may neeed to benchmark `ThreadPoolFury` vs `ThreadLocalFury`, and optimize `ThreadPoolFury` if it's slow
## Additional context
--
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: commits-unsubscribe@fury.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java] Use `org.apache.fury.pool.ThreadPoolFury` as default ThreadSafeFury implementation [incubator-fury]
Posted by "whyyylyj (via GitHub)" <gi...@apache.org>.
whyyylyj commented on issue #1335:
URL: https://github.com/apache/incubator-fury/issues/1335#issuecomment-1902520994
> It's hard to trigger class unloading post-process callback, since jvm gc is not predictable. Although we can use ReferenceQueue,it still introduce latency before the callback can be invoked.
>
> For k/v strength, could you elaborate more details?
The k/v strength means the same as what guava has provided as k/v config (soft 、weak and strong as default), maybe fury could mapping those design and not expose guava for the smooth transition of implementation.
--
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: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java] Use `org.apache.fury.pool.ThreadPoolFury` as default ThreadSafeFury implementation [incubator-fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #1335:
URL: https://github.com/apache/incubator-fury/issues/1335#issuecomment-1895936682
The gc pressure won't be a big issue, since there won't be much Fury instances. But if fullgc frequently, Fury may be collected and created frequently too. And that would be a performance issue
--
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: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java] Use `org.apache.fury.pool.ThreadPoolFury` as default ThreadSafeFury implementation [incubator-fury]
Posted by "zzzk1 (via GitHub)" <gi...@apache.org>.
zzzk1 commented on issue #1335:
URL: https://github.com/apache/incubator-fury/issues/1335#issuecomment-1887369912
I have finished replacing ThreadLocalFury with ThreadPoolFury, but there are some minor issues in the test case. I will submit a PR shortly.
--
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: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java] Use `org.apache.fury.pool.ThreadPoolFury` as default ThreadSafeFury implementation [incubator-fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #1335:
URL: https://github.com/apache/incubator-fury/issues/1335#issuecomment-1899726429
It's hard to trigger class unloading post-process callback, since jvm gc is not predictable. Although we can use ReferenceQueue,it still introduce latency before the callback can be invoked.
For k/v strength, could you elaborate more details?
--
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: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java] Use `org.apache.fury.pool.ThreadPoolFury` as default ThreadSafeFury implementation [incubator-fury]
Posted by "whyyylyj (via GitHub)" <gi...@apache.org>.
whyyylyj commented on issue #1335:
URL: https://github.com/apache/incubator-fury/issues/1335#issuecomment-1895872652
Agreed, and we may consider if using weak key and soft value as default config is suitable for all users, which is not recommended practice in guava doc. maybe we could add some benchmark test under different gc pressure.
--
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: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java] Use `org.apache.fury.pool.ThreadPoolFury` as default ThreadSafeFury implementation [incubator-fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #1335:
URL: https://github.com/apache/incubator-fury/issues/1335#issuecomment-1895933010
Without using soft key,Fury may hold strong ref for classloader, which make classes unable to unload.
If class unloading is more and issue, strong reference ia more recommended.
--
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: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java] Use `org.apache.fury.pool.ThreadPoolFury` as default ThreadSafeFury implementation [incubator-fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #1335:
URL: https://github.com/apache/incubator-fury/issues/1335#issuecomment-1902537591
Sounds good to me, I think we should do this in ThreadSafeFury
--
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: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java] Use `org.apache.fury.pool.ThreadPoolFury` as default ThreadSafeFury implementation [incubator-fury]
Posted by "whyyylyj (via GitHub)" <gi...@apache.org>.
whyyylyj commented on issue #1335:
URL: https://github.com/apache/incubator-fury/issues/1335#issuecomment-1899239508
Tks for the explanation, could we provide k/v strength or class unloading post-process callback as configurable items in ThreadSafePoolBuilder for those who know their situation best.
--
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: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java] Use `org.apache.fury.pool.ThreadPoolFury` as default ThreadSafeFury implementation [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang closed issue #1335: [Java] Use `org.apache.fury.pool.ThreadPoolFury` as default ThreadSafeFury implementation
URL: https://github.com/apache/fory/issues/1335
--
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: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org