Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Informix-Dynamix-Server does writes in "cooked files" (normal Files, not Raw-Devices) like the test-program attached here.
It simulates writes with the Informix AIO-VPs - they are done with O_SYNC, so there will never be more than 2kB loss in case of a crash.
I dont know why my Sybase-SQL-Anywhere has no performance problem -Informix has.
Compile:
gcc tproc.c -o tprog
Create the testfile:
cd /path/to/drbd/mounted/file/system; touch testfile
Test performance:
time /.../tprog
Look at your IO:
vmstat
I have around 150 Blocks/sec
Any ideas how to tune this?
Thomas
/*--------------- Anfang tprog.c -------------------*/
#include <stdio.h>
#include <fcntl.h>
main()
{
int fd;
char buffer_vc[64*1024];
int i;
char *ptr_pc = buffer_vc;
if ( ( fd = open( "./testfile", O_WRONLY | O_SYNC ) ) == -1 )
{
perror( "Datei ./testfile muss erst angelegt werden" );
exit( 1 );
}
for ( i = 0; i < 10000; i++ )
{
if ( write( fd, ptr_pc, 2048 ) < 0 )
{
perror( "Fehler beim Schreiben\n");
exit( 1 );
}
}
close( fd );
}
/*--------------- Ende tprog.c ---------------*/