diff options
author | unknown <guilhem@gbichot4.local> | 2007-11-11 19:01:53 +0100 |
---|---|---|
committer | unknown <guilhem@gbichot4.local> | 2007-11-11 19:01:53 +0100 |
commit | 5e2aaf69d81cca1270a861cccea40b2a44163a1d (patch) | |
tree | 7fbdb59b06ce7c9786b69cdb8e798b7d8cf56093 /storage/maria/ma_checkpoint.c | |
parent | 086b34c935760c0745375b672f218c335de9b138 (diff) | |
download | mariadb-git-5e2aaf69d81cca1270a861cccea40b2a44163a1d.tar.gz |
comments
Diffstat (limited to 'storage/maria/ma_checkpoint.c')
-rw-r--r-- | storage/maria/ma_checkpoint.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/storage/maria/ma_checkpoint.c b/storage/maria/ma_checkpoint.c index 5844b40b181..058e86d8106 100644 --- a/storage/maria/ma_checkpoint.c +++ b/storage/maria/ma_checkpoint.c @@ -501,11 +501,6 @@ filter_flush_data_file_evenly(enum pagecache_page_type type, @note MikaelR questioned why the same thread does two different jobs, the risk could be that while a checkpoint happens no LRD flushing happens. - - @note MikaelR noted that he observed that Linux's file cache may never - fsync to disk until this cache is full, at which point it decides to empty - the cache, making the machine very slow. A solution was to fsync after - writing 2 MB. */ pthread_handler_t ma_checkpoint_background(void *arg) @@ -622,6 +617,13 @@ pthread_handler_t ma_checkpoint_background(void *arg) if (filter_param.max_pages == 0) /* bunch all flushed, sleep */ break; /* and we will continue with the same file */ dfile++; /* otherwise all this file is flushed, move to next file */ + /* + MikaelR noted that he observed that Linux's file cache may never + fsync to disk until this cache is full, at which point it decides + to empty the cache, making the machine very slow. A solution was + to fsync after writing 2 MB. So we might want to fsync() here if + we wrote enough pages. + */ } filter_param.is_data_file= FALSE; while (kfile != kfiles_end) |