Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark waku in Raspberry Pi #17

Closed
7 tasks
alrevuelta opened this issue Nov 21, 2023 · 21 comments
Closed
7 tasks

Benchmark waku in Raspberry Pi #17

alrevuelta opened this issue Nov 21, 2023 · 21 comments
Assignees
Labels
assigned This bounty has been assigned to a hacker. bounty This is a bounty

Comments

@alrevuelta
Copy link

alrevuelta commented Nov 21, 2023

Context

Run nwaku in a Raspberry Pi and benchmark it, taking RLN into account. Detects bottlenecks and limitations if any. Write a report with the findings identifying any problems that should be addressed and how viable it is to run in RPi and with which limitations. Provide clear instructions + guide on how it can be installed.


Waku Is Uncompromising Web3 Communication at Scale.
A family of robust, censorship-resistant communication protocols, designed to enable privacy-focused messaging for web3 apps.

Disclaimer: Waku is experimental, you may find blocking issues while tacking this bounty. We will prioritize their resolution to unblock you, which means you may have to pause development until done.
Thank you for your patience and understanding.

Your participation in this bounty is subject to your acceptance of our terms and conditions.
Please see waku-org/bounties#applying-for-a-bounty for details.

Rewards

1000 DAI

Timeframe to Completion

30 days

Application Evaluation

To ensure you are selected for this bounty, provide the following information:

  • Describe the approach you will take to tackle the bounty.
  • A timeline within which you expect to deliver the bounty.
  • Any previous relevant work you have done.

Bounty

Impact

Extend nwaku adoption by allowing people to run it on inexpensive hardware such as Raspberry Pi with minimum effort and clear instructions. Assesses its viability with benchmarks.

Deliverables

  • Compile and run nwaku in a RaspberryPi. Run nwaku binaries, not docker image. Publish binaries to be used by others.
  • Configure nwaku in RPi to join The Waku Network, inspire yourself from nwaku-compose for the command line arguments to use.
  • Written report with the following:
    • Instructions on how to run nwaku joining TheWakuNetwork on a RPi.
    • Identify problems and limitations
    • Benchmark nwaku in RPi, comparing it against existing results in a thick cloud server, checking metrics such waku_rln_proof_verification_duration_seconds (see this), waku_rln_proof_generation_duration_seconds, mem and CPU usage.
    • Identify bottlenecks with RLN, simulating a high amount of messages (eg 50 msg/sec) and monitoring cpu/mem usage.

Resources

Learn more about Waku at https://docs.waku.org/.
Join our Discord to get support at https://discord.waku.org/.
nwaku GitHub repo: https://github.com/waku-org/nwaku

@Ivansete-status
Copy link

Thanks for creating this @alrevuelta!

IMHO, one deliverable that should be part of this bounty is to have clear steps on how to perform cross-compilation.

I mean, building nwaku the whole night is good but not very handy in the long-term. That is actually what Daniel (Smart NeSt web3-IoT) did at EthGlobal-Istanbul.

It will give a lot of value once we have the cross-compilation made for both go-waku and nwaku.

Therefore, I would add the next two points to the bounty:

  • Have clear instructions on how to perform cross-compilation from go-waku.
  • Have clear instructions on how to perform cross-compilation from nim-waku.

( cc @vpavlin )

@alrevuelta

This comment was marked as resolved.

@fryorcraken fryorcraken added open Can be picked up by a hacker bounty This is a bounty labels Nov 29, 2023
@fryorcraken fryorcraken changed the title [BOUNTY] Benchmark waku in Raspberry Pi Benchmark waku in Raspberry Pi Nov 29, 2023
@cortze
Copy link

cortze commented Dec 3, 2023

Hey there, this is Mikel Cortes (@cortze). I've been following the work at Waku for a while, and I'd like to look at this particular bounty. I have a Rasberry Pi 4 with 4GB of memory that has been getting little use lately, so I'll be happy to compile and run Nwaku there. I can create a separate repo to share the compiled binaries and the guide on setting everything up at a fresh RasberryPi OS image.

I'd expect to have this ready over the Xmas break, presenting the report at the beginning of January (around the 8th).

I have research and monitoring experience in the field. I've performed a few measurement studies for IPFS's DHT and Ethereum's related topics; here I leave some relevant past works of mine that give some context:

Let me know if you would be interested and which would be the next move on the bounty.

@chair28980
Copy link

chair28980 commented Dec 5, 2023

@cortze Thank you for your interest! Please check https://github.com/waku-org/bounties#applying-for-a-bounty

If you are not already please join us in our discord community! https://discord.waku.org

@fryorcraken
Copy link
Contributor

@cortze sounds good. Please apply https://github.com/waku-org/bounties/#applying-for-a-bounty before we can select you.

@fryorcraken
Copy link
Contributor

**Bounty assigned to @cortze **

@cortze application approved, you can start the work.

@fryorcraken fryorcraken added assigned This bounty has been assigned to a hacker. and removed open Can be picked up by a hacker labels Dec 8, 2023
@fryorcraken
Copy link
Contributor

@cortze something I am thinking about is that there is no mention of store.
I think it may be interested to include running store node on Raspberry pi. However, SQLite is likely to be the preferred engine here. WDYT?

@cortze
Copy link

cortze commented Dec 15, 2023

I'm not sure what are you meaning with "store node", do you refer to the DB gathering all the data?

@fryorcraken
Copy link
Contributor

I'm not sure what are you meaning with "store node", do you refer to the DB gathering all the data?

Yes the "store" is the protocol that stores the data in a DB.

@vpavlin
Copy link
Member

vpavlin commented Jan 2, 2024

Btw, I just bought a Raspberry Pi (v4, 8GB RAM) as well, so if you have a build to test (and maybe collect more metrics for your analysis?) let me know:)

@cortze
Copy link

cortze commented Jan 2, 2024

I'm not sure what are you meaning with "store node", do you refer to the DB gathering all the data?

Yes the "store" is the protocol that stores the data in a DB.

I see, I thought of using Postgres as the nwaku-compose suggests, but no problem from my side on using SQLite

Btw, I just bought a Raspberry Pi (v4, 8GB RAM) as well, so if you have a build to test (and maybe collect more metrics for your analysis?) let me know:)

There seems not to be any problem compiling the wakunode2 on the Pi, it only takes ~30mins if I use the -j4 flag on the make nwakunode2 command

@chair28980 chair28980 assigned cortze and unassigned hackyguru Jan 8, 2024
@fryorcraken
Copy link
Contributor

Hi @cortze, how is it going?

@alrevuelta
Copy link
Author

We just synced and @cortze will be finishing the bounty by next week. The only thing left is to stress test RPi with few dozens of RLN msg per second and see how it responds. Gave him some hints on how to achieve this.

@cortze
Copy link

cortze commented Feb 12, 2024

@fryorcraken @alrevuelta I made this repository, including all the used files, binaries, figures, and the report's draft.

Let me know what you think about it :)

@alrevuelta
Copy link
Author

Great work thanks. Looks great, I would just use a more realistic message size (10kB) and we can close this. Great to see nwaku working well in rpi, with very reasonable proof verification/generation times and a reasonable CPU consumption processing 20/30 msg/sec, which is a significant rate. Hope with 10kB it doesn't change much.

@cortze
Copy link

cortze commented Feb 12, 2024

@alrevuelta I've recreated the same tests but with a larger message size, 16KB this time.
I've pushed the changes into the repo and updated the report.

All the points in the proposal should be covered, so let me know what you think about it.

@alrevuelta
Copy link
Author

@cortze Thanks for your work!

@fryorcraken I consider this bounty as completed, as it meets the deliverables stated in the description. Let me know if you have any concerns.

@cortze
Copy link

cortze commented Feb 27, 2024

Any news on the state of the bounty @fryorcraken ?

@fryorcraken
Copy link
Contributor

Any news on the state of the bounty @fryorcraken ?

Transfer in progress. You should see it in the next few days.

@cortze
Copy link

cortze commented Mar 4, 2024

Transfer received, @fryorcraken !

@alrevuelta
Copy link
Author

Finished, paid, and received. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned This bounty has been assigned to a hacker. bounty This is a bounty
Projects
None yet
Development

No branches or pull requests

7 participants