Jaromir Hamala Profile Banner
Jaromir Hamala Profile
Jaromir Hamala

@jerrinot

Followers
2,177
Following
2,052
Media
339
Statuses
4,345

I play with distributed systems by day and poke various runtimes by night. Engineer @QuestDB , @Hazelcast alumnus.

EU
Joined December 2009
Don't wanna be here? Send us removal request.
Explore trending content on Musk Viewer
Pinned Tweet
@jerrinot
Jaromir Hamala
5 years
My new blogpost was just released. If you have ever wondered how are System.currentTimeMillis() or System.nanoTime() implemented and what's the price of single timestamp then read the post!
@JavaAdvent
Java Advent Calendar
5 years
Measuring Time: From Java to Kernel and back
Tweet media one
2
30
55
4
46
137
@jerrinot
Jaromir Hamala
8 months
It turns out my #1BRC solution is the fastest of all when running on many cores! That's totally unexpected, I was not optimizing for this scenario at all. I'm coining a new term: 'Accidental Scalability' :-D
@gunnarmorling
Gunnar Morling 🌍
8 months
#1BRC Update: While handful of remaining entries awaits evaluation, I did an update of the 32 core / 64 threads leaderboard for the 25 top contenders. @jerrinot and @thomaswue at the top for this eval, processing the 13G file in ~0.32 sec!
Tweet media one
10
20
132
9
14
216
@jerrinot
Jaromir Hamala
5 years
Modern B-tree🎄 Techniques: I thought it was impossible to have 200 pages about a single data-structure. I was wrong.
3
54
197
@jerrinot
Jaromir Hamala
1 year
The blog I always wanted to write: A guide for marrying Java ☕️ and Rust 🦀 Adam has done a better job than I could ever do. It's a long read, but pretty amazing. Soon on the #questdb website! :)
Tweet media one
9
33
196
@jerrinot
Jaromir Hamala
7 months
When @quananh1999 created his magical branch-free parser for #1BRC I borrowed it even though I did not understand it. I only knew it was fast and looked like magic!🪄 Today @mtopolnik published a #questdb blog explaining each line of the code to mere mortals like myself and it
Tweet media one
2
37
188
@jerrinot
Jaromir Hamala
1 year
A new #questdb blog is brewing and I am quite excited about this one. There is one worry, though: Maybe 20 minutes of reading is too much? Am I shooting myself in the foot? We shall see soon!
Tweet media one
8
16
143
@jerrinot
Jaromir Hamala
4 years
Developers: We are so smart, we wouldn't fall for marketing tricks! Also developers: We have to rewrite this application into a bunch microservices, deploy on managed Kubernetes and use all serverless services in existence!
4
22
128
@jerrinot
Jaromir Hamala
2 years
PostgreSQL ✅ Debezium ✅ Apache Kafka ✅ QuestDB ✅ Grafana ✅ What's not to love about the article? 🤩
1
24
118
@jerrinot
Jaromir Hamala
5 months
Does "vpmovzxbd" Scare You? Here's Why it Doesn't Have To! Another wonderful blog by @mtopolnik 🤓
Tweet media one
1
23
114
@jerrinot
Jaromir Hamala
9 months
I found this YouTube channel where a guy casually builds a video card from a bunch of counters and NAND gates. He starts sending sync signals: Then a static pic from EEPROM,then a pic from RAM of a homegrown computer. Bus mastering included. Mad respect.
1
10
108
@jerrinot
Jaromir Hamala
4 years
The Hazelcast engineering team loves me so much they created a special GitHub label just for me!
Tweet media one
1
1
98
@jerrinot
Jaromir Hamala
9 months
Someone reported a #QuestDB bug in a binary search algo. The report links to an article by @joshbloch : It's almost 20 years old and I still find the story fascinating. tl;dr: `auto mid = (low + high) / 2;` may overflow. it's rare -> it goes unnoticed⏱️💣
2
16
90
@jerrinot
Jaromir Hamala
8 months
3 out of the fastest 11 solutions are by former Hazelcast folks! 🔥 #1BRC
Tweet media one
4
4
83
@jerrinot
Jaromir Hamala
8 months
I couldn't see anyone attempting to exploit instruction-level parallelism in #1brc , so I caved in. My very first attempt landed me in the top 10! 🎉 It didn't feel much different from regular #QuestDB hacking :)
Tweet media one
3
6
81
@jerrinot
Jaromir Hamala
9 months
I love learning about things. Some people are natural educators. Today, I discovered @BCiechanowski 's brilliant website. His explanation of the Internal Combustion Engine is the best I've ever seen: The whole archive is a gem, simply brilliant!
4
13
72
@jerrinot
Jaromir Hamala
7 months
My #1BRC swag has arrived! Morning coffee has never tasted better :) Thank you, @gunnarmorling and @Decodableco !
Tweet media one
8
1
68
@jerrinot
Jaromir Hamala
1 year
10 days ago I published a new #questdb blog and went on vacation🚲🇳🇱 I am back and learning the blog has been pretty successful! ICYMI: Concurrent Data Structure Design Walkthrough
0
8
64
@jerrinot
Jaromir Hamala
3 years
Algorithms for Modern Hardware: Thanks to @dendibakh 's newsletter for the link!
0
23
65
@jerrinot
Jaromir Hamala
5 months
The One Billion Row Challenge in CUDA: from 17m to 17s
2
11
64
@jerrinot
Jaromir Hamala
9 months
GraalVM is killing it at #1brc !🔥 Why do I find it surprising? I knew the Graal compiler was excellent for high-level code, such as Scala, etc. The top solutions are heavily hand-optimized and I expected a compiler to matter less here. I was wrong.
Tweet media one
5
8
63
@jerrinot
Jaromir Hamala
2 years
Today is my last day at Hazelcast. I started contributing in 2013, joining full-time in 2014. It's been an incredible ride. I'll be forever grateful to the people who made this possible! I'm leaving the company, but the project&people will always have a special place in my ❤️!
Tweet media one
12
0
64
@jerrinot
Jaromir Hamala
4 years
The disconnect between western and Chinese open source ecosystems keeps surprising me. Apache Dubbo has 33k GitHub stars, predominately from Asia. Yet I have never heard of the project. Alibaba Canal - CDC with 15k stars: There are others examples.
4
13
61
@jerrinot
Jaromir Hamala
5 years
Quarkus is a great framework, but it has one fatal flaw: There is no Hazelcast extension! This is about to change, awesome @pivovarit sent a PR integrating Hazelcast: This extension will make the Supersonic Subatomic Java truly feature complete! ;-)
5
21
61
@jerrinot
Jaromir Hamala
6 years
My new blogpost: LockSupport.parkNanos() Under the Hood and The Curious Case of Parking -
1
37
61
@jerrinot
Jaromir Hamala
1 year
1/9: My take on the ongoing debate between Redpanda & Confluent folks: * Yes, safety can be guaranteed without fsync(). * No, Byzantine Fault Tolerance isn't a must. Curious? Let's unpack this: 🧵
2
11
55
@jerrinot
Jaromir Hamala
2 years
@PanBloumal @Fbeyeee "Šok! Roskosmos má přístup k téměř stejně kvalitní technologii, jako Jan Boháč!"
2
0
52
@jerrinot
Jaromir Hamala
3 years
Something is telling me I have yet to master git configuration syntax.
Tweet media one
3
1
52
@jerrinot
Jaromir Hamala
3 years
Developers: Let's use microservices to decrease team coupling and cognitive load. Also developers: Let's use monorepo so I get to see all the code we have!
2
6
48
@jerrinot
Jaromir Hamala
9 months
The current leader of #1BRC is really nice code: No smartassery, no Hacker's Delight kinds of tricks. Simple plain Java + FFM + a bit of collocation. I like it. The only possible issue: It makes assumptions about input data - hashcode without collisions.
3
6
46
@jerrinot
Jaromir Hamala
3 years
There is tension between fast startup times (AOT) and peak performance (JIT). Historically the peak performance was more important for server-side applications. Cloud is changing it, at least partially, and people go a long way to improve startup times. Some examples:
1
11
44
@jerrinot
Jaromir Hamala
2 years
Nice read about Postgres sorting strategies:
0
10
41
@jerrinot
Jaromir Hamala
8 months
FOSDEM was cool, I met good old friends and had some interesting conversations. I'm in Krakow, Poland, waiting for a bus to my skiing hols in Tatras. I run out of QuestDB t-shirts, but #redpanda is almost as cool as #questdb 😎😂
Tweet media one
1
2
44
@jerrinot
Jaromir Hamala
2 years
Everyone: A good Java developer can code Java in any language. #QuestDB : Let's write some "assembler" in Java!
Tweet media one
2
8
38
@jerrinot
Jaromir Hamala
5 years
The Power of Open Source ♥️: Todd Greer from Google is working on Envoy Proxy HTTP cache filter. It's still WIP, but @ozcannot from Hazelcast is already validating the API by implementing Hazelcast-based filter. It Feels Good to be an Early Adapter!
0
13
41
@jerrinot
Jaromir Hamala
5 years
According to Hazelcast is the most popular Raft implementation in Java and 2nd most popular implementation overall! 💖
0
11
39
@jerrinot
Jaromir Hamala
2 years
I love how Postgres JDBC documentation explains SSL modes. Plain English yet concise description. Even people with limited exposure to security can understand it.
Tweet media one
0
5
37
@jerrinot
Jaromir Hamala
2 years
@gizmax @vaclav_t Marek Hilšer slavně zvítězí nad tlumočníkem!
1
0
35
@jerrinot
Jaromir Hamala
2 years
I fixed a bug. By replacing `map.put()` with `map.putIfAbsent()`. This change took me over an hour. That's like 1 character / 10 minutes. Should I feel good or bad? :)
15
1
36
@jerrinot
Jaromir Hamala
2 years
Did you know the Postgres type "timestamp with time zone" actually does not store the timezone at all? Postgres has 2 basic types for storing timestamps: timestamp and timestamptz. Neither stores any timezone information, they both store just a single 64-bit integer.
2
5
36
@jerrinot
Jaromir Hamala
8 years
"Friends don't let friends write low level concurrency by themselves." - @karianna
2
22
36
@jerrinot
Jaromir Hamala
7 months
TIL: Sorting UTF-8 encoded strings by their bytes gives the same result as sorting them by actual codepoints. It's all because of how UTF-8's leading bytes are set up.
3
2
34
@jerrinot
Jaromir Hamala
4 years
I've always been skeptical to this FaaS fashion. AWS Lambda screams 📢📢CLOUD VENDOR LOCK-IN☢️ But I have to say: Google Cloud Run + Quarkus is a pretty neat combination. My app has no GCP-specific code, Quarkus does not feel too possessive either. Serverless Done Right.
4
8
35
@jerrinot
Jaromir Hamala
4 years
How many CPUs a containerized Java see? docker run <container image> java -Xlog:os+container=trace -version|grep active_processor_count In Kubernetes: kubectl exec <pod name> -- java -Xlog:os+container=trace -version|grep active_processor_count
1
4
35
@jerrinot
Jaromir Hamala
3 years
HotSpot Escape Analysis and Scalar Replacement Status:
1
9
35
@jerrinot
Jaromir Hamala
3 years
TIL: -XX:+StressLCM / -XX:+StressGCM are JVM flags to randomize instruction scheduling. It allows finding concurrency bugs that would be otherwise hidden on a given architecture. Apparently, JCStress makes use of it. Thanks to @PeterVeentjer for showing me this.
2
9
34
@jerrinot
Jaromir Hamala
2 years
Small startups are great for generalists like me! This morning I was fixing some Python code #questdb uses in a public demo. It's afternoon and I'm writing code to generate Java bytecode. And I ❤️ doing both!
1
2
34
@jerrinot
Jaromir Hamala
4 years
Great paper on evolution of RocksDB. Read it to cure any kind of urges to implement a custom LSM storage. So many concerns to deal with!
1
11
33
@jerrinot
Jaromir Hamala
11 months
This guy f̴u̴c̴k̴s̴ knows!
Tweet media one
0
3
33
@jerrinot
Jaromir Hamala
2 years
I've been playing with Upstash, Decodable and Cockroach Serverless. It works nicely together: Upstash webhook produces a Kafka message, Decodable polls Upstash and pushes new rows into Cockroach. Working like a charm! Next steps: 1. Connect QuestDB 2. Try window aggregations
1
7
33
@jerrinot
Jaromir Hamala
1 year
TIL: j.u.LinkedList.size() can return a negative value 😮 How? Just insert more than 2^31-1 values. This makes the internal size counter to overflow. Warning: This will use high 10s of GB of memory.
4
10
32
@jerrinot
Jaromir Hamala
5 years
Friday evening project: Hazelcast Jet is running on my mobile phone! Feels good. Can your distributed stream processing engine do that? 🚀
Tweet media one
Tweet media two
Tweet media three
1
8
33
@jerrinot
Jaromir Hamala
4 years
Me: It's 2021 and I would hesitate to promise anything. I am not even 100% certain the sun will rise tomorrow again. JDBC driver: This write will definitely succeed! Me: I admire your confidence!
Tweet media one
7
2
32
@jerrinot
Jaromir Hamala
1 year
🧵Thread: Classification of Concurrent Algorithms by Progress Conditions🔒🧪 Let's have a look at terms like blocking, non-blocking, lock-free, and wait-free. Read on to see how these classifications impact the progress of threads in your programs. 👇
2
8
32
@jerrinot
Jaromir Hamala
4 years
JMM Pragmatics by @shipilev is such a gem! It goes deep yet it builds-up slowly and does not make you feel you an idiot: Also I like the references to other areas. Example: Hackers culture: Philosophy:
0
7
32
@jerrinot
Jaromir Hamala
1 year
@DanPriban To je uplna fascinace :) Ja vubec netusil, ze kdykoliv nejakej hmyz resi, nez jsem ti precetl u vas. Jsem ignorant (nebo) zavrenej v bubline? Je to mozny. Vubec nechapu, proc by takova pitomost mela byl tema.
3
0
29
@jerrinot
Jaromir Hamala
8 months
The community around #1BRC is so amazing. Cross-pollination is actively encouraged and it's making everyone's programs faster. So let me show you something else: Not only does it make your own program faster, chances are it makes someone else's solution slower! 👿
Tweet media one
4
3
31
@jerrinot
Jaromir Hamala
2 years
In related news: I'm joining QuestDB! Life runs in time series and I'll be helping to build the fastest🔥 time series database out there: Stop by and say Hi👋at
@jerrinot
Jaromir Hamala
2 years
Today is my last day at Hazelcast. I started contributing in 2013, joining full-time in 2014. It's been an incredible ride. I'll be forever grateful to the people who made this possible! I'm leaving the company, but the project&people will always have a special place in my ❤️!
Tweet media one
12
0
64
2
0
29
@jerrinot
Jaromir Hamala
8 months
Woot! My friend @mtopolnik is joining #questdb , and I'm over the moon. We met at Hazelcast back in 2015, and some of my best memories include working together on the Hazelcast core team. @AndreyPechkurov : You're a true trend-setter, no doubt! 😂😂
4
0
29
@jerrinot
Jaromir Hamala
3 years
This is a pretty good explanation of networking in containers: by @iximiuz I didn't know about network namespacing in Linux, etc. Perhaps someone else will find it useful too.
0
4
30
@jerrinot
Jaromir Hamala
2 years
@howie_hua 1. Multiplying by 10 is easy, so start with 16x10 = 160 2. Add half of it. So the result is 160 + 160/2 = 160 + 80 3. Realize it's (2x8 + 1x8)x10 = (3x8)x10 = 24x10 = 240 4. Show off on Twitter!
1
1
29
@jerrinot
Jaromir Hamala
9 months
Many moons ago I investigated the granularity of LockSupport.parkNanos(): tl;dr: On Linux it's 50μs by default. Tunable via /proc, but that's painful. Today @jholusa showed me the latest OpenJDK has a flag to set this for you. Yay!
2
6
29
@jerrinot
Jaromir Hamala
5 years
I was a Hazelcast contributor before joining as a full time engineer. I still remember the joy when my first PR was merged! If you would like to contribute to Hazelcast then a Jet connector is a good start. For example a Twitter Sink should be easy!
1
13
29
@jerrinot
Jaromir Hamala
1 year
Java Tip: java.util.HexFormat is a nice addition in JDK17. Helpful to quickly visualize the content of various buffers, etc.
Tweet media one
1
9
28
@jerrinot
Jaromir Hamala
8 months
@gunnarmorling @thomaswue @quananh1999 @TheMukel Thank you so much for organizing this challenge! Not only it's been a great fun, but I also learned a ton. The idea of keeping everything in open and encourage folks to learn from each other, that was just brilliant!
2
0
28
@jerrinot
Jaromir Hamala
1 year
I needed a map-like structure with lock-free readers and a single writer. The writer was allowed to block. I was so proud of the protocol I come-up with. Only to realize the basic idea is the same as described here: Well, worse things happen at sea 🤷‍♂️
5
3
28
@jerrinot
Jaromir Hamala
2 years
I'm volunteering at the Fast and Streaming Data devroom at FOSDEM. My amazing #questdb colleague @supercoco9 is there too. Stop by to learn something new or just to say Hi! Also, finally, I get to meet @FawazGhali . Hazelcast will always have a special place in my heart!
Tweet media one
2
1
28
@jerrinot
Jaromir Hamala
2 years
The chain of disk lies: 1. SSD lies to OS: It's persisted, trust me🤞 2. (Mac)OS to a database: fsync is completed you are safe 😉 3. MongoDB to a business app: D stands for durability, right😇? Plot twist: The business app is so buggy that nobody cares anyway🙊
1
0
27
@jerrinot
Jaromir Hamala
9 months
Nothing extraordinary to be seen here; it's just @AndreyPechkurov casually improving #QuestDB aggregation query performance by 1-2 orders of magnitude. Business as usual, move along.
Tweet media one
1
1
26
@jerrinot
Jaromir Hamala
2 years
My first QuestDB changeset was just merged! Feels Good! 💪🥰
Tweet media one
0
0
25
@jerrinot
Jaromir Hamala
2 years
Maven plugin to build Rust Cargo crates within a Java Maven project: We use it to implement native bits of #questdb in Rust. It's still early and contributions are very welcome!
4
5
26
@jerrinot
Jaromir Hamala
5 years
I have a massive respect for antirez and his work. Benchmarketing is an ugly discipline, but RedisLabs’s benchmarks are unprofessional and misleading. See flawed Elasticsearch benchmark: and Hazelcast:
2
13
27
@jerrinot
Jaromir Hamala
11 months
Every few years, I'm struck by the strange urge to implement a custom Hamcrest matcher, and I always chuckle at the evil genius of documenting API contracts this way! 🤣 Today's #questdb REST improvements led me down this route.
Tweet media one
1
4
26
@jerrinot
Jaromir Hamala
3 years
@trif Aby to fungovalo, tak je při dočasném vzdálení se z pokoje potřeba pověsit cedulku “Nerušit”. Jinak chybějící pivo pokojská odhalí, nahradí a započítá! #lessonlearned #notevenashamed
0
0
24
@jerrinot
Jaromir Hamala
4 years
I don't always steal jokes, but when I do I steal from @BartokJozsef
Tweet media one
2
4
25
@jerrinot
Jaromir Hamala
3 years
JVM native methods usually don't obstruct safepoints, but there are exceptions. Here a pointer from malloc() is passed to GetByteArrayRegion, which is running the vm_state and it may obstruct safepoints. Possibly for a long time. Why? Lazy allocations➡️Page Fault➡️Suffering
Tweet media one
3
4
23
@jerrinot
Jaromir Hamala
3 years
Confession: I still use "ifconfig" and "route" when poking a Linux network config. I tried to switch to iproute2 multiple times, but "the old way" is too deep under my skin. With iproute2 I always have to re-learn it from scratch. Am I stupid, lazy or just getting old? :)
10
0
24
@jerrinot
Jaromir Hamala
2 years
I showed Lemmings to my 6yo. The DOS version from 1991. She saw the pixalated graphics and went: "I like it, because it looks a bit like Minecraft."🙈 Also:I still remember first few levels. After 30 years. How is that even possible? My memory is bad, but I remember game lvls🤦
4
0
24
@jerrinot
Jaromir Hamala
4 years
Listening to a series of performance talks.
Tweet media one
4
2
24
@jerrinot
Jaromir Hamala
2 years
Do you want to work on a high-performance #database ? Aren't you afraid of low-level code and unorthodox techniques? Do you want to work with me?😊 #QuestDB is hiring core (database) engineers! 🔥 The role is open globally and my DMs are open!
1
5
21
@jerrinot
Jaromir Hamala
6 years
I just published 2nd part of my investigation: LockSupport.parkNanos() Under the Hood and the Curious Case of Parking, Part II: Behavior on Windows
1
16
23
@jerrinot
Jaromir Hamala
10 months
Company heuristics: 1. 'Innovation departments' imply a lack of real innovation. 2. 'Agile' in job titles signals a rigid culture. 3. Too many 'strategy' meetings? There's no strategy!
3
5
23
@jerrinot
Jaromir Hamala
2 years
I use debuggers. Especially when working with unknown or complex code. Attaching a debugger to tests is my way to learn how stuff works inside. I thought everyone was doing it that way 🤔
4
0
22
@jerrinot
Jaromir Hamala
8 months
Has anyone already tried #1BRC with CUDA? I see most solutions use SWAR/SIMD to find semicolons. I wonder if there is an opportunity to load the entire input into VRAM, use CUDA to find all semicolons super fast and then just iterate over them. PS: I know nothing about CUDA🤷‍♂️
4
1
22
@jerrinot
Jaromir Hamala
1 year
I was today years old when I had to study differences between cgroups v1 and v2 wrt to kernel dirty pages tracking. This is a good read about v2:
0
3
21
@jerrinot
Jaromir Hamala
3 years
TIL: There is a media type application/problem+json
Tweet media one
2
6
22
@jerrinot
Jaromir Hamala
3 years
Good read about Memory Access Ordering Model: Bonus: Have a look at this little piggie:
0
4
22
@jerrinot
Jaromir Hamala
2 years
I used to think I needed an external display, keyboard & other crap to work. Today after lunch I had difficulties focusing on work. So I went for a walk. I end-up working from a local "community garden". The whole afternoon. It was freaking fantastic! Fresh air does miracles.
2
0
21
@jerrinot
Jaromir Hamala
1 year
The same here, no Devoxx for me this year :( I have some sugar coating tho: I can now turn the talk into a blog post. Chances are it'll work better as a blog anyway.
Tweet media one
@sKriemhild
Sandra Ahlgrimm
1 year
It’s normal that sessions get declined. You’re not alone. #devoxx
Tweet media one
6
1
34
6
1
19
@jerrinot
Jaromir Hamala
3 years
I just noticed this little badge in my GitHub profile🦚 I guess I can stop hacking now, this is the peak! :)
Tweet media one
1
0
20
@jerrinot
Jaromir Hamala
2 years
@esammer Two types of engineers? That's a typical off-by-one error. I'm sure I would do max_price, price_avg!
1
0
21
@jerrinot
Jaromir Hamala
4 years
Me before checking JDK LongAdder impl: "It's just a thread-local register + on demand sum, how hard it could be?" Me while looking at its src: "Kill me, please!" G̶o̶t̶o̶ Labelled Break included.
Tweet media one
3
2
20
@jerrinot
Jaromir Hamala
5 months
"Look ma, I can trade pointer chasing for memory allocations and still win in (some) benchmarks." Seriously, this was quite a rollercoaster. I had a subtle bug causing perf. degradation. After fixing the bug it looks like a win in many situations. 😅😎
@AndreyPechkurov
Andrei Pechkurov
5 months
Today in QuestDB: @jerrinot is cooking something fancy. That's a specialized single string key hash table. The idea is to avoid redundant allocations and memcpy and, instead, put pointers to mmapped memory in the entries. The mem footprint is much lower and the table is faster.
Tweet media one
1
1
17
1
4
26