reddmetrics / forma-deploy

Deployer for the FORMA Clojure code.
4 stars 0 forks source link

Forma-Deploy Clean Up, Bid prices #3

Closed dpetrovics closed 12 years ago

dpetrovics commented 12 years ago

Hey Guys I cleaned up the forma-deploy project a bit. You can now do: lein run --emr --type large --size 5 --bid 0.05 to use a bid price of 5 cents for the core nodes. (The master node always uses on-demand). If you do NOT supply a --bid, it will use the on-demand price for the core nodes. Please not that the bid price is a MAXIMUM price that we're willing to pay, what we actually pay is the current SPOT price, which Amazon sets. As long as our bid > spot we are OK. If the spot price goes above our bid, our instances using the spot price are terminated.

I also cleaned up some of the validation and the way we parse the command line arguments so that all of the error messages are sensible.

Question-- on Amazon it suggests that we use on-demand for master and core, keep these to a minimum, and start up a bunch of task nodes and use the spot price for these. If they get terminated then we're still OK since their tasks can be reassigned. I would recommend that we either do this, or keep our bid prices really high so our core nodes are not getting terminated. Thoughts? Which option?

Also, since we have only been using EMR, we're not using about 90% of the code in here that was written for EC2 and pallet-hadoop. The EMR stuff just requires us to call the elastic-mapreduce script with the proper arguments. Just in case, I updated the code so we can specify bid prices for the --start option as well, which does not use EMR.

Not sure if we should just keep all the extra code, spin it off to a new repo, or what, but it would be good to discuss what features you guys want have available in this project. There's also a few leiningen plugins that Sam wrote (to upload the project uberjar, for example), but they're not being used since we're using Robin's bootstrap script from S3. What to do with these?

Thanks!

sritchie commented 12 years ago

Yeah, might be good to figure out how much space we need for our jobs and boot up core nodes that cover that size space on HDFS (taking into account the 3x replication factor).

I've ALWAYS run spot-only clusters w/ my twitter work, and we've almost never had a cluster shut down. I'd say spot-only is worth the huge price savings.

On Mon, Jul 23, 2012 at 2:26 PM, dpetrovics < reply@reply.github.com

wrote:

Hey Guys I cleaned up the forma-deploy project a bit. You can now do: lein run --emr --type large --size 5 --bid 0.05 to use a bid price of 5 cents for the core nodes. (The master node always uses on-demand). If you do NOT supply a --bid, it will use the on-demand price for the core nodes. Please not that the bid price is a MAXIMUM price that we're willing to pay, what we actually pay is the current SPOT price, which Amazon sets. As long as our bid > spot we are OK. If the spot price goes above our bid, our instances using the spot price are terminated.

I also cleaned up some of the validation and the way we parse the command line arguments so that all of the error messages are sensible.

Question-- on Amazon it suggests that we use on-demand for master and core, keep these to a minimum, and start up a bunch of task nodes and use the spot price for these. If they get terminated then we're still OK since their tasks can be reassigned. I would recommend that we either do this, or keep our bid prices really high so our core nodes are not getting terminated. Thoughts? Which option?

Also, since we have only been using EMR, we're not using about 90% of the code in here that was written for EC2 and pallet-hadoop. The EMR stuff just requires us to call the elastic-mapreduce script with the proper arguments. Just in case, I updated the code so we can specify bid prices for the --start option as well, which does not use EMR.

Not sure if we should just keep all the extra code, spin it off to a new repo, or what, but it would be good to discuss what features you guys want have available in this project. There's also a few leiningen plugins that Sam wrote (to upload the project uberjar, for example), but they're not being used since we're using Robin's bootstrap script from S3. What to do with these?

Thanks!

You can merge this Pull Request by running:

git pull https://github.com/dpetrovics/forma-deploy master

Or you can view, comment on it, or merge it online at:

https://github.com/reddmetrics/forma-deploy/pull/3

-- Commit Summary --

  • Changed the bootstrap file to forma_bootstrap_robin.sh. I think this is the updated one that clone our git repository into the cluster. Tweaked the options map in parse-hadoop-args. The parse function was throwing an unhelpful error in the clojure.tools.cli library in every situation when we dont provide a --size (even if we just want to stop a cluster). Now it provides sensible error messages using our three validators: just-one? size-valid? and spotprice-valid? Added an option --spot which you can use to specify a spot price.
  • changed spot price to bid price, and added this parameter to all necessary functions as an optional argument (or required, as appropriate)
  • small tweaks, and accounted for a nil bid price
  • support for on-demand pricing

-- File Changes --

M src/forma/hadoop/cli.clj (3) M src/forma/hadoop/cluster.clj (92)

-- Patch Links --

https://github.com/reddmetrics/forma-deploy/pull/3.patch https://github.com/reddmetrics/forma-deploy/pull/3.diff


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3

Sam Ritchie, Twitter Inc 703.662.1337 @sritchie09

(Too brief? Here's why! http://emailcharter.org)

dpetrovics commented 12 years ago

Makes sense about figuring out how much space we would need.

If we go for a spot-only strategy for core and tasks, (Im assuming we're still doing on-demand for the master, right?), then we should set the bid price high. Does that make sense? We'll get a really low price for almost all the time (around 2.6 cents/hr for a large during the past week), and absorb the hit if it spikes for a few minutes so that our core nodes wont get terminated.

On Mon, Jul 23, 2012 at 5:34 PM, Sam Ritchie < reply@reply.github.com

wrote:

Yeah, might be good to figure out how much space we need for our jobs and boot up core nodes that cover that size space on HDFS (taking into account the 3x replication factor).

I've ALWAYS run spot-only clusters w/ my twitter work, and we've almost never had a cluster shut down. I'd say spot-only is worth the huge price savings.

On Mon, Jul 23, 2012 at 2:26 PM, dpetrovics < reply@reply.github.com

wrote:

Hey Guys I cleaned up the forma-deploy project a bit. You can now do: lein run --emr --type large --size 5 --bid 0.05 to use a bid price of 5 cents for the core nodes. (The master node always uses on-demand). If you do NOT supply a --bid, it will use the on-demand price for the core nodes. Please not that the bid price is a MAXIMUM price that we're willing to pay, what we actually pay is the current SPOT price, which Amazon sets. As long as our bid > spot we are OK. If the spot price goes above our bid, our instances using the spot price are terminated.

I also cleaned up some of the validation and the way we parse the command line arguments so that all of the error messages are sensible.

Question-- on Amazon it suggests that we use on-demand for master and core, keep these to a minimum, and start up a bunch of task nodes and use the spot price for these. If they get terminated then we're still OK since their tasks can be reassigned. I would recommend that we either do this, or keep our bid prices really high so our core nodes are not getting terminated. Thoughts? Which option?

Also, since we have only been using EMR, we're not using about 90% of the code in here that was written for EC2 and pallet-hadoop. The EMR stuff just requires us to call the elastic-mapreduce script with the proper arguments. Just in case, I updated the code so we can specify bid prices for the --start option as well, which does not use EMR.

Not sure if we should just keep all the extra code, spin it off to a new repo, or what, but it would be good to discuss what features you guys want have available in this project. There's also a few leiningen plugins that Sam wrote (to upload the project uberjar, for example), but they're not being used since we're using Robin's bootstrap script from S3. What to do with these?

Thanks!

You can merge this Pull Request by running:

git pull https://github.com/dpetrovics/forma-deploy master

Or you can view, comment on it, or merge it online at:

https://github.com/reddmetrics/forma-deploy/pull/3

-- Commit Summary --

  • Changed the bootstrap file to forma_bootstrap_robin.sh. I think this is the updated one that clone our git repository into the cluster. Tweaked the options map in parse-hadoop-args. The parse function was throwing an unhelpful error in the clojure.tools.cli library in every situation when we dont provide a --size (even if we just want to stop a cluster). Now it provides sensible error messages using our three validators: just-one? size-valid? and spotprice-valid? Added an option --spot which you can use to specify a spot price.
  • changed spot price to bid price, and added this parameter to all necessary functions as an optional argument (or required, as appropriate)
  • small tweaks, and accounted for a nil bid price
  • support for on-demand pricing

-- File Changes --

M src/forma/hadoop/cli.clj (3) M src/forma/hadoop/cluster.clj (92)

-- Patch Links --

https://github.com/reddmetrics/forma-deploy/pull/3.patch https://github.com/reddmetrics/forma-deploy/pull/3.diff


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3

Sam Ritchie, Twitter Inc 703.662.1337 @sritchie09

(Too brief? Here's why! http://emailcharter.org)


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7192157

sritchie commented 12 years ago

Yup, makes some sweet, sweet sense to me

On Mon, Jul 23, 2012 at 2:46 PM, dpetrovics < reply@reply.github.com

wrote:

Makes sense about figuring out how much space we would need.

If we go for a spot-only strategy for core and tasks, (Im assuming we're still doing on-demand for the master, right?), then we should set the bid price high. Does that make sense? We'll get a really low price for almost all the time (around 2.6 cents/hr for a large during the past week), and absorb the hit if it spikes for a few minutes so that our core nodes wont get terminated.

On Mon, Jul 23, 2012 at 5:34 PM, Sam Ritchie < reply@reply.github.com

wrote:

Yeah, might be good to figure out how much space we need for our jobs and boot up core nodes that cover that size space on HDFS (taking into account the 3x replication factor).

I've ALWAYS run spot-only clusters w/ my twitter work, and we've almost never had a cluster shut down. I'd say spot-only is worth the huge price savings.

On Mon, Jul 23, 2012 at 2:26 PM, dpetrovics < reply@reply.github.com

wrote:

Hey Guys I cleaned up the forma-deploy project a bit. You can now do: lein run --emr --type large --size 5 --bid 0.05 to use a bid price of 5 cents for the core nodes. (The master node always uses on-demand). If you do NOT supply a --bid, it will use the on-demand price for the core nodes. Please not that the bid price is a MAXIMUM price that we're willing to pay, what we actually pay is the current SPOT price, which Amazon sets. As long as our bid > spot we are OK. If the spot price goes above our bid, our instances using the spot price are terminated.

I also cleaned up some of the validation and the way we parse the command line arguments so that all of the error messages are sensible.

Question-- on Amazon it suggests that we use on-demand for master and core, keep these to a minimum, and start up a bunch of task nodes and use the spot price for these. If they get terminated then we're still OK since their tasks can be reassigned. I would recommend that we either do this, or keep our bid prices really high so our core nodes are not getting terminated. Thoughts? Which option?

Also, since we have only been using EMR, we're not using about 90% of the code in here that was written for EC2 and pallet-hadoop. The EMR stuff just requires us to call the elastic-mapreduce script with the proper arguments. Just in case, I updated the code so we can specify bid prices for the --start option as well, which does not use EMR.

Not sure if we should just keep all the extra code, spin it off to a new repo, or what, but it would be good to discuss what features you guys want have available in this project. There's also a few leiningen plugins that Sam wrote (to upload the project uberjar, for example), but they're not being used since we're using Robin's bootstrap script from S3. What to do with these?

Thanks!

You can merge this Pull Request by running:

git pull https://github.com/dpetrovics/forma-deploy master

Or you can view, comment on it, or merge it online at:

https://github.com/reddmetrics/forma-deploy/pull/3

-- Commit Summary --

  • Changed the bootstrap file to forma_bootstrap_robin.sh. I think this is the updated one that clone our git repository into the cluster. Tweaked the options map in parse-hadoop-args. The parse function was throwing an unhelpful error in the clojure.tools.cli library in every situation when we dont provide a --size (even if we just want to stop a cluster). Now it provides sensible error messages using our three validators: just-one? size-valid? and spotprice-valid? Added an option --spot which you can use to specify a spot price.
  • changed spot price to bid price, and added this parameter to all necessary functions as an optional argument (or required, as appropriate)
  • small tweaks, and accounted for a nil bid price
  • support for on-demand pricing

-- File Changes --

M src/forma/hadoop/cli.clj (3) M src/forma/hadoop/cluster.clj (92)

-- Patch Links --

https://github.com/reddmetrics/forma-deploy/pull/3.patch https://github.com/reddmetrics/forma-deploy/pull/3.diff


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3

Sam Ritchie, Twitter Inc 703.662.1337 @sritchie09

(Too brief? Here's why! http://emailcharter.org)


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7192157


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7192484

Sam Ritchie, Twitter Inc 703.662.1337 @sritchie09

(Too brief? Here's why! http://emailcharter.org)

danhammer commented 12 years ago

We run into this problem periodically but not often, especially with long-running tasks. @dpetrovics, your strategy makes sense; the short but high spikes are a pain.

danhammer commented 12 years ago

The abundance of docs is great, @dpetrovics.

sritchie commented 12 years ago

But probably cheaper than losing the whole cluster and rebooting.

On Mon, Jul 23, 2012 at 3:00 PM, Dan < reply@reply.github.com

wrote:

We run into this problem periodically but not often, especially with long-running tasks. @dpetrovics, your strategy makes sense; the short but high spikes are a pain.


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7192889

Sam Ritchie, Twitter Inc 703.662.1337 @sritchie09

(Too brief? Here's why! http://emailcharter.org)

danhammer commented 12 years ago

Not sure what the "but" means -- we're saying the same thing, I think.

sritchie commented 12 years ago

"the short but high spikes are a pain, but probably cheaper than losing the whole cluster and rebooting"

On Mon, Jul 23, 2012 at 3:04 PM, Dan < reply@reply.github.com

wrote:

Not sure what the "but" means -- we're saying the same thing, I think.


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193005

Sam Ritchie, Twitter Inc 703.662.1337 @sritchie09

(Too brief? Here's why! http://emailcharter.org)

dpetrovics commented 12 years ago

No problem for the docs. I can go through and add them to all functions to add some clarity

On Mon, Jul 23, 2012 at 6:04 PM, Dan < reply@reply.github.com

wrote:

Not sure what the "but" means -- we're saying the same thing, I think.


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193005

robinkraft commented 12 years ago

@dpetrovics this stuff is great! Thanks for the solid work on this.

Spot-only is definitely the way to go. The prices this summer are insanely low, and as long as you're running your cluster outside availability zones us-east-1a and 1e the prices are usually pretty stable even under normal conditions.

So how about this: One on-demand master, at least one core node with either a high spot price (equal to on-demand price?) or make it on demand, and then everything else with the bid price. @sritchie is right about the cost of losing the whole cluster. It's awful! And costs a lot in our time, and in having to reprocess everything.

I'd also suggest that instead of defaulting to on-demand pricing if there's no spot price, just default to the on-demand price for the bid price. That's usually very high compared to the spot price, but it's pretty safe too.

danhammer commented 12 years ago

I am being unclear, I guess. The docs are great as they are, @dpetrovics. I was just thanking you for your attention to the docs. @sritchie, I meant to say that it's not worth the trouble of losing the cluster, and that setting a high bid price is well worth the cost. It's still very expensive to run this stuff, but we can reduce the processing time -- it's not worth setting a low bid price to save money.

robinkraft commented 12 years ago
Yeah, might be good to figure out how much space we need for our jobs and boot 
up core nodes that cover that size space on HDFS (taking into account the 3x 
replication factor).

Most of the jobs wouldn't take more than a few core nodes, given 850gb of local storage on a large instance, and 1690gb on the high memory instances. @sritchie how could we ensure that all of the data is replicated on the core instances? Is that something HDFS can handle itself? That is, if 20 of 25 instances suddenly died, with 3x replication is there any way to be sure we haven't lost data?

sritchie commented 12 years ago

Why, though? Task instances are really good for long-running clusters that need to grow or shrink. We NEVER grow or shrink, so it just doesn't matter for us. Not trying to be difficult, but this won't gain us anything, and will introduce unneeded complexity.

On Mon, Jul 23, 2012 at 3:15 PM, Robin Kraft < reply@reply.github.com

wrote:

Yeah, might be good to figure out how much space we need for our jobs and
boot up core nodes that cover that size space on HDFS (taking into account
the 3x replication factor).

Most of the jobs wouldn't take more than a few core nodes, given 850gb of local storage on a large instance, and 1690gb on the high memory instances. @sritchie how could we ensure that all of the data is replicated on the core instances? Is that something HDFS can handle itself? That is, if 20 of 25 instances suddenly died, with 3x replication is there any way to be sure we haven't lost data?


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193255

Sam Ritchie, Twitter Inc 703.662.1337 @sritchie09

(Too brief? Here's why! http://emailcharter.org)

robinkraft commented 12 years ago

I think I misunderstood what you were getting at. What did you mean in the bit I quoted, about having core nodes?

On Mon, Jul 23, 2012, at 03:28 PM, Sam Ritchie wrote:

Why, though? Task instances are really good for long-running clusters that need to grow or shrink. We NEVER grow or shrink, so it just doesn't matter for us. Not trying to be difficult, but this won't gain us anything, and will introduce unneeded complexity.

On Mon, Jul 23, 2012 at 3:15 PM, Robin Kraft < reply@reply.github.com

wrote:

Yeah, might be good to figure out how much space we need for our jobs and
boot up core nodes that cover that size space on HDFS (taking into account
the 3x replication factor).

Most of the jobs wouldn't take more than a few core nodes, given 850gb of local storage on a large instance, and 1690gb on the high memory instances. @sritchie how could we ensure that all of the data is replicated on the core instances? Is that something HDFS can handle itself? That is, if 20 of 25 instances suddenly died, with 3x replication is there any way to be sure we haven't lost data?


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193255

Sam Ritchie, Twitter Inc 703.662.1337 @sritchie09

(Too brief? Here's why! http://emailcharter.org)


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193589

dpetrovics commented 12 years ago

From what I understand, if you dont want to lose core nodes we should either make them on demand or set a high spot price. If we lose a core node, our entire jobflow gets terminated. The reason we should figure out how many core nodes we need is so that we can make all the other nodes task nodes. Ie-- for a 50 node cluster, we are currently running 1 master and 49 core. If we only need say 700 GB of storage, then 3 core nodes would do (3

For the task nodes, if we lose a bunch of them because spot price goes above the bid price, its not a huge deal because they only run the task tracker daemon and dont actually write any data so our jobflow is still OK. As soon as the spot price goes back below the bid price the jobtracker (master node) will reassign tasks to new task nodes, and the jobflow will continue.

Sam, does this sound correct?

On Mon, Jul 23, 2012 at 6:34 PM, Robin Kraft < reply@reply.github.com

wrote:

I think I misunderstood what you were getting at. What did you mean in the bit I quoted, about having core nodes?

On Mon, Jul 23, 2012, at 03:28 PM, Sam Ritchie wrote:

Why, though? Task instances are really good for long-running clusters that need to grow or shrink. We NEVER grow or shrink, so it just doesn't matter for us. Not trying to be difficult, but this won't gain us anything, and will introduce unneeded complexity.

On Mon, Jul 23, 2012 at 3:15 PM, Robin Kraft < reply@reply.github.com

wrote:

Yeah, might be good to figure out how much space we need for our jobs
and
boot up core nodes that cover that size space on HDFS (taking into
account
the 3x replication factor).

Most of the jobs wouldn't take more than a few core nodes, given 850gb of local storage on a large instance, and 1690gb on the high memory instances. @sritchie how could we ensure that all of the data is replicated on the core instances? Is that something HDFS can handle itself? That is, if 20 of 25 instances suddenly died, with 3x replication is there any way to be sure we haven't lost data?


Reply to this email directly or view it on GitHub:

https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193255

Sam Ritchie, Twitter Inc 703.662.1337 @sritchie09

(Too brief? Here's why! http://emailcharter.org)


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193589


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193698

robinkraft commented 12 years ago

No way, I had no idea! That's awesome. +1 for using task nodes!

On Mon, Jul 23, 2012, at 03:53 PM, dpetrovics wrote:

From what I understand, if you dont want to lose core nodes we should either make them on demand or set a high spot price. If we lose a core node, our entire jobflow gets terminated. The reason we should figure out how many core nodes we need is so that we can make all the other nodes task nodes. Ie-- for a 50 node cluster, we are currently running 1 master and 49 core. If we only need say 700 GB of storage, then 3 core nodes would do (3

  • replication that sam mentioned). The other 46 nodes can all be task nodes.

For the task nodes, if we lose a bunch of them because spot price goes above the bid price, its not a huge deal because they only run the task tracker daemon and dont actually write any data so our jobflow is still OK. As soon as the spot price goes back below the bid price the jobtracker (master node) will reassign tasks to new task nodes, and the jobflow will continue.

Sam, does this sound correct?

On Mon, Jul 23, 2012 at 6:34 PM, Robin Kraft < reply@reply.github.com

wrote:

I think I misunderstood what you were getting at. What did you mean in the bit I quoted, about having core nodes?

On Mon, Jul 23, 2012, at 03:28 PM, Sam Ritchie wrote:

Why, though? Task instances are really good for long-running clusters that need to grow or shrink. We NEVER grow or shrink, so it just doesn't matter for us. Not trying to be difficult, but this won't gain us anything, and will introduce unneeded complexity.

On Mon, Jul 23, 2012 at 3:15 PM, Robin Kraft < reply@reply.github.com

wrote:

Yeah, might be good to figure out how much space we need for our jobs
and
boot up core nodes that cover that size space on HDFS (taking into
account
the 3x replication factor).

Most of the jobs wouldn't take more than a few core nodes, given 850gb of local storage on a large instance, and 1690gb on the high memory instances. @sritchie how could we ensure that all of the data is replicated on the core instances? Is that something HDFS can handle itself? That is, if 20 of 25 instances suddenly died, with 3x replication is there any way to be sure we haven't lost data?


Reply to this email directly or view it on GitHub:

https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193255

Sam Ritchie, Twitter Inc 703.662.1337 @sritchie09

(Too brief? Here's why! http://emailcharter.org)


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193589


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193698


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7194104

dpetrovics commented 12 years ago

@danhammer Yep no problem for the docs! My response was unclear. Was just saying that there is still some more documenting that should be done, and I can help with, so things are more clear :)

sritchie commented 12 years ago

Why do you want core vs task? I submit that we don't need task nodes since we don't accordion the cluster.

On Mon, Jul 23, 2012 at 3:34 PM, Robin Kraft < reply@reply.github.com

wrote:

I think I misunderstood what you were getting at. What did you mean in the bit I quoted, about having core nodes?

On Mon, Jul 23, 2012, at 03:28 PM, Sam Ritchie wrote:

Why, though? Task instances are really good for long-running clusters that need to grow or shrink. We NEVER grow or shrink, so it just doesn't matter for us. Not trying to be difficult, but this won't gain us anything, and will introduce unneeded complexity.

On Mon, Jul 23, 2012 at 3:15 PM, Robin Kraft < reply@reply.github.com

wrote:

Yeah, might be good to figure out how much space we need for our jobs
and
boot up core nodes that cover that size space on HDFS (taking into
account
the 3x replication factor).

Most of the jobs wouldn't take more than a few core nodes, given 850gb of local storage on a large instance, and 1690gb on the high memory instances. @sritchie how could we ensure that all of the data is replicated on the core instances? Is that something HDFS can handle itself? That is, if 20 of 25 instances suddenly died, with 3x replication is there any way to be sure we haven't lost data?


Reply to this email directly or view it on GitHub:

https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193255

Sam Ritchie, Twitter Inc 703.662.1337 @sritchie09

(Too brief? Here's why! http://emailcharter.org)


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193589


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193698

Sam Ritchie, Twitter Inc 703.662.1337 @sritchie09

(Too brief? Here's why! http://emailcharter.org)

sritchie commented 12 years ago

But Robin, the issue here is that on-demand nodes are very expensive, so you're paying a large premium for this convenience (and how often does a cluster shut down on you?)

On Mon, Jul 23, 2012 at 3:55 PM, Robin Kraft < reply@reply.github.com

wrote:

No way, I had no idea! That's awesome. +1 for using task nodes!

On Mon, Jul 23, 2012, at 03:53 PM, dpetrovics wrote:

From what I understand, if you dont want to lose core nodes we should either make them on demand or set a high spot price. If we lose a core node, our entire jobflow gets terminated. The reason we should figure out how many core nodes we need is so that we can make all the other nodes task nodes. Ie-- for a 50 node cluster, we are currently running 1 master and 49 core. If we only need say 700 GB of storage, then 3 core nodes would do (3

  • replication that sam mentioned). The other 46 nodes can all be task nodes.

For the task nodes, if we lose a bunch of them because spot price goes above the bid price, its not a huge deal because they only run the task tracker daemon and dont actually write any data so our jobflow is still OK. As soon as the spot price goes back below the bid price the jobtracker (master node) will reassign tasks to new task nodes, and the jobflow will continue.

Sam, does this sound correct?

On Mon, Jul 23, 2012 at 6:34 PM, Robin Kraft < reply@reply.github.com

wrote:

I think I misunderstood what you were getting at. What did you mean in the bit I quoted, about having core nodes?

On Mon, Jul 23, 2012, at 03:28 PM, Sam Ritchie wrote:

Why, though? Task instances are really good for long-running clusters that need to grow or shrink. We NEVER grow or shrink, so it just doesn't matter for us. Not trying to be difficult, but this won't gain us anything, and will introduce unneeded complexity.

On Mon, Jul 23, 2012 at 3:15 PM, Robin Kraft < reply@reply.github.com

wrote:

Yeah, might be good to figure out how much space we need for our
jobs
and
boot up core nodes that cover that size space on HDFS (taking into
account
the 3x replication factor).

Most of the jobs wouldn't take more than a few core nodes, given 850gb of local storage on a large instance, and 1690gb on the high memory instances. @sritchie how could we ensure that all of the data is replicated on the core instances? Is that something HDFS can handle itself? That is, if 20 of 25 instances suddenly died, with 3x replication is there any way to be sure we haven't lost data?


Reply to this email directly or view it on GitHub:

https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193255

Sam Ritchie, Twitter Inc 703.662.1337 @sritchie09

(Too brief? Here's why! http://emailcharter.org)


Reply to this email directly or view it on GitHub:

https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193589


Reply to this email directly or view it on GitHub:

https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7193698


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7194104


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7194140

Sam Ritchie, Twitter Inc 703.662.1337 @sritchie09

(Too brief? Here's why! http://emailcharter.org)

robinkraft commented 12 years ago

Nevermind @sritchie, I think I'm still not quite getting how task and core nodes work. I didn't mean on-demand instances, just thought it was cool that we could lose instances and not lose data.

I lost large clusters when I was trying to run them all day - temporary spikes were killing me. The trends analysis will take ages for the 50 tiles we have left to process, so losing everything 18 hours in will be quite costly when there are 50 high-memory instances running. There's the chance that it will never complete.

Anyway, I don't want to make things more complicated. There may be a better solution, like doing the trends analysis for smaller sets of countries so that we can checkpoint data more easily.

sritchie commented 12 years ago

Dave's suggesting having a core of on-demand instances with more task instances as necessary for processing. It's a great idea if you don't mind the higher cost of those core nodes.

Data gets stored on core nodes, tasks run on core and task nodes.

On Mon, Jul 23, 2012 at 4:17 PM, Robin Kraft < reply@reply.github.com

wrote:

Nevermind @sritchie, I think I'm still not quite getting how task and core nodes work. I didn't mean on-demand instances, just thought it was cool that we could lose instances and not lose data.

I lost large clusters when I was trying to run them all day - temporary spikes were killing me. The trends analysis will take ages for the 50 tiles we have left to process, so losing everything 18 hours in will be quite costly when there are 50 high-memory instances running. There's the chance that it will never complete.

Anyway, I don't want to make things more complicated. There may be a better solution, like doing the trends analysis for smaller sets of countries so that we can checkpoint data more easily.


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7194572

Sam Ritchie, Twitter Inc 703.662.1337 @sritchie09

(Too brief? Here's why! http://emailcharter.org)

robinkraft commented 12 years ago

Ah, ok, that's clear. Thank you. I don't think on-demand is worth it, particularly this summer. Making sure bid prices are high enough should do the trick.

On Mon, Jul 23, 2012, at 04:18 PM, Sam Ritchie wrote:

Dave's suggesting having a core of on-demand instances with more task instances as necessary for processing. It's a great idea if you don't mind the higher cost of those core nodes.

Data gets stored on core nodes, tasks run on core and task nodes.

On Mon, Jul 23, 2012 at 4:17 PM, Robin Kraft < reply@reply.github.com

wrote:

Nevermind @sritchie, I think I'm still not quite getting how task and core nodes work. I didn't mean on-demand instances, just thought it was cool that we could lose instances and not lose data.

I lost large clusters when I was trying to run them all day - temporary spikes were killing me. The trends analysis will take ages for the 50 tiles we have left to process, so losing everything 18 hours in will be quite costly when there are 50 high-memory instances running. There's the chance that it will never complete.

Anyway, I don't want to make things more complicated. There may be a better solution, like doing the trends analysis for smaller sets of countries so that we can checkpoint data more easily.


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7194572

Sam Ritchie, Twitter Inc 703.662.1337 @sritchie09

(Too brief? Here's why! http://emailcharter.org)


Reply to this email directly or view it on GitHub: https://github.com/reddmetrics/forma-deploy/pull/3#issuecomment-7194592

eightysteele commented 12 years ago

Whoa, totally late to the party on this, but @dpetrovics, nice pull request dude! Just talked to Dan about the idea of breaking this sucker into a FORMA specific deployer and then a more general one for open source release. Sweet! Super minor, but maybe we can get a develop branch going on this repo instead of on master. Otherwise LGTM. #shipit.

dpetrovics commented 12 years ago

Thanks @eightysteele! Glad I can help out. Good idea about the develop branch, make sense, I'll start committing to there. I'll try to knock out some of @robinkraft's issues and then get cranking on breaking the project up into the forma specific deployer and the more general one. Maybe lets stick with the curent configuration of core nodes using high spot prices for now? I'll try to get some more background on this so we can optimize our strategy later-- I think its a great start

robinkraft commented 12 years ago

Merging. Nice work Dave.