1. 14 4月, 2017 1 次提交
  2. 12 4月, 2017 1 次提交
  3. 07 4月, 2017 1 次提交
    • A
      only FALLOC_FL_PUNCH_HOLE when ftruncate is buggy · 9e729390
      Aaron Gao 提交于
      Summary:
      In RocksDB, we sometimes preallocate the estimated space for a file to have better perf with fallocate (if supported). Usually it is a little bit bigger than the real resulting file size. At this time, we have to let the Filesystem reclaim the space not used.
      
      Ideally, calling ftruncate to truncate the file to its real size should be enough. HOWEVER, it isn't on tmpfs, which we witness in our case, with some buggy kernel version. ftruncate a file with preallocated space doesn't change number of the blocks used by the file, which means the space not used by the file is not returned to the filesystems. So in this case we need fallocate with FALLOC_FL_PUNCH_HOLE to explicitly reclaim the used blocks. It is a hack to cope with the kernel bug and usually we should not need it.
      Closes https://github.com/facebook/rocksdb/pull/2102
      
      Differential Revision: D4848934
      
      Pulled By: lightmark
      
      fbshipit-source-id: f1b40b5
      9e729390
  4. 06 4月, 2017 2 次提交
  5. 29 3月, 2017 1 次提交
  6. 24 2月, 2017 1 次提交
  7. 23 2月, 2017 1 次提交
  8. 03 2月, 2017 1 次提交
  9. 02 2月, 2017 1 次提交
  10. 19 1月, 2017 1 次提交
  11. 14 1月, 2017 1 次提交
  12. 13 1月, 2017 1 次提交
  13. 12 1月, 2017 2 次提交
    • A
      direct reads refactor · dc2584ee
      Aaron Gao 提交于
      Summary:
      direct IO reads refactoring
      remove unnecessary classes and unified interfaces
      tested with db_bench
      
      need more change for options and ON/OFF for different files.
      Since disabled is default, it should be fine now
      Closes https://github.com/facebook/rocksdb/pull/1636
      
      Differential Revision: D4307189
      
      Pulled By: lightmark
      
      fbshipit-source-id: 6991e22
      dc2584ee
    • A
      Guarding extra fallocate call with TRAVIS because its not working pro… · 62384ebe
      Anirban Rahut 提交于
      Summary:
      …perly on travis
      
       There is some old code in PosixWritableFile::Close(), which
      truncates the file to the measured size and then does an extra fallocate
      with KEEP_SIZE. This is commented as a failsafe because in some
      cases ftruncate doesn't do the right job (I don't know of an instance of
      this btw). However doing an fallocate with KEEP_SIZE should not increase
      the file size. However on Travis Worker which is Docker (likely AUFS )
      its not working. There are comments on web that show that the AUFS
      author had initially not implemented fallocate, and then did it later.
      So not sure what is the quality of the implementation.
      Closes https://github.com/facebook/rocksdb/pull/1765
      
      Differential Revision: D4401340
      
      Pulled By: anirbanr-fb
      
      fbshipit-source-id: e2d8100
      62384ebe
  14. 23 12月, 2016 1 次提交
    • A
      direct io write support · 972f96b3
      Aaron Gao 提交于
      Summary:
      rocksdb direct io support
      
      ```
      [gzh@dev11575.prn2 ~/rocksdb] ./db_bench -benchmarks=fillseq --num=1000000
      Initializing RocksDB Options from the specified file
      Initializing RocksDB Options from command-line flags
      RocksDB:    version 5.0
      Date:       Wed Nov 23 13:17:43 2016
      CPU:        40 * Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz
      CPUCache:   25600 KB
      Keys:       16 bytes each
      Values:     100 bytes each (50 bytes after compression)
      Entries:    1000000
      Prefix:    0 bytes
      Keys per prefix:    0
      RawSize:    110.6 MB (estimated)
      FileSize:   62.9 MB (estimated)
      Write rate: 0 bytes/second
      Compression: Snappy
      Memtablerep: skip_list
      Perf Level: 1
      WARNING: Assertions are enabled; benchmarks unnecessarily slow
      ------------------------------------------------
      Initializing RocksDB Options from the specified file
      Initializing RocksDB Options from command-line flags
      DB path: [/tmp/rocksdbtest-112628/dbbench]
      fillseq      :       4.393 micros/op 227639 ops/sec;   25.2 MB/s
      
      [gzh@dev11575.prn2 ~/roc
      Closes https://github.com/facebook/rocksdb/pull/1564
      
      Differential Revision: D4241093
      
      Pulled By: lightmark
      
      fbshipit-source-id: 98c29e3
      972f96b3
  15. 19 11月, 2016 2 次提交
  16. 14 9月, 2016 1 次提交
    • I
      Support POSIX RandomRWFile · ba65c816
      Islam AbdelRahman 提交于
      Summary:
      Add Env::RandomRWFile in env.h and implement it for POSIX
      RandomRWFile is a file that allow us to read from / write to random offsets in the file
      
      I will implement it for other Envs later after finishing the whole task for AddFile()
      
      Test Plan: unit tests
      
      Reviewers: andrewkr, kradhakrishnan, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D62433
      ba65c816
  17. 02 8月, 2016 1 次提交
  18. 24 5月, 2016 1 次提交
    • K
      Direct IO capability for RocksDB · f89caa12
      krad 提交于
      Summary:
      This patch adds direct IO capability to RocksDB Env.
      
      The direct IO capability is required for persistent cache since NVM is best
      accessed as 4K direct IO. SSDs can leverage direct IO for reading.
      
      Direct IO requires the offset and size be sector size aligned, and memory to
      be kernel page aligned. Since neither RocksDB/Persistent read cache data
      layout is aligned to sector size, the code can accommodate reading unaligned IO size
      (or unaligned memory) at the cost of an alloc/copy.
      
      The write code path expects the size and memory to be aligned.
      
      Test Plan: Run RocksDB unit tests
      
      Reviewers: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57393
      f89caa12
  19. 20 5月, 2016 1 次提交
    • K
      Implement GetUniqueId for Mac · bb98ca3c
      krad 提交于
      Summary:
      Persistent read cache relies on the accuracy of the GetUniqueIdFromFile
      to generate a unique key for a given block of data. Currently we don't have an
      implementation for Mac.
      
      This patch adds an implementation.
      
      Test Plan: Run unit tests
      
      Reviewers: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D58413
      bb98ca3c
  20. 16 5月, 2016 1 次提交
    • K
      Added PersistentCache abstraction · a08c8c85
      krad 提交于
      Summary:
      Added a new abstraction to cache page to RocksDB designed for the read
      cache use.
      
      RocksDB current block cache is more of an object cache. For the persistent read cache
      project, what we need is a page cache equivalent. This changes adds a cache
      abstraction to RocksDB to cache pages called PersistentCache. PersistentCache can cache
      uncompressed pages or raw pages (content as in filesystem). The user can
      choose to operate PersistentCache either in  COMPRESSED or UNCOMPRESSED mode.
      
      Blame Rev:
      
      Test Plan: Run unit tests
      
      Reviewers: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D55707
      a08c8c85
  21. 10 2月, 2016 1 次提交
  22. 11 11月, 2015 2 次提交
    • D
      Make use of portable `uint64_t` type to make possible file access · 5270b33b
      Dmitri Smirnov 提交于
        in 64-bit.
      
        Currently, a signed off_t type is being used for the following
        interfaces for both offset and the length in bytes:
        * `Allocate`
        * `RangeSync`
      
        On Linux `off_t` is automatically either 32 or 64-bit depending on
        the platform. On Windows it is always a 32-bit signed long which
        limits file access and in particular space pre-allocation
        to effectively 2 Gb.
      
        Proposal is to replace off_t with uint64_t as a portable type
        always access files with 64-bit interfaces.
      
        May need to modify posix code but lack resources to test it.
      5270b33b
    • D
      Make use of portable `uint64_t` type to make possible file access · 5421c972
      Dmitri Smirnov 提交于
        in 64-bit.
      
        Currently, a signed off_t type is being used for the following
        interfaces for both offset and the length in bytes:
        * `Allocate`
        * `RangeSync`
      
        On Linux `off_t` is automatically either 32 or 64-bit depending on
        the platform. On Windows it is always a 32-bit signed long which
        limits file access and in particular space pre-allocation
        to effectively 2 Gb.
      
        Proposal is to replace off_t with uint64_t as a portable type
        always access files with 64-bit interfaces.
      
        May need to modify posix code but lack resources to test it.
      5421c972
  23. 29 10月, 2015 2 次提交
  24. 28 10月, 2015 2 次提交
  25. 27 10月, 2015 1 次提交
    • S
      Avoid some includes in io_posix.h · 44d4057d
      sdong 提交于
      Summary: IO Posix depends on too many .h files. Move most of them to .cc files.
      
      Test Plan: make all
      
      Reviewers: anthony, rven, IslamAbdelRahman, yhchiang, kradhakrishnan, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D49479
      44d4057d
  26. 22 10月, 2015 1 次提交
    • J
      Split posix storage backend into Env and library · 6e6dd5f6
      Javier González 提交于
      Summary: This patch splits the posix storage backend into Env and
      the actual *File implementations. The motivation is to allow other Envs
      to use posix as a library. This enables a storage backend different from
      posix to split its secondary storage between a normal file system
      partition managed by posix, and it own media.
      
      Test Plan: No new functionality is added to posix Env or the library,
      thus the current tests should suffice.
      6e6dd5f6