Dario Balinzo's Avatar

Dario Balinzo

@dariobalinzo.bsky.social

Software Engineer @ Sysdig | Opinions are my own | JVM nerd

37 Followers  |  314 Following  |  4 Posts  |  Joined: 09.11.2024  |  1.535

Latest posts by dariobalinzo.bsky.social on Bluesky

Preview
Virtual Threads Ate My Memory: A Web Crawler’s Tale of Speed vs. Memory I built a simple web crawler using good old platform threads. It was just a multithreaded crawler, nothing fancy. But then, curiosity…

I wrote this blog post to share some hacking sessions with the new #Java #Virtual #Threads.

While these are new and cool tools, they can hide new pitfalls to solve.. see the details in the post!

dariobalinzo.medium.com/virtual-thre...

#java24 #performance

29.05.2025 12:34 — 👍 4    🔁 2    💬 0    📌 0
Post image

A memory model addresses challenges arising from cpu caches and the need for processors to see consistent values. And also compilers and processors may reorder instructions for optimization, making a memory model necessary to handle these cases! 🤯

22.12.2024 11:18 — 👍 0    🔁 0    💬 0    📌 0

synchronization mechanisms ensures that memory writes by a thread are made visible to other threads in a predictable manner. 🔎

In #java we have a memory model that define the conditions under which writes to memory by one processor become visible to other processors. ☕️

22.12.2024 11:17 — 👍 1    🔁 1    💬 0    📌 0
In multiprocessor systems, processors generally have one or more layers of memory cache, which improves performance both by speeding access to data (because the data is closer to the processor) and reducing traffic on the shared memory bus (because many memory operations can be satisfied by local caches.) Memory caches can improve performance tremendously, but they present a host of new challenges. What, for example, happens when two processors examine the same memory location at the same time? Under what conditions will they see the same value?

Usually when we think about synchronization mechanisms between threads we focus on mutual exclusion. 🔒

An important aspect is also memory visibility...🧵

#java

www.cs.umd.edu/~pugh/java/m...

22.12.2024 11:14 — 👍 2    🔁 1    💬 2    📌 0

@dariobalinzo is following 20 prominent accounts