ipfs / infra

Tools and systems for the IPFS community
MIT License
133 stars 41 forks source link

VMs for benchmark work #452

Closed Elexy closed 5 years ago

Elexy commented 6 years ago

I've been enlisted to automate benchmarking for js-ipfs and I'd like to get my hands on a VM with reliable cpu/mem to test benchmarking strategies.

Elexy commented 6 years ago

Actually now that we have a better Idea of what it is we're building, I need 3 VMs.

  1. VM with performance guarantees (as best as possible) to run all benchmarks
  2. VM with performance guarantees (as best as possible) to run any tests inside Clinic
  3. VM of container platform with persistent storage to run the runner for both of the above and Influxdb/grafana

ping @eefahy @kyledrake

mcollina commented 6 years ago

cc @daviddias

eefahy commented 6 years ago

Can we get into more specifics please?

Elexy commented 6 years ago

Hi @eefahy

daviddias commented 6 years ago

the benchmark VMs only needs a couple of Gb's storage, the OS disk is probably big enough. Doesn't have to be backed up either.

Do count for tests that move 100GB to 1TB of data, if possible.

Elexy commented 6 years ago

@daviddias I get your point. We can add huge disks (If cost is not an obstacle) let's add them. If we want to move 1TB would we need that space for each node + the original data? We do need to spec out those tests and what it is exactly that we're benchmarking there. i.e. Disk speed vs js-IPFS speed.

daviddias commented 6 years ago

You need space for the 1TB of data, 1TB for each node and much more space for the overhead of creating the Graph Data Structure. Thinking more about this, perhaps starting with a benchmark for 10GB and 100GB might be wiser. 1TB might take too much time nowadays to make it practical and useful

eefahy commented 6 years ago

@Elexy Thanks so much for the info. I see we have a meeting scheduled for tomorrow but wanted to give some options per your requirements:

Bare metal servers are an option. We use Packet.net for those needs. It would seem that this machine is a good fit. Would that work?

Unfortunately, we do not currently have a suitable k8s or ECS cluster for this so it will be a VM/Packet machine, depending on the sizing needs. What are the sizing needs for that machine?

We will need to sort out https for serving those endpoints, which I will look into. Making an S3 bucket for backups sounds good.

Elexy commented 6 years ago

Hi @eefahy,

Thanks for that.

Bare metal for the 2 test machines would be awesome. The specs fo that machine look fine to me, if ipfs is supposed to run on commonly available consumer hardware (@daviddias ?). Can we get Debian or Ubuntu on that?

A VM to run the runner/db/dashboard in containers should be spec'd like this:

>= 4 CPUs
>= 16GB RAM
1TB ssd

As for the endpoint; the *ipfs CI should be able to hit an endpoint with a POST request. So it can(should) be fairly locked down.

eefahy commented 6 years ago

Per our conversation:

Once CI platform is decided on, we will need to mint a cert for the VM to field a webhook from CI to kick off tests.

eefahy commented 6 years ago

@Elexy Do you have a preference on the IOPS or throughput for the 1TB SSD? Can we get away with provisioning a gp2 EBS volume for this or do you need the io1 flavor?

eefahy commented 6 years ago

These machines have been made. I went with a gp2 SSD Volume. Let me know if that needs an upgrade. Once I get a nearform public key, I'll add that to the VM

Elexy commented 6 years ago

Thanks. here is the pub key:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRZsdV936RrBC3ZK3wmmP4dgj8cNSD6WdChMs2Ic+A+h5HALTSkK0Z7ri1pPbbSf6OzD5NwGByhXIwT34RPZjWRs008cv8z4x4bYV+wBlUQRaVAYQDxag+5522cg35nHqgONHmyuutBjU4lxRlq4qyACbI5sI7CDg0J9fMEyAK8hj8ADWM3dZFe+kA9bUh3LLyCUfhiSnGX7xmtQRqXHzU+c0ZPFARSbRakMUcGBRb7P5CnQkIwZqyGIpAbV4/wjDA6jn+whPyOx3lHxpxyzHtjoGra6j+j3KHcC2i1+PaGYK8hGRckcVNr6jsH86HzFkwmP+KMJQ2nkHSVMoJdYAt elexy@Alexs-MacBook-Pro.local
eefahy commented 6 years ago

Alright this is done.

ubuntu@63.33.104.238 VM ubuntu@147.75.33.155 Bare Metal machine

Ping me when we know what CI looks like and I can sort out the webhook to VM stuff

Elexy commented 6 years ago

@eefahy I am assuming this dashboard should be made available on a domain as well. Can you take care of that?

Also I need ports 80 and 443 opened in the vNet to be able to expose the service and get the let's encrypt handshake to work.

UFW config on the VM:

ubuntu@ip-172-31-44-15:~$ sudo ufw status verbose
Status: active
Logging: on (low)
Default: reject (incoming), allow (outgoing), deny (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
22/tcp                     LIMIT IN    Anywhere                   # Limit ssh access
80/tcp                     ALLOW IN    Anywhere                   # Allow http access
443/tcp                    ALLOW IN    Anywhere                   # Allow https access
22/tcp (v6)                LIMIT IN    Anywhere (v6)              # Limit ssh access
80/tcp (v6)                ALLOW IN    Anywhere (v6)              # Allow http access
443/tcp (v6)               ALLOW IN    Anywhere (v6)              # Allow https access

/cc @daviddias

Elexy commented 6 years ago

@eefahy I'd like to CI/CD this project as well. Can you add it too CircleCI or Gitlab ci?

daviddias commented 6 years ago

@Elexy I've enabled the Circle.

eefahy commented 6 years ago

Port 80 and 443 are now open on the VM - not sure what domain to use for this. Thoughts @daviddias or @alanshaw ?

alanshaw commented 6 years ago

We decided to put it on cloud.ipfs.team yesterday for the time being, so something like benchmarks.cloud.ipfs.team?

eefahy commented 6 years ago

OK - turns out that *.cloud.ipfs.team is tied up so I made benchmarks.ipfs.team resolve to the EIP on the VM. Let me know if that needs to change.

@Elexy I'm seeing a LetEncrypt script on the VM so I assume that you can take care of the cert for that new domain?

Elexy commented 6 years ago

@eefahy re - cert: yes, I will. Thanks for the domain!

Elexy commented 5 years ago

@eefahy I previously deleted my comment about needing sudo but I now have hit that wall again with no way around it. The benchmark Bare Metal machine needs git installed and possibly some more things. We need to git clone js-ipfs there and checkout a specific commit to run the benchmarks against.

Could the ubuntu user have sudo rights, like on the VM?

This is a blocker for me now. /cc @alanshaw @mcollina

eefahy commented 5 years ago

The ubuntu user already had sudo privs but I updated it to not require a password. If we know what sort of stuff needs to be installed on the bare metal machine, I'm happy to add that to its user_data script instead which feels a little more secure. Thoughts?

Elexy commented 5 years ago

@eefahy Thanks for the quick reply. Let's add it to user_data once it's stabilized. We're still discovering stuff here.

eefahy commented 5 years ago

@Elexy Cool, sounds good. I'm closing this issue now. If other things come up or you're ready for user_data stuff then open a new issue please. Thanks!