News for hackers. Stuff that matters.
Re:From Laptop to Lambda: Outsourcing Everyday Jobs to Thous... by s_Hogg on Sunday July 14, 2019 @08:27PM (#20437190)
Is there a use case for this where it becomes uneconomic? I was working with AWS last year and found that in some cases it really was better to just have a single EC2 instance (or auto-scaling group) rather that ~9999999999999 lambdas to handle each individual task.
Re:From Laptop to Lambda: Outsourcing Everyday Jobs to Thous... by keithwinstein on Sunday July 14, 2019 @09:16PM (#20437381)
(Co-author here) It really depends (see Figure 2).

On the question of Lambda vs. EC2, EC2 instances take much longer to start. So depending on the job, to get the performance you can get with a "burst parallel" flock of Lambda workers, you would need to keep a warm cluster of EC2 instances ready to take your job. At which point, the cost comparison depends on how often you have work to execute. EC2 is cheaper if you have a 100% duty cycle (but you probably don't).

The gg tool, though, is mostly agnostic to the backend -- you can take a job that's expressed in gg IR (e.g., "compile this program") and then execute it with any of the gg back-ends. We have one for Lambda and one for a cluster of warm VMs. The performance of gg-to-EC2 is generally better than outsourcing methods that leave your laptop in the driver's seat (e.g. bazel-to-icecc) and give less semantic information about data- and control-flow of the job to the remote execution engine. (E.g. in Figure 9, you can see that gg-on-EC2 is much faster than icecc-on-EC2 for compiling GIMP and Inkscape.)

Re:From Laptop to Lambda: Outsourcing Everyday Jobs to Thous... by polskibus on Monday July 15, 2019 @12:02PM (#20442070)
Any plans to evolve gg to use open source serverless platforms like knative, openwhisk or openfaas?
Re:From Laptop to Lambda: Outsourcing Everyday Jobs to Thous... by keithwinstein on Monday July 15, 2019 @01:41PM (#20443246)
Sure -- we actually already have an OpenWhisk backend. The IR is sufficiently stupid that it's pretty easy to write a new backend.

At least a low-performing one -- it gets harder if you want to use (a) persistent workers [instead of invoking a new platform worker for every "thunk"] and (b) direct inter-worker networking [instead of putting every intermediate result in a storage medium].

Re:From Laptop to Lambda: Outsourcing Everyday Jobs to Thous... by crb002 on Monday July 15, 2019 @12:07AM (#20438053)
Where is the DAG scheduler in the source? About to take a look. Interested in labeling thunks with file size and CPU time then feeding into a solver I am writing to optimize cost within a runtime budget.
Re:From Laptop to Lambda: Outsourcing Everyday Jobs to Thous... by sadjad on Monday July 15, 2019 @01:03AM (#20438281)
Re:From Laptop to Lambda: Outsourcing Everyday Jobs to Thous... by s_Hogg on Sunday July 14, 2019 @10:03PM (#20437595)
That makes sense, thanks for taking the time to expand on this point.
Re:From Laptop to Lambda: Outsourcing Everyday Jobs to Thous... by dajohnson89 on Monday July 15, 2019 @12:50AM (#20438229)
the startup time isn't always that important. whether a task takes 20 seconds or 60 seconds isnt always something the user cares that much about. and as always we have to weigh the developer headache versus the performance improvement. the customer always wins, but the less headaches the devs have, the more responsive they are to issues that are more pressing than marginal performance improvements.
Re:From Laptop to Lambda: Outsourcing Everyday Jobs to Thous... by KUcxrAVrtI on Monday July 15, 2019 @06:57AM (#20439587)
https://en.wikipedia.org/wiki/Amdahl%27s_law

or

https://en.wikipedia.org/wiki/Gustafson%27s_law

Basically there are parts of every workload that needs to be run sequentially, there will be a point where running more smaller functions will be less efficient than running one large function.