Earlier quoted context omitted.
To be honest the world at large doesn't have an anorexia problem but an obesity epidemy. 50 millions children under the age of 5 are already obese (and I think 93% of obese children shall stay obese their entire life ). So... Anorexia may be a hill to die on and it's not fun for parents of anorexic kids but priorities, priorities and priorities. The real eating disorder worldwide leads to obesity, not anorexia and I…
Obesity is not due to an eating disorder, it's due to sedentary lifestyles, pedestrian hostile neighborhoods, and market forces in the food industry.
Elixir saves Pinterest $2M a year in server costs
91–100 of 481 posts
Re: Elixir saves Pinterest $2M a year in server costs
#92Re: Elixir saves Pinterest $2M a year in server costs
#93Earlier quoted context omitted.
> When our notifications system was running on Java, it was on 30 c32.xl instances. When we switched over to Elixir, we could run on 15. Would be curious to know how they tried to optimise the Java stack. Because on every benchmark I've seen the JVM is faster in every which way than Elixir. Except for memory where often people will over-provision the JVM rather than look at where their code might be over-allocating o…
Elixir is slower than plain PHP according to the techempower benchmarks. I'm not even sure how that's possible but it is. By like a factor of 2 iirc. I'm not sure how elixir is that slow since it's compiled.
You're "Not even sure how that's possible" as if implying PHP is slow?
Even old pre-7 PHP was much faster than Ruby, Python, and others. And most PHP libs are just wrappers over C code.
Re: Elixir saves Pinterest $2M a year in server costs
#94Re: Elixir saves Pinterest $2M a year in server costs
#95Earlier quoted context omitted.
> When our notifications system was running on Java, it was on 30 c32.xl instances. When we switched over to Elixir, we could run on 15. Would be curious to know how they tried to optimise the Java stack. Because on every benchmark I've seen the JVM is faster in every which way than Elixir. Except for memory where often people will over-provision the JVM rather than look at where their code might be over-allocating o…
They rewrote, which is known to help too. Going from 30 to 15 instances is not bad but it's very likely that a Java-to-Java rewrite would have helped go down too. The big one however is going from 200 Python servers to 4 Erlang ones: a 50x reduction is quite something and a Python-to-Python rewrite would not have allowed to achieved a 50x gain: > All this is possible because Elixir, and the Erlang platform underneath…
https://medium.com/pinterest-engineering/fighting-spam-with-...
In short, the Elixir is doing something completely different. And they are also not counting some new pieces like the database cluster and kafka based aggregators, etc.
Re: Elixir saves Pinterest $2M a year in server costs
#96Earlier quoted context omitted.
To be honest the world at large doesn't have an anorexia problem but an obesity epidemy. 50 millions children under the age of 5 are already obese (and I think 93% of obese children shall stay obese their entire life ). So... Anorexia may be a hill to die on and it's not fun for parents of anorexic kids but priorities, priorities and priorities. The real eating disorder worldwide leads to obesity, not anorexia and I…
Obesity is not due to an eating disorder, it's due to sedentary lifestyles, pedestrian hostile neighborhoods, and market forces in the food industry.
But I hope parent commenter never has to live personally through finding out just how life destroying the predominant cultural attitudes around body form & food around us are. I wouldn't wish it on my worst enemy. Obesity is by far the least of concerns.
Re: Elixir saves Pinterest $2M a year in server costs
#97Earlier quoted context omitted.
Google are returning results for image search without the overhead cost. This is the only logical reason I can think of why Pinterest still exists.
I was never sure where all the hate is coming from. Pinterest is actually one of my favourite apps, that I use regularly – and I use very few apps. I actually really love it and after years I still find new uses for it. As far as I can tell, they have a pretty loyal user base.
Re: Elixir saves Pinterest $2M a year in server costs
#98Anecdotally, I am beginning to hear more and more about organisations moving away from high level cloud infrastructure (such as lambda and cloud gateway) and going back to plain old virtual servers (like EC2), or even on-prem. Often the cost of supposedly "cheap" cloud environments is WAY more than you might expect and all booked as operational rather than capital expenditure (the latter being often preferable to sha…
The cost and the incredible performance gains we got by moving to a bunch of local computers was enough to make the whole thing pay for itself in about two months. Yep, physical computers costed less than two months of cloud. Plus the gains in productivity from having to wait minutes instead of hours.
Maintenance was never a problem, and we didn't need to hire new people to take extra care of the servers.
My current company is thinking of doing the same for AI servers. It's just too expensive in AWS.
Re: Elixir saves Pinterest $2M a year in server costs
#99My problem with Elixir is that the syntax is too noisy: defmodule Math do def sum(a, b) do a+b end end Compare that with Python: def sum(a, b): return a+b Having the name of the file be the name of the module and whitespace defining the blocks is the perfect approach for me.
Unfair comparison, your Elixir example includes a module definition. That said, code volume is never the issue, code clarity is. Right now you're comparing trivial examples, but what does in this case Pinterest's high volume spam detection code look like? I wouldn't judge a language on microscopic code snippets, or disregard them as "too noisy" when it usually isn't a deciding factor in programming languages.
Huh? TekMol explicitly points out that the python code also includes a module definition. It's just that the python module definition takes up zero characters in the source file. (Note that this is not always true, but in this case it is.)
It takes more than that, in the name of the file, but the Elixir file will also have to have a name, and the comparison ignores both of those equally.
Re: Elixir saves Pinterest $2M a year in server costs
#100Earlier quoted context omitted.
> When our notifications system was running on Java, it was on 30 c32.xl instances. When we switched over to Elixir, we could run on 15. Would be curious to know how they tried to optimise the Java stack. Because on every benchmark I've seen the JVM is faster in every which way than Elixir. Except for memory where often people will over-provision the JVM rather than look at where their code might be over-allocating o…
The advantages of Elixir are not performance-related. There is a lot of focus on raw performance on web-related services, when in reality most of their running time is spent waiting for IO. If there are two things the BEAM excels at, is IO and turning almost any problem into half a dozen processes that are scheduled and run in parallel, if not geographically-distributed, with 1/50th the effort of any other language.…