News for hackers. Stuff that matters.
Re:NewSQL databases fail to guarantee consistency and I blam... by toast0 on Friday September 21, 2018 @12:11PM (#18040706)
I think part of this is that most of the common knowledge about scaling is hard fought from the 90s/2000 era. eBay got bigger and bigger Sun boxes to run Oracle, until they couldn't get anything bigger -- then they had a problem and had to shard their listings into categories, etc. In the last few Intel cpu generations, computation performance has had small gains, but addressable memory has doubled about every other release, you can now get machines with 2TB of ram, and it's not that expensive.

You can fit a lot of data in an in memory database of 2TB.

Re:NewSQL databases fail to guarantee consistency and I blam... by lllr_finger on Friday September 21, 2018 @05:59PM (#18042968)
My experience is that scaling up can lead to owning pets instead of cattle. It's never fun having a 1TB ATS instance that's acting funky but you're terrified of bouncing it. That's more a devil's advocate anecdote than an argument against scaling up.
Re:NewSQL databases fail to guarantee consistency and I blam... by toast0 on Friday September 21, 2018 @08:28PM (#18043740)
I think you can (and clearly should) be ready for your big boxes to go down. And it is much more painful to bounce a large box than a small box. But that doesn't mean having say 4x [1] big boxes is strictly worse than having a whole bunch of smaller boxes.

[1] one pair in two locations, basically the minimum amount, unless you're really latency insensitive so you could have one in three locations.

Re:NewSQL databases fail to guarantee consistency and I blam... by chubot on Friday September 21, 2018 @01:39PM (#18041331)
Yup, Google clusters also originally had machines with 1 or 2 CPUs! SMP on Linux was a new thing!

Nowadays you easily have 32 cores on a machine, and each core is significantly faster than it was back then (probably at least 10x). That is a compute cluster by the definition of 1999.

So for certain "big data" tasks (really "medium data" but not everyone knows the difference), I just use a single machine and shell scripts / xargs -P instead of messing with cluster configs.

You can crunch a lot of data on those machines as long as you use all the cores. 32x is the difference between a day and less than an hour, so we should all make sure we are using it!

Common languages like node.js, Python, R, OCaml, etc. do NOT let you use all your cores "by default" (due to GILs / event loop concurrency). You have to do some extra work, and not everyone does.

Re:NewSQL databases fail to guarantee consistency and I blam... by guelo on Friday September 21, 2018 @02:31PM (#18041674)
> Common languages like node.js, Python, R, OCaml, etc. do NOT let you use all your cores "by default"

If the code is written in a distributed fashion from the start then it can be designed so it's one python/node/R process per core. And that makes the transition to distributed servers simpler anyway.

Re:NewSQL databases fail to guarantee consistency and I blam... by cdcfa78156ae5 on Friday September 21, 2018 @04:41PM (#18042510)
> If the code is written in a distributed fashion from the start then it can be designed so it's one python/node/R process per core.

That's a really glib dismissal of how hard the problem is. Python and node have pretty terrible support for building distributed systems. With Python, in practice most systems end up based on Celery, with huge long-running tasks. This configuration basically boils down to using Celery, and whatever queueing system it is running on, as a mainframe-style job control system.

The "shell scripts / xargs -P" mentioned by chubot is a better solution that is much easier to write, more efficient, requires no configuration, and has far fewer failure modes. That is because Unix shell scripting is really a job control language for running Unix processes in parallel and setting up I/O redirection between them.

Re:NewSQL databases fail to guarantee consistency and I blam... by mercer on Friday September 21, 2018 @06:02PM (#18042983)
Am I correct in assuming Elixir/Erlang does a much better job at this compared to Node/Python/etc., putting aside (what I understand to be) the rather big problem of their relative weakness for computation?
Re:NewSQL databases fail to guarantee consistency and I blam... by toast0 on Saturday September 22, 2018 @12:22AM (#18044437)
Erlang can be a good fit -- the concurrency primatives allow for execution on multiple cores, and the in memory database (ets) scales pretty well. Large (approaching 1TB per node) mnesia databases require a good bit of operational know how, and willingness to patch things, so try to work up to it. Mnesia is erlang's optionally persistent, optionally distribution database layer that's included in the OTP distribution. It's got features for consensus if you want that, but I've almost always run it in 'dirty' mode, and used other layers to arrange so all the application level writes for a key are sent to a single process which then writes to mnesia -- this establishes an ordering on the updates and (mostly) eliminates the need for consensus.
Re:NewSQL databases fail to guarantee consistency and I blam... by e12e on Saturday September 22, 2018 @07:44AM (#18045621)
I believe with the combination of native functions ("NIFs") in rust and some work on the nif interface (to avoid making it so easy to take down the whole beam VM on errors) - you might get more of best of both worlds today - than you used to. As you say erlang itself is rather slow wrt compute.
Re:NewSQL databases fail to guarantee consistency and I blam... by mercer on Saturday September 22, 2018 @07:57AM (#18045648)
Thankfully it's not an issue for me. Elixir/Erlang is pretty much perfect for most of my use-cases :). But I foresee a few projects where NIFs or perhaps using Elixir to 'orchestrate' NumPy stuff might be useful. Most of my work would remain on the Elixir side though.
Re:NewSQL databases fail to guarantee consistency and I blam... by cdcfa78156ae5 on Monday September 24, 2018 @04:26PM (#18061103)
Yes. Erlang is built around distributed message sending and serialization. Python does not have any such things; even some libraries like Celery punt on it by having you configure different messaging mechanisms ("backends" like RabbitMQ, Redis, etc.) and different serialization mechanisms (because built-in pickle sucks for different uses in different ways). Node.js does not come with distributed message sending and serialization either.
Re:NewSQL databases fail to guarantee consistency and I blam... by cbsmith on Friday September 21, 2018 @08:53PM (#18043843)
> With Python, in practice most systems end up based on Celery, with huge long-running tasks.

Oh dear... Yeah, that's a terrible distributed system. Interestingly, all the distributed systems I've worked on with Python haven't had Celery as any kind of core component. It's just poorly suited for the job, as it is more of a task queue. A task queue is really not a good spine for a distributed system.

There are a lot of python distributed systems built around in memory stores, like pycos or dask, or built around existing distributed systems like Akka, Casandra, even Redis.

Re:NewSQL databases fail to guarantee consistency and I blam... by cdcfa78156ae5 on Monday September 24, 2018 @04:04PM (#18060937)
> There are a lot of python distributed systems built around in memory stores, like pycos or dask, or built around existing distributed systems like Akka, Casandra, even Redis.

Cassandra and Redis just mean that you have a database-backed application. How do you schedule Python jobs? Either you build your own scheduler that pulls things out of the database, or you use an existing scheduler. I once worked on a Python system that scheduled tasks using Celery, used Redis for some synchronization flags, and Cassandra for the shared store (also for the main database). Building a custom scheduler for that system would have been a waste of time.

Re:NewSQL databases fail to guarantee consistency and I blam... by cbsmith on Tuesday September 25, 2018 @08:56PM (#18071821)
> Cassandra and Redis just mean that you have a database-backed application.

Oh there's a lot more to it than that. CRDT's... for example.

Re:NewSQL databases fail to guarantee consistency and I blam... by pmart123 on Saturday September 22, 2018 @06:25PM (#18048334)
Well, Celery uses Rabbit-MQ and typically Redis underneath. Rabbit-MQ to pass messages, and Redis to store results.

You can scale up web servers to handle more requests, which then uses Celery to offload jobs to different clusters.

Re:NewSQL databases fail to guarantee consistency and I blam... by cbsmith on Saturday September 22, 2018 @08:56PM (#18048817)
Yeah, but fundamentally Celery is a task queue. You don't build a distributed system around that.
Re:NewSQL databases fail to guarantee consistency and I blam... by lllr_finger on Friday September 21, 2018 @05:52PM (#18042939)
I think the intention was that if you're gently coerced into working with a single thread, like with node, then you're also coerced into writing your code in a way that's independent from other threads. In theory, it's easier reasoning about doing parallel work when you start from this point - I've certainly noticed this effect before.

I don't think any reasonable developer would dismiss concurrency/parallelism as easy problems.

Re:NewSQL databases fail to guarantee consistency and I blam... by icedchai on Friday September 21, 2018 @05:35PM (#18042829)
Or you could use a language that supports threads, like Go, Java, C, C++, C#... This gives you much more flexibility.
Re:NewSQL databases fail to guarantee consistency and I blam... by Quekid5 on Friday September 21, 2018 @12:14PM (#18040728)
That's a really good observation and I agree. I sometimes have to pinch myself to make sure I'm not dreaming when I see that there are actually pretty affordable machines with these insane amounts of RAM. (I think the first machine I personally[0] owned had 512K or something like that.)

[0] Well, my dad bought it, but y'know. He wasn't particularly interested, but I think he recognized an interest in computers in me :).

Re:NewSQL databases fail to guarantee consistency and I blam... by 300bps on Friday September 21, 2018 @04:27PM (#18042426)
My first computer had 38911 BASIC BYTES FREE.
Re:NewSQL databases fail to guarantee consistency and I blam... by dvirsky on Friday September 21, 2018 @08:02PM (#18043612)
Luxury! My first computer (Sinclair ZX Spectrum) had 48KB RAM total, and IIRC 8KB of BASIC RAM available.
Re:NewSQL databases fail to guarantee consistency and I blam... by placebo on Friday September 21, 2018 @10:49PM (#18044181)
Guess I win this round, unless there are older farts than me - Commodore VIC-20 with 3.5KB RAM which was plenty for me to do really cool things with in BASIC and 6502 machine language)
Re:NewSQL databases fail to guarantee consistency and I blam... by tssva on Sunday September 23, 2018 @02:55AM (#18049771)
My first computer was a TRS-80 Model 1 with Level 1 BASIC. 4KB of RAM and 4KB of ROM.

It predated the VIC-20 by just under 3 years. You might have had 3.5KB free for BASIC programs but the VIC-20 had a comparatively spacious 5KB of RAM and 20KB of ROM.

Re:NewSQL databases fail to guarantee consistency and I blam... by placebo on Sunday September 23, 2018 @09:36AM (#18051011)
I did start earlier than the VIC-20 (with TRS-80 Model 2 at school) but you definitely take the title :)
Re:NewSQL databases fail to guarantee consistency and I blam... by qaq on Friday September 21, 2018 @02:01PM (#18041486)
You can get commodity x86 server with 12TB RAM and 224 cores.
Re:NewSQL databases fail to guarantee consistency and I blam... by mmt on Friday September 21, 2018 @08:11PM (#18043656)
If you're willing to go back a generation on CPU (and merely 192 cores), you can get 24TB.

https://www.supermicro.com/products/system/7U/7088/SYS-7088B...

Re:NewSQL databases fail to guarantee consistency and I blam... by toast0 on Friday September 21, 2018 @02:21PM (#18041613)
It looks like 12TB ram is available in eight socket Intel servers? Those are sort of commodity, but availability is limited, and NUMA becomes a much larger issue than in the more easily available dual socket configurations. Looks like Epyc can do 4TB in a dual socket configuration.
Re:NewSQL databases fail to guarantee consistency and I blam... by e12e on Saturday September 22, 2018 @07:50AM (#18045632)
Anyone have experience with mainframes when it comes to this level of cost/performance? I suppose 500k USD is still too "cheap" to consider more special hw/systems - but where's the cut-off when getting a monster running db2 and Code in a Linux VM or something?
Re:NewSQL databases fail to guarantee consistency and I blam... by paulddraper on Friday September 21, 2018 @02:30PM (#18041671)
Link?

It depends what is meant by "commodity" I guess.

The largest server AWS offers is only 64 physical cores (128 logical) and less than 4 TB RAM.

Re:NewSQL databases fail to guarantee consistency and I blam... by chx on Friday September 21, 2018 @07:46PM (#18043504)
http://www.supermicro.com/products/system/4U/8048/SYS-8048B-...

Quad socket R1 (LGA 2011) supports Intel® Xeon® processor E7-8800 v4/v3, E7-4800 v4/v3 family (up to 24-Core)

Up to 12TB DDR4 (128GB 3DS LRDIMM); 96x DIMM slots (8x memory module boards: X10QBi-MEM2)

AFAIK the latest Skylake Xeons ("Scalable" - Platinum/Gold/Silver/Bronze) have regressed to 1.5TB support, see https://ark.intel.com/products/93794/Intel-Xeon-Processor-E7... http://www.colfax-intl.com/nd/downloads/Intel-Xeon-Scalable-... corroborated by https://ark.intel.com/products/120502/Intel-Xeon-Platinum-81...

Since a single 128GB stick costs about 2900 USD, 96 of them will run to ~280 000 USD plus the server so it's likely to be above 300 000K.

If you want to go with 6TB "only" then it's a lot, lot cheaper as 64GB RDIMM sticks can be had below 700 USD. The end result might cost closer to a third of the 12TB server than half of it.

RAM prices comparison: https://memory.net/memory-prices/

Re:NewSQL databases fail to guarantee consistency and I blam... by mmt on Friday September 21, 2018 @08:20PM (#18043695)
That's a previous-gen CPU system. Current is:

https://www.supermicro.com/products/system/7U/7089/SYS-7089P...

Server itself is might only be $25k but those 224 cores could add another $90k, so the total would be close to $400k.

The previous-gen version, SYS-7088B-TR4FT (link in my comment upthread), has 192 DIMM slots, so if you don't need CPU horsepower, you cn get the lower-density modules and still have 12TB (or the max of 24TB for the price premium!).

Re:NewSQL databases fail to guarantee consistency and I blam... by chx on Saturday September 22, 2018 @12:24AM (#18044439)
I edited my answer to indicate that current gen 3.06TB RAM supporting CPUs are not out (yet?)
Re:NewSQL databases fail to guarantee consistency and I blam... by mmt on Saturday September 22, 2018 @01:32AM (#18044636)
Right, which is why the current generation is limited to 12TiB for 8S systems, compared to 24TiB for the generation you quoted.

Even previous gen, if 12TiB main memory is your goal (NUMA concerns aside), it's probably worth going for the 8S system instead of the 4S one, since that's a savings of $144k, and 8 slower/fewer-core CPUs might even be cheaper than 4 that have twice the performance.

Re:NewSQL databases fail to guarantee consistency and I blam... by qaq on Friday September 21, 2018 @02:43PM (#18041762)
Re:NewSQL databases fail to guarantee consistency and I blam... by paulddraper on Friday September 21, 2018 @03:20PM (#18041994)
Interesting, though I don't see the price or any other purchasing details (at least on that page).
Re:NewSQL databases fail to guarantee consistency and I blam... by travisoneill1 on Friday September 21, 2018 @04:33PM (#18042465)
Re:NewSQL databases fail to guarantee consistency and I blam... by jandrese on Friday September 21, 2018 @03:59PM (#18042225)
Pretty sure once you're talking about 12TB of memory it goes to "call for pricing".
Re:NewSQL databases fail to guarantee consistency and I blam... by qaq on Friday September 21, 2018 @05:43PM (#18042872)
I am guessing that it would be in 250-270K range
Re:NewSQL databases fail to guarantee consistency and I blam... by paulddraper on Friday September 21, 2018 @10:37PM (#18044148)
That seems more like enterprise built and sold specially, and less like commodity hardware.
Re:NewSQL databases fail to guarantee consistency and I blam... by qaq on Saturday September 22, 2018 @02:12AM (#18044756)
To me things available from grey box x86 vendors like supermicro or lenovo look like commodity hardware.
Re:NewSQL databases fail to guarantee consistency and I blam... by qaq on Friday September 21, 2018 @05:41PM (#18042858)
here's online configurator for Supermicro 8-way box https://www.rackmountpro.com/product/2570/7089P-TR4T.html