jepsen-io / mongodb

MongoDB Jepsen tests
Eclipse Public License 2.0
24 stars 19 forks source link

Whether it can be tested in docker-compose #16

Open Tsunaou opened 4 years ago

Tsunaou commented 4 years ago

I tried to test MongoDB by Jepsen in docker-compose which introduced in tutorial I can run etcdemo successfully. But I failed in this case

OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000004c0000000, 12884901888, 0) failed; error='Cannot allocate memory' (errno=12) There is insufficient memory for the Java Runtime Environment to continue. Native memory allocation (mmap) failed to map 12884901888 bytes for committing reserved memory.

It confused me whether it's my machine's problem or maybe I should buy Jepsen cluster from the AWS Marketplace?

rhishikeshj commented 3 years ago

I have had a similar experience with getting this MongoDB jepsen suite running locally with docker. Information about the code that I am using

Jepsen : commit a2bcad59f0df5bd39cea1e61d9b64376c479df9c (HEAD -> main) MongoDB : commit 83548bb8e054170ecc4b8fda70390e40fcca5e30 (origin/master, origin/HEAD)

Initially I had an issue of not enough nodes (by default Jepsen starts 5 nodes in docker) as evident by this function jepsen.mongodb.db/shard-node-plan I fixed that by adding 2 more nodes. Then I hit another roadblock, while installing mongoDB on each node, it error'd out saying that a required dependency can't be found, specifically libcurl3 So apparently, libcurl4 and libcurl3 don't work well together and inspite of efforts I wasn't able to get libcurl3 and mongo running. So I changed the way Jepsen was installing MongoDB and followed the official documentation that installs Mongo 4.2 on Ubuntu. That worked. But now I am still unable to run the tests as every time there seems to be some SSH related exception saying the control node cant reach the DB nodes. @aphyr Jepsen as a tool is amazing. Thank you for all your work ! It would be wonderful if there was some guide on getting the kind of tests running locally as mentioned in the blog.

aphyr commented 3 years ago

Native memory allocation (mmap) failed to map 12884901888 bytes for committing reserved memory.

Sounds like your machine doesn't have enough memory to run that particular test? That might be because the test you're running hardcodes a higher memory limit--take a look at project.clj's jvm-opts key; you might be able to turn down -Xmx to a smaller value.

aphyr commented 3 years ago

I have had a similar experience

Sorry, are you also running into out-of-memory issues? It sounds like you might be trying to run a test written specifically for Debian on top of Ubuntu nodes. The docker tool should set up Debian nodes by default--did it not do that for you?

rhishikeshj commented 3 years ago

@aphyr I mis-wrote :) I meant I am also facing issues setting this up locally using docker.

I am running Debian nodes as the docker tool is setting them up by default. I only changed the installation instructions for MongoDB since the default instructions in setup! were error'ing out due to a libcurl3 dependency. Instructions that I have coded into setup! instead : https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

aphyr commented 3 years ago

Do you want to open a different issue, so we don't confuse @Tsunaou?

aphyr commented 3 years ago

(it'd also be helpful to have, like... some kind of source code, the console output, the stacktrace you're getting, etc etc)

rhishikeshj commented 3 years ago

Do you want to open a different issue, so we don't confuse @Tsunaou?

Will do