HNHacker News
TopNewBestAskShowJobs

DmitryOlshansky

276 karma · joined July 25, 2017

https://olshansky.me
submissionscomments
DmitryOlshansky··on Guide to running Elasticsearch in production
And another note on shards - indexing a shard is a single writer process.

If your drive tolerates parallel writes well (=SSD) having multiple primary shards per node helps scale indexing.

DmitryOlshansky··on Guide to running Elasticsearch in production
Java compressed object pointers.

Shipilev (JVM performance engineer) explains it in great detail here: https://shipilev.net/jvm/anatomy-quarks/23-compressed-refere...

But the short of it: Java uses 32-bit numbers for object references if it can address whole heap with it. Given default 8-byte alignment of object we have 2^32 * 8 = 32g of addressable heap.

Once we are beyond that number 64-bit references are used and suddenly we are wasting a lot of heap space (Java is very much objects everywhere). Usually up to around 40% of heap is references.

DmitryOlshansky··on Guide to running Elasticsearch in production
Mostly good stuff but a few comments:

- article doesn’t clarify if it’s on hardware or VMs

- 140 shards per node is certainly on the low side, one can easily scale to 500+ per node (if most shards are small, typically power law distribution)

- more RAM is better, and there is a ratio of disk:ram that you need to keep in mind (30-40 for hot data, 200-300 for warm data)

- heaps beyond 32g can be beneficial but you’d have to go for 64g+, 32-48g is a dead zone

- not a single line about GC tuning (I find default CMS to be quite horrible even in recommended ~31g sizes)

- CPUs are often a bottleneck when using SSD drives

DmitryOlshansky··on Does memory leak? (1995)
Indeed.

I think one of big problems in software development is that nobody measures the half-life of our assumptions. That is the amount of time it takes for half of the original assumptions to no longer hold.

In my limited experience assumptions half-life in software could be easily as low as around one year. Meaning that in 5 years only 1/32 of original architecture would make sense if we do not evolve it.

DmitryOlshansky··on Interview with Wayne Ratliff, author of dBASE (1986)
> Ted Glasser, who has a number of patents and is a very senior person in the computing industry, and is in Who's Who, once told people that the biggest team he could manage was one that could drive out to get pizza in a Volkswagen. Since then he's changed his tune--it's now a regular-size American car. I wholeheartedly agree with that.

And that’s how we got to 2 pizza teams I guess.

DmitryOlshansky··on Rubynetes: Using OpenAPI to validate Kubernetes configs
Actually I’ve been through this but since we use Scala and our HTTP client wasn’t accounted for in default generators I went straight to writing a plugin for the ehm code-generator toolkit.

Mostly same observations, but I actually made that plugin work. In retrospect writing complete generator from scratch would take far less time and effort.

I believe original authors have never written a compiler nor considered a code-generator to be a compiler (which it is). Hence the funky architectural style - whatever was the conceptual model behind it fits poorly to the problem at hand and likely was patched multiple times to cover niche corner cases.

DmitryOlshansky··on Google to Samsung: Stop messing with Linux kernel code. It's hurting Android
Usually things like: 1u < -1

But more subtle when you have: a.size() - 1 < len

DmitryOlshansky··on I Learned French in 12 Months
I misread it as 12 minutes, and got really alert for a moment imagining some spooky mind-altering procedures.

Damned age of velocity.

DmitryOlshansky··on ZZ is a modern formally provable dialect of C
It can’t be a dialect of a language if the compiler of said language doesn’t compile it.
DmitryOlshansky··on Filling large arrays with zeroes quickly in C++
Invalidating cache lines is not that hard, it happens all the time. Refilling them from DRAM takes time.
DmitryOlshansky··on Filling large arrays with zeroes quickly in C++
https://parallel.princeton.edu/papers/micro19-gao.pdf

The amount of time wasted zeroing out memory pages in a typical OS is quite significant, also take into account that such an operation will trash perfectly good cache space for no good reason.

DmitryOlshansky··on Filling large arrays with zeroes quickly in C++
Adding an ability to zero-out arbitrary range directly to dram chip is very simple addition HW-wise.

In fact all ones is not hard either, there were some experiments to give RAM ability to perform simple page-level computations with promising results.

DmitryOlshansky··on AMD’s third shoe drops at CES 2020: 7nm Zen 2 mobile CPUs
Careful about the clouds, performance under virtualization has many pitfalls and in some workloads is very much unlike bare metal.

The correlation of bare-metal cores vs cloud vCPUs is very much nonlinear.

DmitryOlshansky··on Software Disenchantment (2018)
In a way each layer of abstraction could be seen as a virtual machine - a new set of “instructions” implemented via previous layer of instructions.

The analogy holds as long as we don’t cross layers, which is quite often true.

Therefore counting total number of layers is performance-wise quite similar to running this many layers of virtual machines. Of course, you need code for all of these translation layers.

DmitryOlshansky··on Ask HN: D programmers, what does your development setup look like?
I used plain Sublime, but switched to VSCode with code-d plugin / dcd completion daemon.

Usually works decently unless you tinker with std library / runtime where you are mostly on your own.

DmitryOlshansky··on Cray-2 vectorization instruction notes by former Principal Engineer of Cray
512 / 8 = 64 bytes which is a cache line size in Intel’s (and AMD’s) CPUs.
DmitryOlshansky··on String Algorithms in Lisp
Can’t help but notice that most algorithms are implemented imperatively.

Any chance for efficient pure functional string search algorithm?

DmitryOlshansky··on Ask HN: Which stack will get my MVP API off the ground fastest?
Whichever you know best
DmitryOlshansky··on Nuclear Fusion Could Rescue the Planet from Climate Catastrophe
The only good thing about time travel is that once we discover it we always had known it.
DmitryOlshansky··on Search Benchmarking: RediSearch vs. Elasticsearch
Does not tell us the settings for text analysis done by two engines. Secondly on query side - again, scoring settings of RediSearch vs Elastic are not discussed.

With that it’s just 2 points in space which gives us little information to deduce 58% faster at X or whatever.

DmitryOlshansky··on What's the minimum number of words you'd need to define all other words? (2012)
I bet this heavily depends on what you consider an accurate definition.
DmitryOlshansky··on An Amoeba-Based Computer Found Solutions to 8-City Traveling Salesman Problem
When it comes to biocomputing nothing beats humans challenged with “impossible” problems and decent amount of time.
DmitryOlshansky··on Eclipse Mita – A New Programming Language for the Embedded IoT
Looks a lot like Arduino’s “language” that was a thinwrapped C++.

Then there is Processing which is a DSL of sorts and this Mita look like them trying to simplify the wrong part of task.

It is not complex to split your program into particular blocks - how you connect blocks and if these blocks are the “right size”, what blocks you actually need etc. THAT needs simpler means to develop faster.

And this id about IoT - hopefully measurements and units are handled well and that last “thing”.. security, yeees that one needs simpler solutions!

DmitryOlshansky··on Marketing Firm Exactis Leaked a Personal Info Database with 340M Records
Yeah. I’m not a god or smth, but I’m ashamed of “experts” that work(ed?) there.

At the very least it’s a pity that even good people make _mistakes_ like that.

Untill that day, whatever I do that is at least robust, diesn’t require mainatance each 2-3 months etc. not even fast, just decent.

In short while our idustry features stuff like that I will be angry, sad etc. But boy I will always have money, I might have a lot fun at least for some definition of fun!

DmitryOlshansky··on How I Came to Write D (2014)
I came mostly unprepared, and passed just fine. In fact they extended it with 2 hours more “followup”. And I’m no superhuman. It may depend on the part of Google you apply to + it was compiler team and I love compilers ;)
DmitryOlshansky··on Russia’s move to block Telegram another attack on online freedom of expression
Yeah, sure. _will_ is the keyword.

It could take years to trully cover all ISPs. Like it was with rutracker.

And then LinkedIn is blocked for a long time now but I get new job opportunities through it quite often. Sometimes w/o turning VPN on.

DmitryOlshansky··on Russia’s move to block Telegram another attack on online freedom of expression
Not a single piece of interesting facts in the post. And Telegram still works as of right now.

As the proverb goes: “Undue strictness of Russian laws was always compensated by it being optional to follow them.”

DmitryOlshansky··on Subscribers are the new, new thing in business
“You reached the limit of free subscription”

The irony, now I can’t read about subscription addiction.

DmitryOlshansky··on Apple Hires Google’s A.I. Chief
All the AI movements... Yet they still can’t get basic full text search right in Apple Music.
DmitryOlshansky··on The chance of a Bitcoin crash is greater than 80%
The key is 2 sentences: - researchers devised a “rule” by observing stock market, likely empirical - someone was stupid enough to apply it to crypto (a different market)

First thing a good university will tell a student is the boundaries of applicability of a law or formula.

Newtonian laws work fine except when speeds get close to that of light, for instance (simplified).

It’s even more obvious for empirical “laws”.

← PreviousPage 4 of 5Next →