# Amount of children

**URL:** <https://discuss.ipfs.tech/t/amount-of-children/15022>\
**Category:** Uncategorized\
**Created:** [August 21, 2022, 6:41pm UTC](https://discuss.ipfs.tech/t/amount-of-children/15022 "2022-08-21T18:41:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ABengrine](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@ABengrine](https://discuss.ipfs.tech/u/ABengrine)\
**Post date:** [August 21, 2022, 6:41pm UTC](https://discuss.ipfs.tech/t/amount-of-children/15022/1 "2022-08-21T18:41:13Z")

</div>

Hi,

Learning more about Merkle DAG I was wondering how was the amount of children choosen ?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/2X/5/5fbffd31d3b4f5b1b5bd2d2ee6d3a480d6417b8e.png)  
Watching image exemple, 2 children is usually shown. However when i try to check my own file in [https://dag.ipfs.io/](https://dag.ipfs.io/) it can changes.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/2X/7/785916de1eda51fc49b8205c9717f9f28706d528.png)

Is it random ? Is it choosen by default by IPFS ? Can we manually choose it ?

Thank you for your time

---

<div class="post-metadata">

**Author:** ![SionoiS](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/sionois/32/5103_2.png) [@SionoiS](https://discuss.ipfs.tech/u/SionoiS)\
**Post date:** [August 22, 2022, 11:10am UTC](https://discuss.ipfs.tech/t/amount-of-children/15022/2 "2022-08-22T11:10:16Z")

</div>

Assuming your talking about files. The number of child blocks will be the total size divided by block size. As for folders, it’s the number of files in them.

Very large files or folder works differently.

---

<div class="post-metadata">

**Author:** ![ABengrine](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@ABengrine](https://discuss.ipfs.tech/u/ABengrine)\
**Post date:** [August 22, 2022, 4:14pm UTC](https://discuss.ipfs.tech/t/amount-of-children/15022/3 "2022-08-22T16:14:02Z")

</div>

Hi, thanks for your response.

You mean that there are never parent node except the root node for files ? There is only a root node directly connected to the rest of the blocks ?

It is different for folder but it’s easily understandable (1 intermediate parent node by file). But for very large files you said it is different, have you any docs on how are intermediate parent node choosen ?

Thanks again 😃 @SionoiS

---

<div class="post-metadata">

**Author:** ![SionoiS](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/sionois/32/5103_2.png) [@SionoiS](https://discuss.ipfs.tech/u/SionoiS)\
**Post date:** [August 23, 2022, 11:04am UTC](https://discuss.ipfs.tech/t/amount-of-children/15022/4 "2022-08-23T11:04:01Z")

</div>

The problem you run into is that one block may be too small to fit all links to all the blocks (same with folder), in this case, you have to use some more advanced data structure.

Maybe someone from IPFS can explain what is being worked on right now to fix this problem.

[This](https://ipld.io/specs/advanced-data-layouts/hamt/spec/) can also help you understand.
