
On Thu, Dec 10, 2009 at 11:02 PM, Stefan Strasser <strasser@uni-bremen.de> wrote:
but, including all the SQL parsing, running 10000 small transactions takes about 4 seconds on my system. while this little code snippet alone takes 6-7 seconds, with much more disk usage:
int fd=open("test.bin",O_RDWR | O_CREAT | O_NOATIME); for(int c=0;c<10000;++c){ write(fd,&data,1); fsync(fd); }
neither fdatasync(), O_WRONLY, nor writing whole sectors instead of just a byte make a difference. MySQL also claims to use fsync on the page you linked.
do you have an explanation for this?
Check this blog post and part II, where innodb developer explains some of the "unknown" details: http://www.mysqlperformanceblog.com/2007/10/26/heikki-tuuri-innodb-answers-p...