Need advice

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Apr 19 19:48:19 CDT 2006


On 4/19/06 7:11 PM, "Brendan Murphy" <bmurf at comcast.net> wrote:

> ere are the measurements for version 2.3 for the different
> segment sizes. The exact same input data was entered for each
> database for the corresponding record sizes.
> 
> 4K segment size:
> 10: 0.668 MB
> 100: 0.708 MB
> 1000: 1.1 MB
> 10000: 5.8 MB
> 100000: 52.7 MB
> 
> 8K segment size:
> 10: 1 MB
> 100: 1 MB
> 1000: 1.4 MB
> 10000: 6.1 MB
> 100000: 52.9 MB
> 
> 16K segment size:
> 10: 1.6 MB
> 100: 1.6 MB
> 1000: 2.1 MB
> 10000: 6.7 MB
> 100000: 53.5 MB
> 
> 32K segment size:
> 10: 3.2 MB
> 100: 3.2 MB
> 1000: 3.6 MB
> 10000: 8.3 MB
> 100000: 55 MB
> 
> There is not a linear growth pattern across the segment sizes.
> Understanding why it behaves this way can help me avoid any
> pitfalls (if they exist). Since what you have stated for
> the behavior for version 2.3 is slightly different from the actual
> measurements, there is something going on which you are not aware.
> Perhaps there is some kind of optimization you can make in a
> future release.
> 
> For me 4K segment size visibly slows performance down. 16K segment
> size imposes a 50% file size increase for typical file sizes (at
> the extreme record size there is no difference).

I try explain on SIMPLE exmaple

Image you have 2 internal files in database.

One for ULONG (4 bytes) numbers, second for DOUBLE (8 bytes)

* You have set segment 8Kb. Okay.

* you create EMPTY db.
    both files allocate one segment.
    so you get 8 + 8 = 16Kb for empty db

* you start add records.

    easy calculate that first segment of first file
    can get 8 * 1024 / 4 = 2048 records.

    second file can get 8 * 1024 = 8 = 1024 records.


* so while you have 0-1024 records you still have one segment
    in each file. You see?

* as only you add 1025 records, the second file must allocate one more
segment. What you have now with 1025 records?

    1 files - 1 segment, which us 50% full
    2 file, - 1 full segment and 1 segment with 4 bytes only
                    so also 50% of fullness.

* around 2048 records, both files will get full segments, then again will be
new allocations and so EMPTY space will present.

* the more size of database, the smaller affect of EMPTY space. Right?
        8Kb of empty / 16Kb total = 50%

        8Kb of empty / 16000Kb total = 0.005%
        


This example show that each file can grow in different way then other files
depending on data it contains.


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list