db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suresh Thalamati <tsur...@Source-Zone.org>
Subject alligned Vs Non Alligned log writes ..
Date Sat, 04 Dec 2004 00:36:24 GMT
Hi all,

I  am  trying to find out whether there would be any performance
improvement  for insert/delete/updates operations by modifying the
logging system to do writes aligned on sector boundaries (512 bytes).
This could possibly done by grouping log records to 4k/8k pages. The way
current system does log writes to the log files is :

1.     Write file header of 24 bytes
2.     Write log buffers of size 32k when full or whenever a log flush 
is required  because  of commit or data page flush,
         in which case the amount data  written  could be less than 32k.
3.     Write a Zero at the end of log file on a log switch.

Because of the initial  24 bytes written to the file   even if the log
buffers are written to disk only when they are full ,  writes would
never be aligned on sector boundaries. Wrote a simple java program that
simulates the way the derby logging system does writes to measure
performance difference between aligned versus non-aligned writes..  What
I  found is On Windows 2000  there is a  substantial gain only when
buffer size is 64K (30.8984375  milli sec for a aligned writes VS  
48.8984375 for a non-aligned write. Not sure why there is no substantial
improvement in case of other buffer sizes.

Plat form :
WINDOWS 2000 ,  MEMORY 756 MB  ,  CPU  1200 MHz
DISK : 4200 rpm.  (Write Cache Disabled)

$ java allignWritePerfTest xyz.dat 128
(Buffer-Size(K) | Alligned Write(msec) |NonAlligned Write(msec))

512 |  243.7890625  |  259.828125
256 |  110.234375  |  131.28125
128 |  52.890625  |  66.03125
64 |  30.8984375  |  48.8984375
32 |  19.3984375  |  21.359375
16 |  18.078125  |  26.3671875
12 |  17.0546875  |  19.8671875
10 |  17.2109375  |  19.09375
8 |  15.1015625  |  27.2265625
6 |  16.0390625  |  16.6640625
4 |  16.3515625  |  16.6640625
2 |  14.7890625  |  23.9453125
1 |  18.7734375  |  15.8828125


It would be great if  some one can run this test on other platforms and
post the results to the list.

Any Comments / Suggestions ?

Thanks
-suresh.




Mime
View raw message