Hello,
I have a file containing a regular tree. The tree has 4 leaves and the number of total entries is around 1.3x10^7. The file size is ~8 MB. Now, I created another tree in a new file. The new tree has 8 leaves that are created in the same way as in the former tree. The number of total entries for the new file is same as the former tree. But, the new file size is significantly increased to 278 MB! Simply speaking, the file with 4 leaves is only 8 MB, and the file with 8 leaves is 278 MB, which totally does not make sense to me.
The code is attached. The small root file was created in the similar way.
Cheers,
Zhiyi.
convert_carv_to_polar.C (1.45 KB)
brun
January 21, 2010, 1:43pm
2
Could you send the result of
mytree.Print();
for each case
Rene
For the small file with a tree with 4 leaves:
root [4] tree_mnt->Print()
*Tree :tree_mnt : *
*Entries : 13071783 : Total = 419511033 bytes File Size = 8287554 *
*Br 0 : x/D *
*Entries : 13071783 : Total Size= 104876034 bytes File Size = 1388167 *
*Baskets : 3277 : Basket Size= 32000 bytes Compression= 75.50 *
…
*Br 1 :y : y/D *
*Entries : 13071783 : Total Size= 104876034 bytes File Size = 4777190 *
*Baskets : 3277 : Basket Size= 32000 bytes Compression= 21.94 *
…
*Br 2 :z : z/D *
*Entries : 13071783 : Total Size= 104876034 bytes File Size = 946043 *
*Baskets : 3277 : Basket Size= 32000 bytes Compression= 110.79 *
…
*Br 3 :rho : rho/D *
*Entries : 13071783 : Total Size= 104882596 bytes File Size = 1078691 *
*Baskets : 3277 : Basket Size= 32000 bytes Compression= 97.17 *
…
For the large-size file:
root [2] tree->Print()
*Tree :tree : *
*Entries : 13071783 : Total = 836845703 bytes File Size = 290543169 *
*Br 0 : x/D *
*Entries : 13071783 : Total Size= 104605174 bytes File Size = 1018268 *
*Baskets : 348 : Basket Size= 10933760 bytes Compression= 102.72 *
…
*Br 1 :y : y/D *
*Entries : 13071783 : Total Size= 104605174 bytes File Size = 3088948 *
*Baskets : 348 : Basket Size= 10933760 bytes Compression= 33.86 *
…
*Br 2 :z : z/D *
*Entries : 13071783 : Total Size= 104605174 bytes File Size = 612139 *
*Baskets : 348 : Basket Size= 10933760 bytes Compression= 170.87 *
…
*Br 3 :rho : rho/D *
*Entries : 13071783 : Total Size= 104605878 bytes File Size = 718108 *
*Baskets : 348 : Basket Size= 10934272 bytes Compression= 145.66 *
…
*Br 4 :drho : drho/D *
*Entries : 13071783 : Total Size= 104606230 bytes File Size = 727247 *
*Baskets : 348 : Basket Size= 10934784 bytes Compression= 143.83 *
…
*Br 5 :theta : theta/D *
*Entries : 13071783 : Total Size= 104606674 bytes File Size = 92163563 *
*Baskets : 349 : Basket Size= 10934784 bytes Compression= 1.13 *
…
*Br 6 :phi : phi/D *
*Entries : 13071783 : Total Size= 104605878 bytes File Size = 96281554 *
*Baskets : 348 : Basket Size= 10934272 bytes Compression= 1.09 *
…
*Br 7 :r : r/D *
*Entries : 13071783 : Total Size= 104605174 bytes File Size = 95912708 *
*Baskets : 348 : Basket Size= 10933760 bytes Compression= 1.09 *
…
It seems that 3 leaves: theta, phi and r cannot be compressed too much unlike other leaves.
brun
January 21, 2010, 5:45pm
4
OK this was my suspicion. Simply look at the branch compression factors to understand your problem.
Rene
Then why is this happened and how to solve it?
brun
January 21, 2010, 6:17pm
6
When you see compression factors like 143 for drho, it means that you store always the same value in the branch.
Rene
Oh, I see.
You are right. My data: x, y, z, rho and drho are indeed compressible (since many of them are same). For theta and phi derived from x, y and z, there is no too much room to compress. This phenomenon that I observed is due to my data sample, nothing with ROOT.