5

I've just set up Swarm. It's amazing.

My domain names now serve swarm pages.

http://eth.ie/bzz:/75de632463a8ea86ce859945e74a502f4cea67e8cdf4c8ced5712621c38a7578/

http://ethereum.ie/bzz:/45238c8c4330b1d64068b0c795e653a3d99a5219b3b0e0437bafc3ef58b74668/

The purpose of my server is to be a gateway that serves pages and do nothing else.

So how can I prevent my server from eating up disk space? (i.e. run Swarm in a mode that it doesn't write anything)

1 Answer 1

4

So how can I prevent my server from eating up disk space?

There is a JSON configuration file in your bzz directory. You can set the two relevant storage capacity options to a custom value.

You find this in the relevant section of the swarm guide

Note: Zero memory cache size (CacheCapacity) is not going to work. Set that to at least a decent value of a few hundred.

(i.e. run Swarm in a mode that it doesn't write anything)

It's not a good idea to not write anything. You can set DbCapacity to an acceptable value c (then the disk space used by Swarm is estimated at roughly c * 4Kb with some added O(logn) overhead). Using c = 5000 will take up roughly 25Mb on disk.

1
  • Dude, that's really really helpful. Thanks. In the time it took to check back here, I hacked it by creating a pseudo-partition. sudo mkdir /bzz #mount point for the img sudo chown eamorr:eamorr /bzz sudo dd if=/dev/zero of=/bzz.img bs=1 count=0 seek=1G ls -altr /bzz.img sudo mkfs /bzz.img sudo mount -o loop /bzz.img /bzz #Add to fstab: /bzz.img /bzz ext4 loop 0 0
    – Eamorr
    Jan 29, 2017 at 23:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.