News for hackers. Stuff that matters.
Re:JEP proposed to target JDK 19: 425: Virtual Threads (Prev... by _old_dude_ on Monday May 02, 2022 @01:58PM (#31238508)
The problem is not Linux per se, it's the fact that pthread_create [1] reserves 2M for the stack, so the process runs out of memory if you have 1 million threads (1M * 2M == 2T)

[1] https://man7.org/linux/man-pages/man3/pthread_create.3.html

Re:JEP proposed to target JDK 19: 425: Virtual Threads (Prev... by akvadrako on Monday May 02, 2022 @02:01PM (#31238545)
It only reserves virtual memory.
Re:JEP proposed to target JDK 19: 425: Virtual Threads (Prev... by cogman10 on Monday May 02, 2022 @03:15PM (#31239520)
Which has a real nasty habit of becoming real memory as applications process stuff.
Re:JEP proposed to target JDK 19: 425: Virtual Threads (Prev... by akira2501 on Monday May 02, 2022 @03:08PM (#31239439)
Well.. by default. You can set it to the minimum if you like, which is 16384 bytes.
Re:JEP proposed to target JDK 19: 425: Virtual Threads (Prev... by PaulDavisThe1st on Monday May 02, 2022 @08:15PM (#31242769)
The stack size is configurable ahead of time. It's not fixed at 2M.