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.
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?
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.
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.