Live data from Hacker News

Scalability, but at what cost? (2015)

frankmcsherry.org

71–80 of 80 posts

Re: Scalability, but at what cost? (2015)

#71

Earlier quoted context omitted.

I talked to a CTO once that said he brought his RoR fleet down from 60 servers to 6-8 by switching to Scala.

I was once involved in a large-scale government project that rewrote a Java app to RoR. They went from 50 servers to 10. It has probably got more to do with the rewrite and the new architecture than whatever language it was written in.

What? It absolutely has to do with the language.

Ruby binary trees: 57 seconds Scala binary trees: 11 seconds

[1] - http://benchmarksgame.alioth.debian.org/u64q/ruby.html [2] - http://benchmarksgame.alioth.debian.org/u64q/scala.html

Re: Scalability, but at what cost? (2015)

#72
post #70
post #48

I agree with author that [in most cases] you don't need distributed processing for your algorithms. But sometimes you do, and when you do need it you have to understand that there is no silver bullet. Creating a distributed system is very difficult, even when using platforms like Spark. Not all algorithms can be scaled easily or scaled at all, and not all algorithms in Spark MLLib or GraphX are actually designed to b…

NLLib is ostensibly open source, why not improve it? Was your final solution too specialized?

Yes, we ended up implementing just project specific parts, not generic enough for MLLib contribution...

Re: Scalability, but at what cost? (2015)

#73
post #32
post #25

Earlier quoted context omitted.

If you haven't seen stackoverflows server architecture posts you'd probably enjoy them: https://nickcraver.com/blog/2016/02/17/stack-overflow-the-ar... I still think containers are great, and I really like the abstractions kubernetes provides, but if I ever had enough traffic to worry about scaling, I envision running a small cluster of very powerful computers rather than 100s of weak ones.

So basically, through careful engineering, they can run stackoverflow.com, one of the top-ten sites in the world, on a single web server and a single database server. Beefy machines for sure, but it kind of takes the air out of the web-scale hype balloon.

> one of the top-ten sites in the world

49th actually: http://www.alexa.com/siteinfo/stackoverflow.com

Re: Scalability, but at what cost? (2015)

#74

Earlier quoted context omitted.

I was once involved in a large-scale government project that rewrote a Java app to RoR. They went from 50 servers to 10. It has probably got more to do with the rewrite and the new architecture than whatever language it was written in.

What? It absolutely has to do with the language. Ruby binary trees: 57 seconds Scala binary trees: 11 seconds [1] - http://benchmarksgame.alioth.debian.org/u64q/ruby.html [2] - http://benchmarksgame.alioth.debian.org/u64q/scala.html

That would mean something if Ruby apps are 100% Ruby and/or are performing binary tree operations all the time, or doing similar kinds of CPU-intensive operations as depicted in the alioth benchmarks. But they don't. Ruby web apps perform lots of string manipulation, memory allocation, I/O. A lot of expensive things are offloaded to C libraries. Things like XML parsing are offloaded to native libraries like libxml; nobody uses an XML parser fully implemented in Ruby. Ruby does not reimplemented gzip compression in Ruby, it uses zlib. So the alioth benchmarks are not representative of real-world performance.

Re: Scalability, but at what cost? (2015)

#75

Earlier quoted context omitted.

What? It absolutely has to do with the language. Ruby binary trees: 57 seconds Scala binary trees: 11 seconds [1] - http://benchmarksgame.alioth.debian.org/u64q/ruby.html [2] - http://benchmarksgame.alioth.debian.org/u64q/scala.html

That would mean something if Ruby apps are 100% Ruby and/or are performing binary tree operations all the time, or doing similar kinds of CPU-intensive operations as depicted in the alioth benchmarks. But they don't. Ruby web apps perform lots of string manipulation, memory allocation, I/O. A lot of expensive things are offloaded to C libraries. Things like XML parsing are offloaded to native libraries like libxml; n…

[deleted]

Re: Scalability, but at what cost? (2015)

#76

Earlier quoted context omitted.

What? It absolutely has to do with the language. Ruby binary trees: 57 seconds Scala binary trees: 11 seconds [1] - http://benchmarksgame.alioth.debian.org/u64q/ruby.html [2] - http://benchmarksgame.alioth.debian.org/u64q/scala.html

That would mean something if Ruby apps are 100% Ruby and/or are performing binary tree operations all the time, or doing similar kinds of CPU-intensive operations as depicted in the alioth benchmarks. But they don't. Ruby web apps perform lots of string manipulation, memory allocation, I/O. A lot of expensive things are offloaded to C libraries. Things like XML parsing are offloaded to native libraries like libxml; n…

>> Ruby web apps perform lots of string manipulation, memory allocation, I/O.
    string manipulation
http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...

    memory allocation
http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...

    I/O
fasta, fasta-redux, reverse-complement write 250MB

regex-dna reads 50MB; k-nucleotide, reverse-complement read 250MB

>> …offloaded to native libraries… So the alioth benchmarks are not representative of real-world performance. The benchmarks game does show C programs ;-)

The benchmarks game does show scripting-languages explicitly using native libraries:

http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...

Re: Scalability, but at what cost? (2015)

#77
post #76

Earlier quoted context omitted.

That would mean something if Ruby apps are 100% Ruby and/or are performing binary tree operations all the time, or doing similar kinds of CPU-intensive operations as depicted in the alioth benchmarks. But they don't. Ruby web apps perform lots of string manipulation, memory allocation, I/O. A lot of expensive things are offloaded to C libraries. Things like XML parsing are offloaded to native libraries like libxml; n…

>> Ruby web apps perform lots of string manipulation, memory allocation, I/O. string manipulation http://benchmarksgame.alioth.debian.org/u64q/program.php?tes... memory allocation http://benchmarksgame.alioth.debian.org/u64q/program.php?tes... I/O fasta, fasta-redux, reverse-complement write 250MB regex-dna reads 50MB; k-nucleotide, reverse-complement read 250MB >> …offloaded to native libraries… So the alioth benchm…

> string manipulation

That benchmark performs string manipulations that rarely occur in web apps. Web apps need: concatenation, substring, find/replace, maybe with regexps. All of those are implemented in C.

> memory allocation

Web apps don't tend to implement entire trees in pure Ruby. That benchmark is completely non-representative of real-world performance.

What exactly are you getting at? Of course it's easy to find a bunch of synthetic benchmarks that show weaknesses in particular cases. Still doesn't prove anything.

Re: Scalability, but at what cost? (2015)

#78
post #76

Earlier quoted context omitted.

>> Ruby web apps perform lots of string manipulation, memory allocation, I/O. string manipulation http://benchmarksgame.alioth.debian.org/u64q/program.php?tes... memory allocation http://benchmarksgame.alioth.debian.org/u64q/program.php?tes... I/O fasta, fasta-redux, reverse-complement write 250MB regex-dna reads 50MB; k-nucleotide, reverse-complement read 250MB >> …offloaded to native libraries… So the alioth benchm…

> string manipulation That benchmark performs string manipulations that rarely occur in web apps. Web apps need: concatenation, substring, find/replace, maybe with regexps. All of those are implemented in C. > memory allocation Web apps don't tend to implement entire trees in pure Ruby. That benchmark is completely non-representative of real-world performance. What exactly are you getting at? Of course it's easy to f…

> Web apps need: concatenation, substring, find/replace, maybe with regexps. All of those are implemented in C.

join and gsub?

http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...

> Web apps don't tend to implement entire trees in pure Ruby.

Nor do other apps but that is what Hans Boehm came up with as a simple GC benchmark.

http://hboehm.info/gc/gc_bench/

> What exactly are you getting at?

You don't seem to know what is shown on the benchmarks game website.

Re: Scalability, but at what cost? (2015)

#79
post #78

Earlier quoted context omitted.

> string manipulation That benchmark performs string manipulations that rarely occur in web apps. Web apps need: concatenation, substring, find/replace, maybe with regexps. All of those are implemented in C. > memory allocation Web apps don't tend to implement entire trees in pure Ruby. That benchmark is completely non-representative of real-world performance. What exactly are you getting at? Of course it's easy to f…

> Web apps need: concatenation, substring, find/replace, maybe with regexps. All of those are implemented in C. join and gsub? http://benchmarksgame.alioth.debian.org/u64q/program.php?tes... > Web apps don't tend to implement entire trees in pure Ruby. Nor do other apps but that is what Hans Boehm came up with as a simple GC benchmark. http://hboehm.info/gc/gc_bench/ > What exactly are you getting at? You don't seem…

Doesn't your regex-dna benchmark kind of prove my point? Just look at the comparisons here: http://benchmarksgame.alioth.debian.org/u64q/performance.php...

C GCC: 2.46 sec

Java: 8.23 sec

Ruby #8: 9.35 sec

It's only about 4x slower than pure C in this case, and only a little slower than Java which has a very good JIT.

> You don't seem to know what is shown on the benchmarks game website.

How funny of you to say that while acting as if the benchmarks "prove" Ruby is the ultimate spawn of the devil that eats away any and all performance. The website itself tells you not to jump to conclusions and that the app itself is the ultimate benchmark: http://benchmarksgame.alioth.debian.org/dont-jump-to-conclus...

Re: Scalability, but at what cost? (2015)

#80
post #78

Earlier quoted context omitted.

> Web apps need: concatenation, substring, find/replace, maybe with regexps. All of those are implemented in C. join and gsub? http://benchmarksgame.alioth.debian.org/u64q/program.php?tes... > Web apps don't tend to implement entire trees in pure Ruby. Nor do other apps but that is what Hans Boehm came up with as a simple GC benchmark. http://hboehm.info/gc/gc_bench/ > What exactly are you getting at? You don't seem…

Doesn't your regex-dna benchmark kind of prove my point? Just look at the comparisons here: http://benchmarksgame.alioth.debian.org/u64q/performance.php... C GCC: 2.46 sec Java: 8.23 sec Ruby #8: 9.35 sec It's only about 4x slower than pure C in this case, and only a little slower than Java which has a very good JIT. > You don't seem to know what is shown on the benchmarks game website. How funny of you to say that w…

>> Doesn't your regex-dna benchmark kind of prove my point? 7 days ago, you could have used the data shown on the benchmarks game website to try and make your point to joslin01.

Instead you chose to dismiss the data.

>> acting as if You seem to have confused me with joslin01.

Post reply on HN