VladRodionov / bigbase

BigBase - read optimized, fully HBase-compatible, NoSQL Data Store
GNU Affero General Public License v3.0
9 stars 1 forks source link

Block cache: implement posix_fadvise for file read (SSD) (bypass OS page cache) #3

Open VladRodionov opened 10 years ago

VladRodionov commented 10 years ago

We do not need page cache for SSD at all. SOme other perf tips:

SSD optimization tips

VladRodionov commented 10 years ago

Some code can be found in Hadoop NativeIO. As since we are running under Hadoop anyway, its good to re-use existing library.

VladRodionov commented 10 years ago

For Linux DIRECT IO we can try the following:

fcntl(fd, F_SETFL, flags | O_DIRECT) -set O_DIRECT flag for already opened file http://linux.die.net/man/2/fcntl

VladRodionov commented 10 years ago

Another option: limit page cache size:

It can be done on SUSE: (see SUSE) It can be done in RH/Centos: echo '1' > /proc/sys/vm/pagecache (?)

Linux page cache is evil, especially when it grows unbounded.

VladRodionov commented 10 years ago

I did initial code check in. This 'bypass page cache' works on Mac OSX, but not on Linux yet.