Normally you would just launch a server, set it up however you want, and you are ready to go. The next step was creating an AMI (Amazon Machine Image), which is like a template for all servers that I want to launch. I am not sure what I expected, but I was honestly surprised when this worked. Running Stockfish remotely #Īt this point I have a server that I can connect to and run stockfish remotely: ssh -i stockfish-keypair.pem stockfish I tried a few and the performance seemed about the same. The AWS c5a instance has an AMD Epyc chip so you could try things like x86-64-ssse3 or x86-64-avx2. Geeky Note: There are other ARCH settings you could try. Sudo ln -s /home/ubuntu/Stockfish/src/stockfish /usr/bin/stockfish I’ll just use a fake address of 11.222.33.444 for everything here. To find the IP address, look in the EC2 console and find the public IP address under the instance details. Once everything was launched, I needed to connect to the running server. I have mine under ~/.ssh/ but as long as it is secure and you know where it is you should be good. Be sure to save this on your computer someplace safe. Generate a keypair: I called it stockfish-keypair.pem.Make sure to enable SSH access when setting up the security group.I only used the minimum of 8 GB of EBS storage (like a virtual hard drive).You can use the defaults for almost all the options, but be sure to click through each page so you do not miss anything.Just a couple of things to keep in mind as you are setting up the instance: You could try to do this with the standard AWS’s preferred “AWS Linux 2” instance type, which I think is based on CentOS, and it would work just as well but would need slightly different commands. I used the Ubuntu image because that is what I know. If you are using this, when you go to build stockfish be sure to run make -j clean build ARCH=armv8 Update Jan 2023 The latest generation of this server type are c7g which are ARM-based processors. Each “class” then has many levels like large, xlarge, or 4xlarge. They have many different “classes” of servers depending on the type of work you need the server to do. I am going to use Amazon’s c5a server class which is aimed at computing-intensive work. My goal is not performance yet, it is just setting up a template I can use for future deployments. I started in AWS with a EC2 image on a small instance type. But be warned, the billing can be delayed by a day. I’m not responsible if you rack up a huge AWS bill! You should be OK if you make sure you keep an eye on your spending each day. You may want to look into setting up spending alerts within AWS. That has happened to me with AWS in the past for a different project. The biggest risk here is that you will get charged more money than you expect. The interface is powerful, but confusing, and the pricing is pretty complicated. If you haven’t used AWS before, this might not be for you. I chose AWS because I had used it in the past. If you want something even more powerful, you can check out my experiment with a cloud cluster supercomputer that I got up to 700 MN/s without much work. Also, I do not have a chess server that is always on that is idle 95% of the day just waiting for me. This will give me a high performing system that I will only pay for when I use it. My thought was that instead of using my raspberry pi cluster or building my own chess computer, I will just start up a cloud server when I actually need it, and then shut it down when I am done. I recently experimented with running a stockfish engine in the cloud using Amazon AWS. I actually only use the engine for part of my analysis process, but that is a different topic. I use stockfish when I am analyzing my chess games AFTER I played them (I’m not a cheater!). I may use this approach instead of having a dedicated chess engine server at my house. More realistically, I could spend about $10/month for a server more powerful than I have, getting over 30 MN/s. On the largest and most expensive server, I saw performance of over 100 Million Nodes Per Second (MN/s) at a cost of $40/month with the limited use I have. I used Amazon Web Services (AWS) to run a server in the cloud to run the stockfish chess engine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |