List:Maria Storage Engine« Previous MessageNext Message »
From:Sanja Byelkin Date:May 14 2008 7:36am
Subject:test of flush
View as plain text  
Hi!

I made test program to find which is better to write to file from one
thread or meny threads as it was discussed on IRC. Now I think that the
idea was not really correct:

1. If we sync the file then bottle neck is disk IO and there is no
difference in result for 1, 2 and 4 threads (I have 4 core comp so did
not test more)

2. if sync switched off then results vary from run to run about two
times (I remove the result file before rerun so I think it did not
infuence on result).

So I think something made wrong, if somebody  has knowladge in
IO please say about errors in the test.

The test is attached, and also attached diff to make buildimng it simple
if put the test file in storage/maria/unittest/


-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Oleksandr Byelkin <sanja@stripped>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Full-Time Developer
/_/  /_/\_, /___/\___\_\___/   Lugansk, Ukraine
       <___/   www.mysql.com

Attachment: [text/x-csrc] write_test.c
===== storage/maria/unittest/Makefile.am 1.29 vs edited ===== --- 1.29/storage/maria/unittest/Makefile.am 2008-05-07 07:58:10 +03:00 +++ edited/storage/maria/unittest/Makefile.am 2008-05-14 09:25:09 +03:00 @@ -49,7 +49,8 @@ ma_test_loghandler_max_lsn-t \ ma_test_loghandler_purge-t \ ma_test_loghandler_readonly-t\ - ma_test_loghandler_nologs-t + ma_test_loghandler_nologs-t\ + write_test1 write_test2 write_test4 ma_test_loghandler_t_SOURCES = ma_test_loghandler-t.c ma_maria_log_cleanup.c ma_loghandler_examples.c ma_test_loghandler_multigroup_t_SOURCES = ma_test_loghandler_multigroup-t.c ma_maria_log_cleanup.c ma_loghandler_examples.c sequence_storage.c sequence_storage.h @@ -98,6 +99,13 @@ ma_pagecache_rwconsist_1k_t_SOURCES = ma_pagecache_rwconsist.c ma_pagecache_rwconsist_1k_t_CPPFLAGS = -DTEST_PAGE_SIZE=1024 + +write_test1_SOURCES = write_test.c +write_test1_CPPFLAGS = -DTEST_THREAD=1 +write_test2_SOURCES = write_test.c +write_test2_CPPFLAGS = -DTEST_THREAD=2 +write_test4_SOURCES = write_test.c +write_test4_CPPFLAGS = -DTEST_THREAD=4 # the generic lock manager may not be used in the end and lockman1-t crashes, # so we don't build lockman-t and lockman1-t
Thread
test of flushSanja Byelkin14 May