Help understanding PUTs

I’m trying to figure out how to correctly think about my PUT allowance and my search-fu is failing.

So any reference or help on the topic of understanding PUT costs would be very helpful.
What I’ve deduced thus far is that registering a longName/Public ID costs 1 put.
Uploading a tiny file costs 0 or 1 put. Files in the kb->100kbs range somehow costs me 3 puts and a
17mb file ate up 17puts.

I’m not really getting much wiser based on this and I’m sure there’s documentation available somewhere.

Thanks :slight_smile:

1 Like

From then alpha release post:


Cool, that explains 17mb -> 17 PUTs.
And I can dig that a dns entry is a “chunk” somewhere on the network.

Any ideas on what other operations comes at a put cost?
Can it be computed before doing the operation somehow?
Any ideas on why the sub 1mb files consume multiple puts?

1 Like

That is correct.

I am not sure whether this limitation is absolute and/or can be looked up anywhere. It might just be a limit we do for the alpha, I am not sure. You could however “calculate” by the size.

That sounds weird to me (almost like a bug). I am not sure whether directory structures also require puts, but would that explain it? If not, please post the logs/example so we can examine it. It sounds suspicious.

Using the Demo App I uploaded this: http://localhost:8100/dns/www/drunkcod/Happy%20Ostrich.jpg (60kb)
to the following locations /private, /public/test-service, /public

They ate 3 PUTs each.

In my experience we usually use “chunk” to refer to a piece of immutable data, while a DNS entry is a StructuredData instance/object. Creating a new StructuredData instance also costs 1 PUT.

Don’t quote me on this, but I seem to recall to have seen in the SAFE Core code that if a file fits in a StructuredData instance (100KB max), then it won’t use immutable data chunks. Above 100KB it will always divide in at least 3 immutable data chunks.

Edit: Can’t find that in the code now, so I’m probably mixing some things up. Take it with a grain of salt.


I read on the Wiki that a file is always split into at least 3 chunks.

1 Like

There are many approximations and errors in this thread. About files (excluding the directoriy containing them), the true values are:

  • A file <= 3072 bytes costs nothing

  • A file > 3072 bytes and below 3 MB costs 3 puts

  • A file of size n MB where n > 3 costs n puts (n rounded to the cell value, for example if the size is 3 MB + 1 byte then the cost is 4 puts)

About directories: they cost 1 put each, if they haven’t too many files (meaning their payload doesn’t exceeds 100 KB).