How does Project Loom Fibers/Green threads help in Anyway ?

kant kodali kanth909 at gmail.com
Wed Jan 17 10:27:57 UTC 2018


Thanks a lot!

On Wed, Jan 17, 2018 at 2:22 AM, David Holmes <david.holmes at oracle.com>
wrote:

> http://mail.openjdk.java.net/mailman/listinfo/loom-dev
>
> David
>
>
> On 13/01/2018 8:05 PM, David Holmes wrote:
>
>> Project Loom is still being set up and should have a project page and
>> mailing list soon.
>>
>> David
>>
>> On 10/01/2018 11:58 PM, kant kodali wrote:
>>
>>> Hi All,
>>>
>>> I came across the links below and I wondering how Fibers can really help
>>> ?
>>> when compared to using a thread pool (which is a pool of kernel threads)?
>>> Sure having both options is great but I am trying to understand what
>>> difference can it make in terms of performance ?
>>>
>>> Here is what I know
>>>
>>> 1) Kernel threads are expensive and the default stack size is in MB's
>>> whereas Fibers can have a small stack size somewhere in KB's so one can
>>> create as many of them. so what? eventually they all have to map to
>>> Kernel
>>> threads and thread pool exists so user don't create as many as say
>>> Fibers.
>>> isn't it?
>>>
>>> 2) Fibers have no idea about kernal threads and vice-versa. so if a Fiber
>>> makes a blocking system call it has not idea that the kernel thread is
>>> blocked and there is no upcall mechanism by any major OS.
>>>
>>> 3) One can argue Fibers are great when a program is making lot of async
>>> calls but I wonder how this is any better in terms of performance when
>>> compared to having small thread pool that makes async calls?
>>>
>>> If this is all about expressing something gets easier in Fibers than
>>> using
>>> thread pool but there is no performance difference then I must say this
>>> is
>>> just subjective so everyone can have their own opinion.
>>>
>>> At this time, I am not seeing how Fibers can be better performant than
>>> having a pool of Kernel threads? if they are in some cases can someone
>>> please provide any examples so I can enlightened?
>>>
>>>
>>>
>>> http://cr.openjdk.java.net/~rpressler/loom/Loom-Proposal.html
>>> https://hn.svelte.technology/item/15599854
>>>
>>>


More information about the jdk9-dev mailing list