News for hackers. Stuff that matters.
Re:JEP proposed to target JDK 19: 425: Virtual Threads (Prev... by addaon on Monday May 02, 2022 @05:48PM (#31241391)
"Rounded by page size" is a pretty huge caveat here, though, no? With a 4 kB minimum page size on most platforms, 5M threads is 20 GB of stack virtual mappings, minimum. And cycling through those threads even once will make every page of that 20 GB resident.
Re:JEP proposed to target JDK 19: 425: Virtual Threads (Prev... by Matthias247 on Monday May 02, 2022 @09:47PM (#31243436)
Maybe. Realistically it won't matter, because any real world server would either need a lot more memory anyway to actually handle application-specific concerns or support a much lower number of clients. Keep in mind that even with a tiny and receive buffer of 16kB plus maybe some TLS state of > 30kB per connection the baseline memory usage of doing anything useful is already much higher than 4kB - unless the only thing you want to do is building a large-scale TCP ping service.
Re:JEP proposed to target JDK 19: 425: Virtual Threads (Prev... by lumost on Monday May 02, 2022 @09:44PM (#31243407)
That still means I can effectively use 5 million threads on a small server. Which is effectively 3 orders of magnitude more threads than I can currently run with Java.
Re:JEP proposed to target JDK 19: 425: Virtual Threads (Prev... by astrange on Monday May 02, 2022 @08:25PM (#31242841)
macOS/iOS is a popular platform where the page size is 16KB and RAM is moderately-to-very expensive.

It might be interesting to try something like Mesh (https://github.com/plasma-umass/Mesh) to share pages.

Re:JEP proposed to target JDK 19: 425: Virtual Threads (Prev... by toast0 on Tuesday May 03, 2022 @01:07AM (#31244867)
macOS/iOS aren't a realistic server platform for high loads. They don't even have syncookies, so anything TCP is out.