Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
vitalyd
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
vitalyd
11y ago
>For example, error paths are generally very cold, but how is a compiler supposed to know that a path is an error path? They just look like regular conditionals. At least for .NET that path is likely throwing an exception. If you don&#x
32.
▲
by
vitalyd
11y ago
Profiling comes with its own baggage, nothing's perfect. A lot of times one actually knows the likely/unlikely paths at development time; that's certainly true for error conditions. It makes sense to inform the compiler of
33.
▲
by
vitalyd
11y ago
Rust is exciting, no doubt, and I have high hopes for its adoption, but I've personally not seen/heard of any visible OSS big data style projects using it. I see Frank McSherry's stuff has been mentioned, but I think that&#x
34.
▲
by
vitalyd
11y ago
I think this trend may stop soon. There are already OSS big data projects written in more performant languages (e.g. c++) coming around (e.g. scylladb, cloudera's kudu).
35.
▲
by
vitalyd
11y ago
Memory indirection is the biggest issue indeed. However, I'd also add that java has a terrible performance model, as a language. Unless you stick to primitives only, the abstraction costs start to add up (beyond pointer chasing). It
36.
▲
by
vitalyd
11y ago
You're getting to performance left on the table. Unfortunately, java and the existing JVM jit compilers will not fold away all the abstractions (nevermind the allocations if you have capturing lambdas). Whether this matters is circums
37.
▲
by
vitalyd
11y ago
I'd be surprised if they didn't make postmortem changes to prevent such incidents in the future. Your posts in this thread imply that no mistake should ever happen, but let's be real - mistakes will always happen, the key is
38.
▲
by
vitalyd
11y ago
+1 on writing up a blog post on c++ vs java. I suspect given your background in java, people may heed your words a bit more than usual. There's definitely a lot of outdated thinking in java land with regards to (modern) c++ and acco
39.
▲
by
vitalyd
11y ago
I think once you implement threaded i/o, requests for hot keys will hit in the cpu cache and you'll become NIC limited. At that point, read replicas is the best solution rather than shared memory since contention will move to N
40.
▲
by
vitalyd
11y ago
>However, a lot of the IO overhead with disk, for example. That's why they benchmarked this workload on a 4x SSD RAID configuration :). Given that i/o bandwidth and throughput continues to increase, processor frequency isn
41.
▲
by
vitalyd
11y ago
I believe dpdk supports non-Intel NICs as well. Would also be interesting to compare scylla with kernel networking vs Cassandra.
42.
▲
by
vitalyd
11y ago
http://www.scylladb.com/technology/memory/ By the way, I think you're replying to one of the devs of Scylla.
43.
▲
by
vitalyd
11y ago
Not dedicated NIC per core, but multi-queue NIC having its queues serviced by dedicated cores.
44.
▲
by
vitalyd
11y ago
Where did you get this from? I hope that's not a conclusion from the benchmark doing single server load testing.
45.
▲
by
vitalyd
11y ago
>It's fair to call it that when comparing against any language or runtime targetting general-purpose development Unless you consider, e.g., C, C++, and Rust as not general-purpose. Even C# has StructLayout where you can control the
46.
▲
by
vitalyd
11y ago
Padding is possible with today's java (at least Hotspot), although it's ugly and relies on Hotspot's existing layout implementation. Yes, you can group but as I mentioned in the other reply, you get "blob" granulari
47.
▲
by
vitalyd
11y ago
>But value types do let you group fields (with sub-component values). They let you treat the fields of a value type as a "blob", you have no control over how they're laid out within that blob. >Also, I've noticed t
48.
▲
by
vitalyd
11y ago
This is mostly an issue for large objects (i.e. span multiple cache lines), but have different access patterns for various fields (i.e. clusters of fields accessed together). The other aspect of layout control is cacheline padding, which is
49.
▲
by
vitalyd
11y ago
99.99% is perhaps your estimate, but not necessarily others. This is also not likely what people would consider "layout control" if they're coming from a language that allows field-level layout control. Being able to place
50.
▲
by
vitalyd
11y ago
I don't know if Azul Zing throughput is "extremely low" but it does sacrifice it for latency. I had a discussion with Gil Tene on this recently where he dove into some details: https://groups.google.com/forum
51.
▲
by
vitalyd
11y ago
Value types will provide ability to allocate storage embedded in heap object or stack, but it doesn't provide layout control (i.e. order of fields in the layout). It's a good change, but let's not exaggerate.
52.
▲
by
vitalyd
11y ago
Vtune gives access to PMU counters as well as attributing them to assembly. JProfiler is a purely java level profiler (it won't even tell you Hotspots in the JVM itself, nevermind assembly). They're not really comparable.
53.
▲
by
vitalyd
11y ago
Maybe I didn't make myself clear. If you want to compare speed cross lang, take fastest impl of each and compare that; so long as we're talking about real compilers existing today. Also, fundamentally C# and java aren't desi
54.
▲
by
vitalyd
11y ago
I'm aware of PackedObjects. Note it's not a value type in the sense it doesn't get allocated on the stack (if used as a local), it's a flattened object graph on heap with a shared header. More to the point, implementati
55.
▲
by
vitalyd
11y ago
Language vs implementation is Sufficiently Smart Compiler phrased differently. The main difference between Rust (and say C++) and .NET/Java is the former has a stronger performance model baked into the language which makes it easier t
56.
▲
by
vitalyd
11y ago
Perhaps you're discounting the importance of LLVM and at the same time overestimating performance of some of the languages you mentioned. .NET: type system has some performance oriented features, but JIT compiler isn't all that
57.
▲
by
vitalyd
11y ago
Indeed, they have good marketing :). Don't get me wrong, I think Azul and its C4 GC is very nice. However, beyond some absolute best case on smallish heaps, I do not see it hitting guaranteed 20 micros on large server heaps. Also,
58.
▲
by
vitalyd
11y ago
I got the same impression from a cursory read. Profiling in the interpreter has its downsides, chief among them is lack of inlining causing profiles sometimes to be less useful. Tiered compilation can help here, but requires more careful
59.
▲
by
vitalyd
11y ago
JVMs can try to dynamically adjust their GC heuristics by trying to match pause time goals. The thing they'd be missing is a "global" scheduler that can inform it of upcoming work and its latency sensitivity.
60.
▲
by
vitalyd
11y ago
I know Azul, it doesn't guarantee pauses of 20 micros ; <10 millis maybe. G1 isn't even close.
More ›