mludvig / aws-ethereum-miner

CloudFormation template for mining Ethereum crypto currency on AWS
270 stars 154 forks source link

Shall I press some magic button? #66

Closed mrfatguy closed 1 year ago

mrfatguy commented 1 year ago

Thank you for your fabulous guide. Though it seems pretty straightforward, I think that I have got stuck on some point.

Here is what I've done so far:

  1. I have followed your guide, clicking Launch to Default VPC next to us-east-2 Ohio.
  2. I have clicked through the AWS form, providing my own wallet's address and not changing anything else.
  3. CloudFormation says UPDATE_COMPLETE on my etcm stack, so I assume that I did everything as expected.

But, whenever I go to Outputs, as you advised, and click on DashboardUrl then I see No active worker found.

It's now 2,5 hour since my stack was created using your template, so I believe that some stats should already be visible.

Is creating a CloudFormation's stack, using your template, and bringing it to UPDATE_COMPLETE is really all that I have to do? There isn't any magic button that I must press to start the stack or bring some workers on-line?

mludvig commented 1 year ago

You can check a couple of things:

  1. Do your instances actually run? Go to the EC2 console and then Instances and see if there are any (with name "etcm" - same as the stack name). If none are running you'll have to figure out why - go to Autoscaling Groups way down on the left hand side bar in the EC2 console and in the "etcm" activities tab see why they fail to launch.

  2. If there are instances running but you don't see the anything in the ethermine dashboard you'll have to login to the instance and have a look. Select one of the instances in the EC2 console, and click Connect button up-right above the list of instances. Then choose the "Session Manager" tab and Connect and it should open a shell. From there you can do less -r /tmp/etcminer.log and see if it complains about anything.

  3. If the etcminer.log file is not there it's worth figuring out why. Do less -r /var/log/cloud-init-output.log and look for etcminer to see if there are any errors downloading or running it.

Let me know if you need any further help with that.

mrfatguy commented 1 year ago

Thanks for your ultra fast answer and willing to help. Sorry for bothering you, but only after your response I managed to figure out that I have hit the classic Max spot instance count exceeded wall.

Some question, so I could take it up from this point myself:

  1. Is there any way to determine, if there are any spot instances available in given region, prior to running your template? Or is it always: pick an template (region) → create an instance → see if it is running → revert back to first point (and pick another region), if it is not running.

  2. Am I correct that finding any region that has free spot instances and running your template there is all that I have to do? I.e. assuming that Ohio (in my case) wouldn't have 0 limit on spot instances, and assuming there would be other non standard errors, I should have my miner instance up and running without any additional actions (so the title of this issue is incorrect -- there is no magic button to be pressed and it should be all running out of the box with using your templates?)?

  3. Your guide is focusing on different instance types (for different regions), i.e. g5.xlarge, g4dn.xlarge, p4d.24xlarge, etc. Where or at which point I am selecting it? I went through the entire process described by you (from picking template / region to learning that instance is not running) and I don't recall any place or moment where I could select the particular instance type.

This is especially important, because when requesting instance increase through AWS form (not through console, as you suggest), I am asked, what type of instances limit I want to increase:

image

  1. You warn about an extensive costs that even a single instance running etcminer. Where can I control how much did my instance already accumulate so far / in given months etc.?

  2. Just to feed my curiosity: I have my MetaMask wallet set to ETC and your updated templates also effects in mining ETC. What would happen if my instance (based on your template) would be mining ETC, but my MetaMask wallet would be set to ETH (as by default) or any other non-ETC cryptocurrency?

  3. I am beginner to AWS at all and ETC instances are quite complex issue to me. Any chance to mine some crypto using Amazon Lightsail instances? Which are much less complex and easy to control. Or are these way to slow for crypto mining (mostly due to not have a GPU at all, if I am not mistaken)?

Thank you again for all your support and help. I will be of course sending some crypto to your wallet as an token of gratitude, but first I have to mine some, as I am (as you probably have already figured out) a total newbie into mining with AWS.

mludvig commented 1 year ago
  1. You can use the list-quotas.sh script from the tools/ folder. It will tell you which regions have GPU instance quotas available. The unit is vCPU.
  2. You have to request quota increase - either through the console or using the increase-quota.sh script. Try a lower request in one or two regions first, e.g. 32 vCPUs. The AWS support may come back with some questions and request a justification.
  3. You select it in the stack parameters. By default it's set to '' which means any GPU instance type. You can change that to e.g. 'g5.' or 'g5g.large' or a list of instances like 'g4.,g5.'.
  4. You can't really control it in the stack but you can check the actual spend in Cost Explorer and in the Billing interface in general.
  5. Metamask can use the same address for both ETH and ETC so no issues there. You don't have to have it running or set to one or the other while mining. Only when you want to spend or move the coins later you'll have to run it and select the right network.
  6. Nope you can't mine on Lightsail, they have no GPU. This project makes mining really easy, all you need to do is convince the AWS Support to increase your GPU quotas (that's the hardest part). From there on it should just work.

Good luck :)

mrfatguy commented 1 year ago

Thank you once again for all your support and answers.

The instances are working, with current computing power of 270.7 MH/s and average one nearing 300 MH/s, but my wallet is completely empty (as MetaMask says):

image

So, the first question is (getting back to this issue title) where is the magic red button that I must press (or what must I do in general) to turn costs incurred by my AWS workers into actual cryptocurrency in my wallet?

The second question is, what I did wrong?

Your articles said that mining crypto in AWS is less or more profitable, depending on current exchange rate it could be under or above profitability level, but what I can see from my stats after just 24 hours it seems that mining ETC at AWS is totally not profitable at all.

Ethermine.org estimates that my daily earnings will less than a buck:

image

While AWS claims that to dig this out my daily costs are around 70 USD (52.57 USD after 18 hours of instances run):

image

So we have a "profitability factor" of 1558% costs vs. earnings.

mludvig commented 1 year ago

Hi, good to hear that you made it work. Yeah it's been some time since AWS mining was profitable. It still works out all right for people who have free AWS accounts or plenty of free credits (note that mining is against the credits T&C's though). For everyone else it's a losing game unfortunately.

mrfatguy commented 1 year ago

Do you know what can be the reason for getting hashrate drop from initial 270 MH/s current (300 MH/s average) yesterday to just 36.7 MH/s current (99.9 MH/s average)? This looks like nearly 10x loss without any particular reason.