├── .gitignore ├── README.md ├── Rakefile ├── include ├── ccbase │ ├── dynamic.hpp │ ├── dynamic │ │ ├── load.hpp │ │ └── visibility.hpp │ ├── error.hpp │ ├── error │ │ └── expected.hpp │ ├── filesystem.hpp │ ├── filesystem │ │ ├── directory_entry.hpp │ │ ├── directory_iterator.hpp │ │ ├── glob_matcher.hpp │ │ ├── range.hpp │ │ └── system_call.hpp │ ├── format.hpp │ ├── format │ │ └── format.hpp │ ├── platform.hpp │ ├── platform │ │ ├── attributes.hpp │ │ ├── bswap.hpp │ │ ├── definitions.hpp │ │ └── identification.hpp │ ├── tuple.hpp │ ├── tuple │ │ └── print.hpp │ ├── unit_test.hpp │ └── unit_test │ │ ├── module.hpp │ │ ├── module_list.hpp │ │ ├── result.hpp │ │ └── unit_test.hpp ├── configuration.hpp ├── copy_common.hpp ├── io_common.hpp ├── read_common.hpp ├── test.hpp └── write_common.hpp ├── reference ├── linux │ └── aio_test_linux.cpp └── os_x │ └── aio_test_os_x.cpp ├── results ├── julie │ ├── read │ │ ├── read_112.csv │ │ ├── read_16.csv │ │ ├── read_256.csv │ │ ├── read_32.csv │ │ ├── read_64.csv │ │ ├── read_8.csv │ │ ├── read_80.csv │ │ ├── read_96.csv │ │ └── read_results.csv │ └── write │ │ ├── write_112.csv │ │ ├── write_16.csv │ │ ├── write_256.csv │ │ ├── write_32.csv │ │ ├── write_64.csv │ │ ├── write_8.csv │ │ ├── write_80.csv │ │ ├── write_96.csv │ │ └── write_results.csv └── macbook_pro │ ├── read │ ├── read_112.csv │ ├── read_128.csv │ ├── read_16.csv │ ├── read_160.csv │ ├── read_192.csv │ ├── read_224.csv │ ├── read_24.csv │ ├── read_256.csv │ ├── read_32.csv │ ├── read_320.csv │ ├── read_40.csv │ ├── read_48.csv │ ├── read_56.csv │ ├── read_64.csv │ ├── read_8.csv │ ├── read_80.csv │ └── read_96.csv │ └── write │ ├── write_112.csv │ ├── write_128.csv │ ├── write_16.csv │ ├── write_24.csv │ ├── write_32.csv │ ├── write_40.csv │ ├── write_48.csv │ ├── write_56.csv │ ├── write_64.csv │ ├── write_8.csv │ ├── write_80.csv │ └── write_96.csv ├── src ├── linux │ ├── copy_benchmark.cpp │ ├── read_benchmark.cpp │ └── write_benchmark.cpp └── os_x │ ├── copy_benchmark.cpp │ ├── read_benchmark.cpp │ └── write_benchmark.cpp └── tools ├── make_data.rb ├── test_read.sh └── test_write.sh /.gitignore: -------------------------------------------------------------------------------- 1 | *.DS_Store 2 | *.out 3 | *.run 4 | *.swp 5 | *.vim 6 | *.dSYM 7 | *.gch 8 | data/* 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 7 | 8 | # Introduction 9 | 10 | This repository contains a comprehensive set of IO benchmarks for Linux and OS 11 | X. These benchmarks are intended to determine the fastest ways to perform the 12 | following IO operations on each target platform: 13 | 14 | - Sequentially reading a file. 15 | - Sequentially overwriting a preallocated file. 16 | - Replacing the contents of an existing file with those of another file. 17 | 18 | # Prerequisites 19 | 20 | - Linux (version 2.6.33 or newer) or OS X. 21 | - A C++11-conformant compiler that accepts flags in GCC's format (e.g. `g++` or 22 | `clang++`). 23 | - Boost. 24 | - Ruby. 25 | - Rake. 26 | 27 | # Compilation 28 | 29 | Before compiling the benchmarks, you will need to set two environment variables. 30 | 31 | - Set `CXX` to your desired C++11-conformant compiler. 32 | - Set `BOOST_INCLUDE_PATH` to the path containing the Boost header files. 33 | 34 | Afterwards, you can compile the benchmarks by running `rake`. 35 | 36 | # Usage 37 | 38 | The `tools` directory contains a set of scripts that you will need to run the 39 | benchmarks. In order to run these scripts, you will need to type `chmod +x 40 | tools/*`. 41 | 42 | - The `tools/make_data.rb` script uses `dd` to create a set of files in the 43 | `data` directory. These files are used to perform the benchmarks. 44 | - The `tools/test_read.sh` and `tools/test_write.sh` scripts perform the 45 | reading and writing benchmarks, respectively. 46 | - The read benchmark **must** be run as root! This is because the benchmark 47 | repeatedly drops the page cache to obtain accurate results. Do **not** run 48 | this benchmark on a server that is doing anything important! 49 | - I did not create a script to run the copy benchmark. Based on existing 50 | results, it is clear that the fastest way to copy a file on OS X is 51 | `copy_mmap`, and `splice_preallocate_fadvise` or 52 | `sendfile_preallocate_fadvise` on Linux. 53 | 54 | In both `test_read.sh` and `test_write.sh`, you will see the following lines: 55 | 56 | #sizes=(8 16 24 32 40 48 56 64 80 96 112 128 160 192 224 256 320 384 448 512 640 768 896 1024) 57 | sizes=(8 16 32 64 80 96 112 256) #512 1024) 58 | 59 | These lines declare the sizes of the files (in megabytes) that are used for the 60 | benchmarks. By default, only a small set of files ranging in size from 8 MB to 61 | 256 MB are used. The first line in the pair refers to the full set of files 62 | produced by `tools/make_data.rb`. Even on a machine with a fast PCIe SSD, the 63 | read benchmark did not finish overnight. So only uncomment this line if you know 64 | that you will be able to leave the benchmark running for a long time (half a day 65 | to several days, depending on the speed of your hard drive). 66 | 67 | The results of the benchmarks are saved in the `results` directory. This 68 | directory already contains results generated from a couple of systems. 69 | 70 | # License 71 | 72 | [![Creative Commons Attribution 4.0 International 73 | License][license_image]][license_page] 74 | 75 | This project is released under the [Creative Commons Attribution 4.0 76 | International License][license_page]. 77 | 78 | [license_page]: 79 | http://creativecommons.org/licenses/by/4.0/ 80 | 81 | [license_image]: 82 | http://i.creativecommons.org/l/by/4.0/88x31.png 83 | 84 | # References 85 | 86 | - The manual pages for [OS X][darwin_man] and [Linux][linux_man]. 87 | - A very useful [benchmark][write_patterns] on write patterns. 88 | - The [blog post][plenz_blog_post] by the same author. 89 | - A Mozilla [blog post][moz_blog_post] about `F_PREALLOCATE` on OS X. 90 | 91 | [darwin_man]: 92 | https://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/ 93 | "Mac OS X Manual Pages" 94 | 95 | [linux_man]: 96 | http://linux.die.net/man/ 97 | "Linux Manual Pages" 98 | 99 | [write_patterns]: 100 | https://github.com/Feh/write-patterns 101 | "Write Patterns" 102 | 103 | [plenz_blog_post]: 104 | http://blog.plenz.com/2014-04/so-you-want-to-write-to-a-file-real-fast.html 105 | "Write Patterns Blog Post" 106 | 107 | [moz_blog_post]: 108 | https://blog.mozilla.org/tglek/2010/09/09/help-wanted-does-fcntlf_preallocate-work-as-advertised-on-osx/ 109 | "F_PREALLOCATE Blog Post" 110 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'rake/clean' 2 | 3 | cxx = ENV['CXX'] 4 | boost = ENV['BOOST_INCLUDE_PATH'] 5 | ccbase = "include/ccbase" 6 | langflags = "-std=c++1y" 7 | wflags = "-Wall -Wextra -pedantic -Wno-unused-function -Wno-return-type-c-linkage" 8 | archflags = "-march=native" 9 | incflags = "-I include -isystem #{boost} -isystem #{ccbase}" 10 | ldflags = "" 11 | 12 | if cxx.include? "clang" 13 | optflags = "-Ofast -fno-fast-math -flto -DNDEBUG -DNEO_NO_DEBUG" 14 | elsif cxx.include? "g++" 15 | optflags = "-Ofast -fno-fast-math -flto -fwhole-program" 16 | end 17 | 18 | source_dir = "" 19 | sources = "" 20 | 21 | if RUBY_PLATFORM.include? "darwin" 22 | source_dir = "src/os_x" 23 | sources = FileList["src/os_x/*"] 24 | elsif RUBY_PLATFORM.include? "linux" 25 | source_dir = "src/linux" 26 | sources = FileList["src/linux/*"] 27 | ldflags = "-lrt" 28 | end 29 | 30 | cxxflags = "#{langflags} #{wflags} #{archflags} #{incflags} #{optflags}" 31 | dirs = ["data", "out"] 32 | tests = sources.map{|f| f.sub(source_dir, "out").ext("run")} 33 | 34 | task :default => dirs + tests 35 | 36 | dirs.each do |d| 37 | directory d 38 | end 39 | 40 | tests.each do |f| 41 | src = f.sub("out", source_dir).ext("cpp") 42 | file f => [src] + dirs do 43 | sh "#{cxx} #{cxxflags} -o #{f} #{src} #{ldflags}" 44 | end 45 | end 46 | 47 | task :clobber do 48 | FileList["out/*.run"].each{|f| File.delete(f)} 49 | end 50 | -------------------------------------------------------------------------------- /include/ccbase/dynamic.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: dynamic.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 08/23/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z9D27A986_E887_46DE_BB5C_5EE43677F567 9 | #define Z9D27A986_E887_46DE_BB5C_5EE43677F567 10 | 11 | #include 12 | #include 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /include/ccbase/dynamic/load.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: load.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 06/30/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef ZDBB75EFD_5555_4AF8_9C85_102127F45636 9 | #define ZDBB75EFD_5555_4AF8_9C85_102127F45636 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #if PLATFORM_KERNEL == PLATFORM_KERNEL_LINUX || \ 18 | PLATFORM_KERNEL == PLATFORM_KERNEL_XNU 19 | #include 20 | #else 21 | #error "Unsupported kernel." 22 | #endif 23 | 24 | namespace cc { 25 | 26 | enum class mode : int 27 | { 28 | lazy = RTLD_LAZY, 29 | now = RTLD_NOW, 30 | global = RTLD_GLOBAL, 31 | local = RTLD_LOCAL, 32 | 33 | #ifdef RTLD_NODELETE 34 | nodelete = RTLD_NODELETE, 35 | #endif 36 | 37 | #ifdef RTLD_NOLOAD 38 | noload = RTLD_NOLOAD, 39 | #endif 40 | 41 | #ifdef RTLD_DEPBIND 42 | depbind = RTLD_DEPBIND, 43 | #endif 44 | 45 | }; 46 | 47 | static constexpr mode lazy = mode::lazy; 48 | static constexpr mode now = mode::now; 49 | static constexpr mode global = mode::global; 50 | static constexpr mode local = mode::local; 51 | 52 | #ifdef RTLD_NODELETE 53 | static constexpr mode nodelete = mode::nodelete; 54 | #endif 55 | 56 | #ifdef RTLD_NOLOAD 57 | static constexpr mode noload = mode::noload; 58 | #endif 59 | 60 | #ifdef RTLD_DEPBIND 61 | static constexpr mode depbind = mode::depbind; 62 | #endif 63 | 64 | constexpr mode 65 | operator|(const mode x, const mode y) 66 | { 67 | using integer = typename std::underlying_type::type; 68 | return static_cast( 69 | static_cast(x) | 70 | static_cast(y) 71 | ); 72 | } 73 | 74 | class image 75 | { 76 | private: 77 | void* handle; 78 | public: 79 | image(const char* path, mode m) 80 | { 81 | using integer = typename std::underlying_type::type; 82 | handle = ::dlopen(path, static_cast(m)); 83 | if (handle == nullptr) { 84 | throw std::runtime_error{::dlerror()}; 85 | } 86 | } 87 | 88 | ~image() 89 | { 90 | if (::dlclose(handle) != 0) { 91 | // Ideally, if an error occurs in closing the handle, 92 | // then we would log the error. 93 | ::dlerror(); 94 | } 95 | } 96 | 97 | operator void*() const 98 | { 99 | return handle; 100 | } 101 | }; 102 | 103 | template 104 | class function; 105 | 106 | template 107 | class function 108 | { 109 | private: 110 | using signature = ReturnType(Args...); 111 | using pointer = ReturnType(*)(Args...); 112 | 113 | std::function f; 114 | void* address; 115 | public: 116 | function(void* address) noexcept : 117 | f{reinterpret_cast(address)}, address{address} {} 118 | 119 | ReturnType operator()(Args... args) const 120 | { 121 | return f(args...); 122 | } 123 | 124 | operator void*() const 125 | { 126 | return address; 127 | } 128 | }; 129 | 130 | class symbol_info 131 | { 132 | private: 133 | Dl_info data; 134 | public: 135 | symbol_info() noexcept {} 136 | 137 | const char* path() const 138 | { 139 | return data.dli_fname; 140 | } 141 | 142 | const void* base_address() const 143 | { 144 | return data.dli_fbase; 145 | } 146 | 147 | const char* name() const 148 | { 149 | return data.dli_sname; 150 | } 151 | 152 | const void* address() const 153 | { 154 | return data.dli_saddr; 155 | } 156 | 157 | operator Dl_info*() 158 | { 159 | return &data; 160 | } 161 | }; 162 | 163 | template 164 | cc::expected 165 | get_info(const T& t) 166 | { 167 | symbol_info d; 168 | auto r = ::dladdr(static_cast(const_cast(&t)), d); 169 | if (r == 0) { 170 | throw std::runtime_error{::dlerror()}; 171 | } 172 | return d; 173 | } 174 | 175 | template 176 | cc::expected 177 | get_info(const function f) 178 | { 179 | symbol_info d; 180 | auto r = ::dladdr(f, d); 181 | if (r == 0) { 182 | throw std::runtime_error{::dlerror()}; 183 | } 184 | return d; 185 | } 186 | 187 | template 188 | cc::expected> 189 | get_function(const char* name, const image& i) 190 | { 191 | // The Linux manual states that the error state should be cleared before 192 | // checking the error state after the next dl* function call. 193 | #if PLATFORM_KERNEL == PLATFORM_KERNEL_LINUX 194 | ::dlerror(); 195 | #endif 196 | 197 | auto t = ::dlsym(i, name); 198 | 199 | #if PLATFORM_KERNEL == PLATFORM_KERNEL_LINUX 200 | if (::dlerror() != nullptr) { 201 | return std::runtime_error{"Symbol not found."}; 202 | } 203 | #elif PLATFORM_KERNEL == PLATFORM_KERNEL_XNU 204 | if (t == nullptr) { 205 | return std::runtime_error{::dlerror()}; 206 | } 207 | #endif 208 | 209 | return function{t}; 210 | } 211 | 212 | /* 213 | ** Note that this function returns an `expected`, so mutating the value type 214 | ** from the `expected` object also mutates the original object retrieved from 215 | ** the symbol address. 216 | */ 217 | 218 | template 219 | cc::expected 220 | get_data(const char* name, const image& i) 221 | { 222 | // The Linux manual states that the error state should be cleared before 223 | // checking the error state after the next dl* function call. 224 | #if PLATFORM_KERNEL == PLATFORM_KERNEL_LINUX 225 | ::dlerror(); 226 | #endif 227 | 228 | auto t = ::dlsym(i, name); 229 | 230 | #if PLATFORM_KERNEL == PLATFORM_KERNEL_LINUX 231 | if (::dlerror() != nullptr) { 232 | return std::runtime_error{"Symbol not found."}; 233 | } 234 | #elif PLATFORM_KERNEL == PLATFORM_KERNEL_XNU 235 | if (t == nullptr) { 236 | return std::runtime_error{::dlerror()}; 237 | } 238 | #endif 239 | 240 | return *static_cast(t); 241 | } 242 | 243 | } 244 | 245 | #endif 246 | -------------------------------------------------------------------------------- /include/ccbase/dynamic/visibility.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: visibility.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 06/30/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef ZBA05AAB6_3F9E_4C1F_8FEB_2F4304CD2335 9 | #define ZBA05AAB6_3F9E_4C1F_8FEB_2F4304CD2335 10 | 11 | #include 12 | 13 | /* 14 | ** This part defines the following utility macros: 15 | ** 16 | ** - `IMPORT_SYMBOL` 17 | ** - `EXPORT_SYMBOL` 18 | ** - `HIDDEN_SYMBOL` 19 | */ 20 | 21 | #if PLATFORM_KERNEL == PLATFORM_KERNEL_WINDOWS_NT 22 | #if PLATFORM_COMPILER == PLATFORM_COMPILER_COMEAU || \ 23 | PLATFORM_COMPILER == PLATFORM_COMPILER_ICC || \ 24 | PLATFORM_COMPILER == PLATFORM_COMPILER_MINGW || \ 25 | PLATFORM_COMPILER == PLATFORM_COMPILER_MSVC || \ 26 | PLATFORM_COMPILER == PLATFORM_COMPILER_PGI 27 | #define IMPORT_SYMBOL __declspec(dllimport) 28 | #define EXPORT_SYMBOL __declspec(dllexport) 29 | #define HIDDEN_SYMBOL 30 | #elif PLATFORM_COMPILER == PLATFORM_COMPILER_GCC || \ 31 | PLATFORM_COMPILER == PLATFORM_COMPILER_CLANG 32 | #define IMPORT_SYMBOL __attribute__((visibility("default"))) 33 | #define EXPORT_SYMBOL __attribute__((visibility("default"))) 34 | #define HIDDEN_SYMBOL __attribute__((visibility("hidden"))) 35 | #else 36 | #error "Cannot determine symbol visibility syntax." 37 | #endif 38 | #elif PLATFORM_KERNEL == PLATFORM_KERNEL_LINUX || \ 39 | PLATFORM_KERNEL == PLATFORM_KERNEL_XNU 40 | #if PLATFORM_COMPILER == PLATFORM_COMPILER_CLANG || \ 41 | PLATFORM_COMPILER == PLATFORM_COMPILER_COMEAU || \ 42 | PLATFORM_COMPILER == PLATFORM_COMPILER_GCC || \ 43 | PLATFORM_COMPILER == PLATFORM_COMPILER_ICC || \ 44 | PLATFORM_COMPILER == PLATFORM_COMPILER_PGI 45 | #define IMPORT_SYMBOL __attribute__((visibility("default"))) 46 | #define EXPORT_SYMBOL __attribute__((visibility("default"))) 47 | #define HIDDEN_SYMBOL __attribute__((visibility("hidden"))) 48 | #else 49 | #error "Cannot determine symbol visibility syntax." 50 | #endif 51 | #else 52 | #error "Cannot determine symbol visibility syntax." 53 | #endif 54 | 55 | /* 56 | ** This part defines the following macros: 57 | ** 58 | ** - `PUBLIC_SYMBOL` 59 | ** - `PRIVATE_SYMBOL` 60 | ** 61 | ** `PUBLIC_SYMBOL` expands to `IMPORT_SYMBOL` if `CCBASE_IMPORT_SYMBOLS` is 62 | ** defined, or `EXPORT_SYMBOL` if `CCBASE_EXPORT_SYMBOLS` is defined. If neither 63 | ** of the two macros is defined, then `PUBLIC_SYMBOL` expands to nothing. 64 | ** `PRIVATE_SYMBOL` expands to `HIDDEN_SYMBOL` if either of the two macros is 65 | ** defined, and nothing otherwise. 66 | */ 67 | 68 | #if defined CCBASE_IMPORT_SYMBOLS && defined CCBASE_EXPORT_SYMBOLS 69 | #error "Both CCBASE_IMPORT_SYMBOLS and CCBASE_EXPORT_SYMBOLS are defined." 70 | #endif 71 | 72 | #if defined CCBASE_IMPORT_SYMBOLS 73 | #define PUBLIC_SYMBOL IMPORT_SYMBOL 74 | #define PRIVATE_SYMBOL HIDDEN_SYMBOL 75 | #elif defined CCBASE_EXPORT_SYMBOLS 76 | #define PUBLIC_SYMBOL EXPORT_SYMBOL 77 | #define PRIVATE_SYMBOL HIDDEN_SYMBOL 78 | #else 79 | #define PUBLIC_SYMBOL 80 | #define PRIVATE_SYMBOL 81 | #endif 82 | 83 | #endif 84 | -------------------------------------------------------------------------------- /include/ccbase/error.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: error.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 08/23/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z2EF8C061_9364_490F_9170_196773910B9D 9 | #define Z2EF8C061_9364_490F_9170_196773910B9D 10 | 11 | #include 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /include/ccbase/filesystem.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: filesystem.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 01/21/2014 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z6ACB21E7_CBB4_4209_8277_C6AD28BF602C 9 | #define Z6ACB21E7_CBB4_4209_8277_C6AD28BF602C 10 | 11 | #include 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /include/ccbase/filesystem/directory_entry.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: directory_entry.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 08/23/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef ZDDEA7CE4_14FD_40C7_AA27_9BBF59D67383 9 | #define ZDDEA7CE4_14FD_40C7_AA27_9BBF59D67383 10 | 11 | #include 12 | #include 13 | 14 | #if PLATFORM_KERNEL == PLATFORM_KERNEL_LINUX 15 | #include 16 | #elif PLATFORM_KERNEL == PLATFORM_KERNEL_XNU 17 | #include 18 | #else 19 | #error "Unsupported kernel." 20 | #endif 21 | 22 | namespace cc { 23 | 24 | enum class file_type : unsigned char 25 | { 26 | block = DT_BLK, 27 | character = DT_CHR, 28 | directory = DT_DIR, 29 | fifo = DT_FIFO, 30 | symbolic_link = DT_LNK, 31 | regular = DT_REG, 32 | socket = DT_SOCK, 33 | unknown = DT_UNKNOWN 34 | }; 35 | 36 | class directory_iterator; 37 | 38 | class directory_entry 39 | { 40 | private: 41 | friend class directory_iterator; 42 | 43 | using length_type = uint16_t; 44 | 45 | const directory_iterator* p; 46 | const char* n; 47 | const length_type len; 48 | const file_type t; 49 | 50 | directory_entry( 51 | const directory_iterator& p, 52 | const char* n, 53 | const length_type len, 54 | const file_type t 55 | ) noexcept : p{&p}, n{n}, len{len}, t{t} {} 56 | public: 57 | // Defined in `directory_iterator.hpp` due to cyclic dependencies. 58 | const char* path() const; 59 | const char* name() const { return n; } 60 | file_type type() const { return t; } 61 | }; 62 | 63 | } 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /include/ccbase/filesystem/glob_matcher.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: glob_matcher.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 08/27/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z8614FAE3_9C93_4CD5_8DDC_263814847601 9 | #define Z8614FAE3_9C93_4CD5_8DDC_263814847601 10 | 11 | #include 12 | #include 13 | 14 | namespace cc { 15 | 16 | CC_ALWAYS_INLINE bool 17 | is_glob(const char c) 18 | { 19 | return c == '?' || c == '*' || c == '[' || c == ']' || c == '\\'; 20 | } 21 | 22 | class glob_matcher 23 | { 24 | private: 25 | const char* pat{}; 26 | public: 27 | explicit glob_matcher() noexcept {} 28 | 29 | explicit glob_matcher(const char* pat) 30 | noexcept : pat{pat} 31 | { 32 | // If we are in debug mode, ensure that the pattern is valid. 33 | assert(pat != nullptr && pat[0] != '\0'); 34 | 35 | #ifndef NDEBUG 36 | auto i = 0u; 37 | 38 | /* 39 | ** The following sequences are considered to be syntax 40 | ** violations when they occur within glob patterns: 41 | ** 42 | ** 1. Special characters within groups. 43 | ** 2. Empty groups. 44 | ** 3. Any backslash not followed by a special character; this 45 | ** includes trailing backslashes. 46 | */ 47 | do switch (pat[i]) { 48 | default: 49 | case '*': 50 | case '?': ++i; continue; 51 | case '[': assert(pat[++i] != ']'); goto group_mode; 52 | // Ensure that the character escaped using a backslash is a 53 | // special character. 54 | case '\\': assert(is_glob(pat[++i])); ++i; continue; 55 | regular_mode: continue; 56 | } while (pat[i] != '\0'); 57 | return; 58 | 59 | // Check to ensure that the current group is valid. 60 | group_mode: 61 | for(;;) switch (pat[i]) { 62 | default: ++i; continue; 63 | case ']': ++i; goto regular_mode; 64 | case '\\': assert(is_glob(pat[++i])); ++i; continue; 65 | case '*': 66 | case '?': 67 | case '\0': assert(false); 68 | } 69 | 70 | #endif 71 | } 72 | 73 | /* 74 | ** Determines whether the directory entry's name matches the glob 75 | ** pattern. 76 | */ 77 | bool operator()(const directory_entry& e) const 78 | { 79 | #ifndef NDEBUG 80 | assert(pat != nullptr); 81 | #endif 82 | 83 | // Offset into pattern that we are matching. 84 | auto i = 0u; 85 | // Offset into the file name. 86 | auto j = 0u; 87 | auto s = e.name(); 88 | 89 | do switch(pat[i]) { 90 | default: if (pat[i++] != s[j++]) return false; continue; 91 | case '*': ++i; return match_wildcard(s, i, j); 92 | case '?': ++i; ++j; continue; 93 | case '[': ++i; if (!match_group(s, i, j)) return false; continue; 94 | case '\\': ++i; if (pat[i++] != s[j++]) return false; continue; 95 | } while (pat[i] != '\0' && s[j] != '\0'); 96 | return (pat[i] == '\0' || pat[i] == '*') && s[j] == '\0'; 97 | } 98 | private: 99 | /* 100 | ** Determines whether `s[j]` matches the group of characters starting at 101 | ** `pat[i]`. 102 | */ 103 | bool match_group(const char* s, unsigned& i, unsigned& j) const 104 | { 105 | auto b = false; 106 | do { 107 | // Skip past the backslash before an escaped character. 108 | i += (pat[i] == '\\'); 109 | b = b || (pat[i] == s[j]); 110 | ++i; 111 | } 112 | while (pat[i] != ']'); 113 | ++i; 114 | ++j; 115 | return b; 116 | } 117 | 118 | /* 119 | ** After this method is called, we must iteratively test each character 120 | ** of `s` beginning at `s[j]` to check whether it matches the characters 121 | ** after the wildcards beginning at `pat[i - 1]`. 122 | */ 123 | bool match_wildcard(const char* s, unsigned i, unsigned j) const 124 | { 125 | /* 126 | ** We keep track of the index `pi` after each wildcard that we 127 | ** are trying to match, and the index `pj` into `s` at which we 128 | ** are looking for a match. If the characters after the wildcard 129 | ** fail to match the string beginning at `s[j]`, then we reset 130 | ** `i` to `pi` and `j` to `pj`. 131 | */ 132 | 133 | // First index of current subpattern for which we are looking 134 | // for a match. A subpattern is a pattern between a wildcard and 135 | // another wildcard or null character. 136 | auto pi = i; 137 | // Current index at which we are looking for a match. 138 | auto pj = j; 139 | 140 | while (s[j] != '\0') switch (pat[i]) { 141 | default: 142 | if (pat[i] != s[j]) { 143 | ++pj; 144 | i = pi; 145 | j = pj; 146 | continue; 147 | } 148 | else { 149 | ++i; 150 | ++j; 151 | continue; 152 | } 153 | case '*': 154 | ++i; 155 | pi = i; 156 | pj = j; 157 | continue; 158 | case '?': 159 | ++i; 160 | ++j; 161 | continue; 162 | case '[': 163 | ++i; 164 | if (!match_group(s, i, j)) { 165 | ++pj; 166 | i = pi; 167 | j = pj; 168 | } 169 | continue; 170 | case '\\': 171 | /* 172 | ** If we increment `i` by one, then we will 173 | ** interpret the following escaped character as 174 | ** a special character at the next iteration. To 175 | ** prevent this, we must anticipate what should 176 | ** happen in the next iteration. 177 | */ 178 | if (pat[i + 1] != s[j]) { 179 | ++pj; 180 | i = pi; 181 | j = pj; 182 | continue; 183 | } 184 | else { 185 | i += 2; 186 | ++j; 187 | continue; 188 | } 189 | } 190 | return pat[i] == '\0'; 191 | } 192 | }; 193 | 194 | } 195 | 196 | #endif 197 | -------------------------------------------------------------------------------- /include/ccbase/filesystem/range.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: range.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 01/21/2014 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z2CDD8E18_3354_4CA7_A001_5D32122EEAE7 9 | #define Z2CDD8E18_3354_4CA7_A001_5D32122EEAE7 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | namespace cc { 20 | 21 | boost::iterator_range 22 | list_files(const char* path) 23 | { 24 | return { 25 | directory_iterator{path}, 26 | directory_iterator{} 27 | }; 28 | } 29 | 30 | boost::iterator_range> 31 | match_files(const char* glob) 32 | { 33 | const auto* end = std::strrchr(glob, '/'); 34 | if (end == nullptr) { 35 | throw std::invalid_argument{"Invalid glob string."}; 36 | } 37 | 38 | // TODO Change this to `std::dynarray` after the transition to C++14. 39 | char buf[end - glob + 1]; 40 | std::copy(glob, end, buf); 41 | buf[end - glob] = '\0'; 42 | 43 | return { 44 | boost::make_filter_iterator( 45 | glob_matcher{end + 1}, 46 | directory_iterator{buf}, 47 | directory_iterator{} 48 | ), 49 | boost::make_filter_iterator( 50 | glob_matcher{}, 51 | directory_iterator{}, 52 | directory_iterator{} 53 | ) 54 | }; 55 | } 56 | 57 | } 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /include/ccbase/filesystem/system_call.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: system_call.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 08/27/2013 5 | ** Contact: _@adityaramesh.com 6 | ** 7 | ** Documentation for Linux system calls is readily available. Documentation for 8 | ** XNU system calls is available [here][xnu_syscalls]. 9 | ** 10 | ** [xnu_syscalls]: 11 | ** http://www.opensource.apple.com/source/xnu/xnu-1504.3.12/bsd/kern/syscalls.master 12 | ** "XNU System Calls" 13 | */ 14 | 15 | #ifndef Z6C7E2BB5_EFCF_4AFF_9752_571AF3EDF467 16 | #define Z6C7E2BB5_EFCF_4AFF_9752_571AF3EDF467 17 | 18 | #include 19 | #include 20 | 21 | #if PLATFORM_KERNEL == PLATFORM_KERNEL_LINUX 22 | #include 23 | #include 24 | #elif PLATFORM_KERNEL == PLATFORM_KERNEL_XNU 25 | // For `user_size_t` and `user_ssize_t`. 26 | #include 27 | #include 28 | #include 29 | #else 30 | #error "Unsupported kernel." 31 | #endif 32 | 33 | namespace cc { 34 | 35 | #if PLATFORM_KERNEL == PLATFORM_KERNEL_LINUX 36 | 37 | CC_ALWAYS_INLINE int 38 | getdents(unsigned fd, char* buf, unsigned n) 39 | { 40 | return ::syscall(SYS_getdents, fd, buf, n); 41 | } 42 | 43 | #elif PLATFORM_KERNEL == PLATFORM_KERNEL_XNU 44 | 45 | CC_ALWAYS_INLINE user_ssize_t 46 | getdirentries64(int fd, char* buf, user_size_t n, off_t* pos) 47 | { 48 | return ::syscall(SYS_getdirentries64, fd, buf, n, pos); 49 | } 50 | 51 | #endif 52 | 53 | } 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /include/ccbase/format.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: format.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 08/12/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z574A080A_9CD2_49C4_B5E6_7910C1B6F6E9 9 | #define Z574A080A_9CD2_49C4_B5E6_7910C1B6F6E9 10 | 11 | #include 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /include/ccbase/format/format.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: format.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 08/12/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z9DCE86DF_558B_497F_B6CC_4DCDFD6070FC 9 | #define Z9DCE86DF_558B_497F_B6CC_4DCDFD6070FC 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | namespace cc { 22 | 23 | namespace detail { 24 | 25 | /* 26 | ** We do not use the `isdigit` function from ``, because the only 27 | ** characters that we treat as digits for argument indexing purposes are those 28 | ** from 0--9. 29 | */ 30 | 31 | template 32 | static CC_ALWAYS_INLINE bool 33 | is_digit(const T t) 34 | noexcept 35 | { 36 | return T{'0'} <= t && t <= T{'9'}; 37 | } 38 | 39 | template > 40 | static CC_ALWAYS_INLINE void 41 | write_arg(const std::basic_ostream&, const std::size_t) 42 | { 43 | throw std::out_of_range{"Not enough arguments."}; 44 | } 45 | 46 | template , class U, class... Us> 47 | static CC_ALWAYS_INLINE void 48 | write_arg( 49 | std::basic_ostream& os, 50 | const std::size_t n, 51 | const U arg, 52 | const Us... args 53 | ) 54 | { 55 | if (n > 0) { 56 | return write_arg(os, n - 1, args...); 57 | } 58 | os << arg; 59 | } 60 | 61 | } 62 | 63 | template , class... Us> 64 | void write(std::basic_ostream& os, const T* s, const Us... args) 65 | { 66 | using detail::is_digit; 67 | using detail::write_arg; 68 | 69 | // Used to keep track of the segment of the string to be printed before 70 | // printing the next format argument. 71 | auto f = s; 72 | auto l = s; 73 | 74 | // Used to keep track of the next format argument to be printed. 75 | auto i = 0u; 76 | 77 | // We disallow printing the null string. 78 | assert(l != nullptr && "Format string is null."); 79 | // We disallow printing the empty string. 80 | assert(*l != 0 && "Format string is empty."); 81 | 82 | do { 83 | if (*l == T{'$'}) { 84 | os.write(f, l - f); 85 | ++l; 86 | f = l; 87 | write_arg(os, i, args...); 88 | ++i; 89 | } 90 | else if (*l == T{'{'}) { 91 | if (*(l + 1) == T{'$'}) { 92 | assert(*(l + 2) == '}' && "Expected '}'."); 93 | os.write(f, l - f); 94 | os.write("$", 1); 95 | l += 3; 96 | f = l; 97 | } 98 | else if (*(l + 1) == T{'{'}) { 99 | ++l; 100 | os.write(f, l - f); 101 | ++l; 102 | f = l; 103 | } 104 | else { 105 | assert(false && "Invalid use of '{'."); 106 | } 107 | } 108 | else if (*l == T{'}'}) { 109 | assert(*(l + 1) == '}' && "Unexpected '}'."); 110 | ++l; 111 | os.write(f, l - f); 112 | ++l; 113 | f = l; 114 | } 115 | else { 116 | ++l; 117 | } 118 | } 119 | while (*l != 0); 120 | os.write(f, l - f); 121 | } 122 | 123 | template , class U> 124 | CC_ALWAYS_INLINE void 125 | write(std::basic_ostream& os, const U& u) 126 | { 127 | os << u; 128 | } 129 | 130 | template , class... Ts> 131 | CC_ALWAYS_INLINE void 132 | writeln(std::basic_ostream& os, const Ts... args) 133 | { 134 | write(os, args...); 135 | os << std::endl; 136 | } 137 | 138 | template 139 | CC_ALWAYS_INLINE void 140 | print(const Ts... args) 141 | { 142 | write(std::cout, args...); 143 | } 144 | 145 | template 146 | CC_ALWAYS_INLINE void 147 | println(const Ts... args) 148 | { 149 | writeln(std::cout, args...); 150 | } 151 | 152 | template 153 | CC_ALWAYS_INLINE void 154 | err(const Ts... args) 155 | { 156 | write(std::cerr, args...); 157 | } 158 | 159 | template 160 | CC_ALWAYS_INLINE void 161 | errln(const Ts... args) 162 | { 163 | writeln(std::cerr, args...); 164 | } 165 | 166 | /* 167 | ** These functions require the format string argument, because we would not know 168 | ** the type of string to return otherwise. 169 | */ 170 | 171 | template 172 | CC_ALWAYS_INLINE auto 173 | format(const T* s, const Us... args) -> 174 | std::basic_string> 175 | { 176 | std::basic_ostringstream> ss; 177 | write(ss, s, args...); 178 | return ss.str(); 179 | } 180 | 181 | template 182 | CC_ALWAYS_INLINE auto 183 | formatln(const T* s, const Us... args) -> 184 | std::basic_string> 185 | { 186 | std::basic_ostringstream> ss; 187 | writeln(ss, s, args...); 188 | return ss.str(); 189 | } 190 | 191 | } 192 | 193 | #endif 194 | -------------------------------------------------------------------------------- /include/ccbase/platform.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: platform.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 08/12/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z89D7C3CE_6E8B_4964_B5C4_FB5400F1A9F1 9 | #define Z89D7C3CE_6E8B_4964_B5C4_FB5400F1A9F1 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /include/ccbase/platform/attributes.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: attributes.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 12/25/2012 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef ZF27C7D32_9AB4_45CF_97E5_F4103C824B40 9 | #define ZF27C7D32_9AB4_45CF_97E5_F4103C824B40 10 | 11 | #include 12 | 13 | #if PLATFORM_COMPILER == PLATFORM_COMPILER_GCC 14 | #define CC_ALWAYS_INLINE __attribute__((always_inline)) inline 15 | #define CC_NEVER_INLINE __attribute__((noinline)) 16 | #define CC_CONST __attribute__((const)) 17 | #define CC_PURE __attribute__((pure)) 18 | #define CC_UNUSED __attribute__((unused)) 19 | #define CC_RESTRICT __restrict__ 20 | #define CC_ALIGN(n) __attribute__((aligned(n))) 21 | #elif PLATFORM_COMPILER == PLATFORM_COMPILER_CLANG 22 | #define CC_ALWAYS_INLINE __attribute__((always_inline)) 23 | #define CC_NEVER_INLINE __attribute__((noinline)) 24 | #define CC_CONST __attribute__((const)) 25 | #define CC_PURE __attribute__((pure)) 26 | #define CC_UNUSED __attribute__((unused)) 27 | #define CC_RESTRICT __restrict__ 28 | #define CC_ALIGN(n) __attribute__((aligned(n))) 29 | #elif PLATFORM_COMPILER == PLATFORM_COMPILER_ICC 30 | #define CC_ALWAYS_INLINE __attribute__((always_inline)) 31 | #define CC_NEVER_INLINE __attribute__((noinline)) 32 | #define CC_CONST __attribute__((const)) 33 | #define CC_PURE __attribute__((pure)) 34 | #define CC_UNUSED __attribute__((unused)) 35 | #define CC_RESTRICT restrict 36 | #define CC_ALIGN(n) __attribute__((aligned(n))) 37 | #elif PLATFORM_COMPILER == PLATFORM_COMPILER_MSVC 38 | #define CC_ALWAYS_INLINE __forceinline 39 | #define CC_NEVER_INLINE __declspec(noinline) 40 | #define CC_CONST 41 | #define CC_PURE 42 | #define CC_UNUSED 43 | #define CC_RESTRICT __restrict 44 | #define CC_ALIGN(n) __declspec(align(n)) 45 | #else 46 | #define CC_ALWAYS_INLINE 47 | #define CC_NEVER_INLINE 48 | #define CC_CONST 49 | #define CC_PURE 50 | #define CC_UNUSED 51 | #define CC_RESTRICT 52 | #define CC_ALIGN(n) "Could not determine compiler alignment directive." 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /include/ccbase/platform/bswap.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: bswap.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 04/14/2014 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z2C1D91E3_6CC1_415A_A95D_65604B557F77 9 | #define Z2C1D91E3_6CC1_415A_A95D_65604B557F77 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | namespace cc { 16 | 17 | CC_ALWAYS_INLINE int8_t bswap(int8_t x) { return x; } 18 | 19 | CC_ALWAYS_INLINE int16_t 20 | bswap(int16_t x) 21 | { 22 | #if PLATFORM_COMPILER == PLATFORM_COMPILER_CLANG || \ 23 | PLATFORM_COMPILER == PLATFORM_COMPILER_GCC || \ 24 | PLATFORM_COMPILER == PLATFORM_COMPILER_ICC 25 | return __builtin_bswap16(x); 26 | #else 27 | return ((x & 0xFF) << 8) | ((x & 0xFF00) >> 8); 28 | #endif 29 | } 30 | 31 | CC_ALWAYS_INLINE 32 | int32_t bswap(int32_t x) 33 | { 34 | #if PLATFORM_COMPILER == PLATFORM_COMPILER_CLANG || \ 35 | PLATFORM_COMPILER == PLATFORM_COMPILER_GCC || \ 36 | PLATFORM_COMPILER == PLATFORM_COMPILER_ICC 37 | return __builtin_bswap32(x); 38 | #else 39 | return ((x & 0xFF) << 24) | 40 | ((x & 0xFF00) << 8) | 41 | ((x & 0xFF0000) >> 8) | 42 | ((x & 0xFF0000000) >> 24); 43 | #endif 44 | } 45 | 46 | CC_ALWAYS_INLINE 47 | int64_t bswap(int64_t x) 48 | { 49 | #if PLATFORM_COMPILER == PLATFORM_COMPILER_CLANG || \ 50 | PLATFORM_COMPILER == PLATFORM_COMPILER_GCC || \ 51 | PLATFORM_COMPILER == PLATFORM_COMPILER_ICC 52 | return __builtin_bswap64(x); 53 | #else 54 | return ((x & 0xFF) << 56) | 55 | ((x & 0xFF00) << 40) | 56 | ((x & 0xFF0000) << 24) | 57 | ((x & 0xFF000000) << 8) | 58 | ((x & 0xFF00000000) >> 8) | 59 | ((x & 0xFF0000000000) >> 24) | 60 | ((x & 0xFF000000000000) >> 40) | 61 | ((x & 0xFF00000000000000) >> 56); 62 | #endif 63 | } 64 | 65 | CC_ALWAYS_INLINE uint8_t bswap(uint8_t x) { return x; } 66 | 67 | CC_ALWAYS_INLINE uint16_t 68 | bswap(uint16_t x) 69 | { 70 | #if PLATFORM_COMPILER == PLATFORM_COMPILER_CLANG || \ 71 | PLATFORM_COMPILER == PLATFORM_COMPILER_GCC || \ 72 | PLATFORM_COMPILER == PLATFORM_COMPILER_ICC 73 | return __builtin_bswap16(x); 74 | #else 75 | return ((x & 0xFF) << 8) | ((x & 0xFF00) >> 8); 76 | #endif 77 | } 78 | 79 | CC_ALWAYS_INLINE 80 | uint32_t bswap(uint32_t x) 81 | { 82 | #if PLATFORM_COMPILER == PLATFORM_COMPILER_CLANG || \ 83 | PLATFORM_COMPILER == PLATFORM_COMPILER_GCC || \ 84 | PLATFORM_COMPILER == PLATFORM_COMPILER_ICC 85 | return __builtin_bswap32(x); 86 | #else 87 | return ((x & 0xFF) << 24) | 88 | ((x & 0xFF00) << 8) | 89 | ((x & 0xFF0000) >> 8) | 90 | ((x & 0xFF0000000) >> 24); 91 | #endif 92 | } 93 | 94 | CC_ALWAYS_INLINE 95 | uint64_t bswap(uint64_t x) 96 | { 97 | #if PLATFORM_COMPILER == PLATFORM_COMPILER_CLANG || \ 98 | PLATFORM_COMPILER == PLATFORM_COMPILER_GCC || \ 99 | PLATFORM_COMPILER == PLATFORM_COMPILER_ICC 100 | return __builtin_bswap64(x); 101 | #else 102 | return ((x & 0xFF) << 56) | 103 | ((x & 0xFF00) << 40) | 104 | ((x & 0xFF0000) << 24) | 105 | ((x & 0xFF000000) << 8) | 106 | ((x & 0xFF00000000) >> 8) | 107 | ((x & 0xFF0000000000) >> 24) | 108 | ((x & 0xFF000000000000) >> 40) | 109 | ((x & 0xFF00000000000000) >> 56); 110 | #endif 111 | } 112 | 113 | CC_ALWAYS_INLINE 114 | auto bswap(float x) -> 115 | std::enable_if::type 116 | { 117 | return bswap(reinterpret_cast(x)); 118 | } 119 | 120 | CC_ALWAYS_INLINE 121 | auto bswap(double x) -> 122 | std::enable_if::type 123 | { 124 | return bswap(reinterpret_cast(x)); 125 | } 126 | 127 | } 128 | 129 | #endif 130 | -------------------------------------------------------------------------------- /include/ccbase/platform/definitions.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: definitions.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 08/12/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z2DAEF0A4_1547_46EA_B330_DCB3B056748A 9 | #define Z2DAEF0A4_1547_46EA_B330_DCB3B056748A 10 | 11 | #define PLATFORM_COMPILER_CLANG 0x00000001 12 | #define PLATFORM_COMPILER_COMEAU 0x00000002 13 | #define PLATFORM_COMPILER_GCC 0x00000004 14 | #define PLATFORM_COMPILER_ICC 0x00000008 15 | #define PLATFORM_COMPILER_MSVC 0x00000010 16 | #define PLATFORM_COMPILER_UNKNOWN 0x00000000 17 | 18 | #define PLATFORM_COMPILER_MAJOR_VERSION_UNKNOWN 0x00000000 19 | #define PLATFORM_COMPILER_MINOR_VERSION_UNKNOWN 0x00000000 20 | #define PLATFORM_COMPILER_PATCH_LEVEL_UNKNOWN 0x00000000 21 | 22 | #define PLATFORM_ARCH_ARM 0x00000001 23 | #define PLATFORM_ARCH_ITANIUM 0x00000002 24 | #define PLATFORM_ARCH_X86 0x00000004 25 | #define PLATFORM_ARCH_UNKNOWN 0x00000000 26 | 27 | #define PLATFORM_WORD_SIZE_UNKNOWN 0x00000000 28 | #define PLATFORM_NEWLINE_LENGTH_UNKNOWN 0x00000000 29 | #define PLATFORM_MAX_FILENAME_LENGTH_UNKNOWN 0x00000000 30 | #define PLATFORM_MAX_PATHNAME_LENGTH_UNKNOWN 0x00000000 31 | 32 | #define PLATFORM_OS_LINUX_DISTRIBUTION 0x00000001 33 | #define PLATFORM_OS_OS_X 0x00000002 34 | #define PLATFORM_OS_WINDOWS 0x00000004 35 | #define PLATFORM_OS_UNKNOWN 0x00000000 36 | 37 | #define PLATFORM_KERNEL_LINUX 0x00000001 38 | #define PLATFORM_KERNEL_WINDOWS_NT 0x00000002 39 | #define PLATFORM_KERNEL_XNU 0x00000004 40 | #define PLATFORM_KERNEL_UNKNOWN 0x00000000 41 | 42 | #define PLATFORM_BYTE_ORDER_LITTLE 0x00000001 43 | #define PLATFORM_BYTE_ORDER_BIG 0x00000002 44 | #define PLATFORM_BYTE_ORDER_LITTLE_WORD 0x00000004 45 | #define PLATFORM_BYTE_ORDER_UNKNOWN 0x00000000 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /include/ccbase/tuple.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: tuple.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 08/12/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z97E96633_8259_4DC5_ACCE_5D6258DEEDF2 9 | #define Z97E96633_8259_4DC5_ACCE_5D6258DEEDF2 10 | 11 | #include 12 | 13 | using cc::operator<<; 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /include/ccbase/tuple/print.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: print.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 08/12/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef ZC216C426_75CD_4BC3_B7CC_5B44145C130F 9 | #define ZC216C426_75CD_4BC3_B7CC_5B44145C130F 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | namespace cc { 17 | namespace detail { 18 | 19 | template 20 | struct print_tuple 21 | { 22 | static void apply(Stream& os, const Tuple t) 23 | { 24 | os << std::get(t) << ", "; 25 | return print_tuple::apply(os, t); 26 | } 27 | }; 28 | 29 | template 30 | struct print_tuple 31 | { 32 | static void apply(Stream& os, const Tuple t) 33 | { 34 | os << std::get(t) << ")"; 35 | } 36 | }; 37 | 38 | } 39 | 40 | template , class... Us> 41 | auto operator<<(std::basic_ostream& os, const std::tuple t) 42 | noexcept -> decltype(os) 43 | { 44 | if (sizeof...(Us) == 0) { 45 | return os; 46 | } 47 | 48 | os << "("; 49 | detail::print_tuple<0, sizeof...(Us) - 1, decltype(os), decltype(t)>::apply(os, t); 50 | return os; 51 | } 52 | 53 | } 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /include/ccbase/unit_test.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: unit_test.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 08/12/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef ZA0EB8F34_AE75_4C6A_9C81_D5F859C78C13 9 | #define ZA0EB8F34_AE75_4C6A_9C81_D5F859C78C13 10 | 11 | #include 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /include/ccbase/unit_test/module.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: module.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 07/15/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z0D8274E6_5C59_4EAE_A9D0_D83E87C7BF49 9 | #define Z0D8274E6_5C59_4EAE_A9D0_D83E87C7BF49 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | namespace cc { 16 | namespace detail { 17 | 18 | class module 19 | { 20 | public: 21 | using size_type = std::size_t; 22 | using list = std::vector; 23 | using iterator = typename list::iterator; 24 | using const_iterator = typename list::const_iterator; 25 | private: 26 | list r{}; 27 | size_type l; 28 | const char* n{nullptr}; 29 | const char* d{nullptr}; 30 | public: 31 | explicit module() noexcept {} 32 | 33 | explicit module(const char* n, const size_type l) 34 | noexcept : l{l}, n{n} {} 35 | 36 | explicit module(const char* n, const size_type l, const char* d) 37 | noexcept : l{l}, n{n}, d{d} {} 38 | 39 | size_type line() const { return l; } 40 | const char* name() const { return n; } 41 | const char* description() const { return d; } 42 | 43 | template 44 | void add(Ts&&... ts) 45 | { 46 | r.emplace_back(std::forward(ts)...); 47 | } 48 | 49 | unsigned passed() const 50 | { 51 | unsigned p{0}; 52 | for (const auto& i : r) { 53 | p += i; 54 | } 55 | return p; 56 | } 57 | 58 | unsigned failed() const 59 | { 60 | unsigned f{0}; 61 | for (const auto& i : r) { 62 | f += !i; 63 | } 64 | return f; 65 | } 66 | 67 | unsigned total() const 68 | { 69 | return r.size(); 70 | } 71 | 72 | iterator begin() { return r.begin(); } 73 | iterator end() { return r.end(); } 74 | const_iterator cbegin() const { return r.cbegin(); } 75 | const_iterator cend() const { return r.cend(); } 76 | }; 77 | 78 | typename module::iterator 79 | begin(module m) 80 | { 81 | return m.begin(); 82 | } 83 | 84 | typename module::iterator 85 | end(module m) 86 | { 87 | return m.end(); 88 | } 89 | 90 | typename module::const_iterator 91 | cbegin(const module m) 92 | { 93 | return m.cbegin(); 94 | } 95 | 96 | typename module::const_iterator 97 | cend(const module m) 98 | { 99 | return m.cend(); 100 | } 101 | 102 | } 103 | } 104 | 105 | #endif 106 | -------------------------------------------------------------------------------- /include/ccbase/unit_test/module_list.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: module_list.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 07/15/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z84D931C7_5FDA_41C6_8372_6587A760C35A 9 | #define Z84D931C7_5FDA_41C6_8372_6587A760C35A 10 | 11 | #include 12 | 13 | namespace cc { 14 | namespace detail { 15 | 16 | class module_list 17 | { 18 | public: 19 | using size_type = typename result::size_type; 20 | using list = std::vector; 21 | using iterator = typename list::iterator; 22 | using const_iterator = typename list::const_iterator; 23 | private: 24 | static std::vector l; 25 | public: 26 | template 27 | static bool add(Ts&&... ts) 28 | { 29 | l.emplace_back(std::forward(ts)...); 30 | return true; 31 | } 32 | 33 | template 34 | static bool require(const size_type line, Ts&&... ts) 35 | { 36 | unsigned i{0}; 37 | do ++i; while (i < l.size() && l[i].line() < line); 38 | --i; 39 | l[i].add(line, std::forward(ts)...); 40 | return true; 41 | } 42 | 43 | static iterator begin() { return l.begin(); } 44 | static iterator end() { return l.end(); } 45 | static const_iterator cbegin() { return l.cbegin(); } 46 | static const_iterator cend() { return l.cend(); } 47 | }; 48 | 49 | std::vector module_list::l{}; 50 | 51 | typename module_list::iterator 52 | begin(module_list m) 53 | { 54 | return m.begin(); 55 | } 56 | 57 | typename module_list::iterator 58 | end(module_list m) 59 | { 60 | return m.end(); 61 | } 62 | 63 | typename module_list::const_iterator 64 | cbegin(const module_list m) 65 | { 66 | return m.cbegin(); 67 | } 68 | 69 | typename module_list::const_iterator 70 | cend(const module_list m) 71 | { 72 | return m.cend(); 73 | } 74 | 75 | }} 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /include/ccbase/unit_test/result.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: result.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 07/15/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z267B316A_BF50_4FF8_A898_D95A04FD7914 9 | #define Z267B316A_BF50_4FF8_A898_D95A04FD7914 10 | 11 | #include 12 | #include 13 | 14 | namespace cc { 15 | namespace detail { 16 | 17 | class result 18 | { 19 | public: 20 | using size_type = std::size_t; 21 | private: 22 | std::string s; 23 | size_type l; 24 | bool b; 25 | public: 26 | result(size_type l, const char* s, const bool b) 27 | noexcept : s{format("require($)", s)}, l{l}, b{b} {} 28 | 29 | operator bool() const { return b; } 30 | const char* source() const { return s.c_str(); } 31 | size_type line() const { return l; } 32 | }; 33 | 34 | }} 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /include/configuration.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: configuration.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 06/12/2014 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z86A588AA_6D5A_4CA1_B36E_3EE127F9AF1D 9 | #define Z86A588AA_6D5A_4CA1_B36E_3EE127F9AF1D 10 | 11 | // Number of times to run each method. 12 | static constexpr auto num_trials = 5; 13 | // Special byte value used to verify correctness for the read benchmark. 14 | static constexpr auto needle = uint8_t{0xFF}; 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /include/copy_common.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: copy_common.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 06/16/2014 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef ZD867F4DE_A8CC_4B2A_807C_F44862C521A4 9 | #define ZD867F4DE_A8CC_4B2A_807C_F44862C521A4 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | static void 17 | copy_loop(int in, int out, uint8_t* buf, size_t buf_size) 18 | { 19 | auto off = off_t{0}; 20 | for (;;) { 21 | auto r = full_read(in, buf, buf_size, off).get(); 22 | auto s = full_write(out, buf, r, off).get(); 23 | assert(r == s); 24 | if (size_t(r) < buf_size) { return; } 25 | off += buf_size; 26 | } 27 | } 28 | 29 | static void 30 | copy_worker( 31 | int fd, 32 | uint8_t* buf1, 33 | uint8_t* buf2, 34 | size_t buf_size, 35 | std::atomic& cv1, 36 | std::atomic& cv2 37 | ) 38 | { 39 | auto r = int{}; 40 | auto s = int{}; 41 | auto off = off_t{0}; 42 | auto buf1_active = false; 43 | 44 | for (;;) { 45 | if (buf1_active) { 46 | while (cv2.load(std::memory_order_acquire) == -1) {} 47 | s = cv2.load(std::memory_order_relaxed); 48 | r = full_write(fd, buf2, s, off).get(); 49 | if (size_t(s) < buf_size) { return; } 50 | cv2.store(-1, std::memory_order_release); 51 | } 52 | else { 53 | while (cv1.load(std::memory_order_acquire) == -1) {} 54 | s = cv1.load(std::memory_order_relaxed); 55 | r = full_write(fd, buf1, s, off).get(); 56 | if (size_t(s) < buf_size) { return; } 57 | cv1.store(-1, std::memory_order_release); 58 | } 59 | assert(r == s); 60 | buf1_active = !buf1_active; 61 | off += s; 62 | } 63 | } 64 | 65 | /* 66 | ** Note: this ends up being slower than other methods, because disk requests are 67 | ** serialized anyway. 68 | */ 69 | static void 70 | async_copy_loop( 71 | int in, 72 | int out, 73 | uint8_t* buf1, 74 | uint8_t* buf2, 75 | size_t buf_size 76 | ) 77 | { 78 | auto r = full_read(in, buf1, buf_size, 0).get(); 79 | if (size_t(r) < buf_size) { 80 | auto s = full_write(out, buf1, r, 0).get(); 81 | assert(r == s); 82 | return; 83 | } 84 | 85 | std::atomic cv1(buf_size); 86 | std::atomic cv2{-1}; 87 | auto off = off_t(buf_size); 88 | auto buf1_active = false; 89 | auto t = std::thread(copy_worker, out, buf1, buf2, buf_size, 90 | std::ref(cv1), std::ref(cv2)); 91 | 92 | for (;;) { 93 | if (buf1_active) { 94 | while (cv1.load(std::memory_order_acquire) != -1) {} 95 | r = full_read(in, buf1, buf_size, off).get(); 96 | cv1.store(r, std::memory_order_release); 97 | if (size_t(r) < buf_size) { goto exit; } 98 | } 99 | else { 100 | while (cv2.load(std::memory_order_acquire) != -1) {} 101 | r = full_read(in, buf2, buf_size, off).get(); 102 | cv2.store(r, std::memory_order_release); 103 | if (size_t(r) < buf_size) { goto exit; } 104 | } 105 | buf1_active = !buf1_active; 106 | off += buf_size; 107 | } 108 | exit: 109 | t.join(); 110 | } 111 | 112 | static auto 113 | copy_plain(const char* src, const char* dst, size_t buf_size) 114 | { 115 | auto in = safe_open(src, O_RDONLY).get(); 116 | auto out = safe_open(dst, O_RDWR | O_CREAT | O_TRUNC).get(); 117 | auto buf = std::unique_ptr(new uint8_t[buf_size]); 118 | copy_loop(in, out, buf.get(), buf_size); 119 | ::close(in); 120 | ::close(out); 121 | } 122 | 123 | static auto 124 | copy_async(const char* src, const char* dst, size_t buf_size) 125 | { 126 | auto in = safe_open(src, O_RDONLY).get(); 127 | auto out = safe_open(dst, O_RDWR | O_CREAT | O_TRUNC).get(); 128 | auto buf1 = std::unique_ptr(new uint8_t[buf_size]); 129 | auto buf2 = std::unique_ptr(new uint8_t[buf_size]); 130 | async_copy_loop(in, out, buf1.get(), buf2.get(), buf_size); 131 | ::close(in); 132 | ::close(out); 133 | } 134 | 135 | #if PLATFORM_KERNEL == PLATFORM_KERNEL_LINUX 136 | 137 | static cc::expected> 138 | make_pipe() 139 | { 140 | auto pipe = std::array{}; 141 | if (::pipe(pipe.data()) == -1) { 142 | return current_system_error(); 143 | } 144 | return std::make_tuple(pipe[0], pipe[1]); 145 | } 146 | 147 | static auto 148 | splice_loop( 149 | int in_fd, 150 | int out_fd, 151 | int in_pipe, 152 | int out_pipe, 153 | size_t buf_size, 154 | off_t file_size 155 | ) 156 | { 157 | assert(file_size > 0); 158 | assert(buf_size > 0); 159 | 160 | static constexpr auto flags = SPLICE_F_MOVE | SPLICE_F_MORE; 161 | auto off = off_t{}; 162 | 163 | for (;;) { 164 | auto r = ::splice(in_fd, nullptr, in_pipe, nullptr, buf_size, flags); 165 | if (r == -1) { throw current_system_error(); } 166 | auto s = ::splice(out_pipe, nullptr, out_fd, nullptr, buf_size, flags); 167 | if (s == -1) { throw current_system_error(); } 168 | 169 | assert(r == s); 170 | off += r; 171 | if (off == file_size) { break; } 172 | } 173 | } 174 | 175 | #endif 176 | 177 | #endif 178 | -------------------------------------------------------------------------------- /include/io_common.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: io_common.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 06/11/2014 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z3BD34381_B22E_4963_8FB9_A5B89E9AFB9A 9 | #define Z3BD34381_B22E_4963_8FB9_A5B89E9AFB9A 10 | 11 | #include 12 | #include 13 | 14 | #if PLATFORM_KERNEL == PLATFORM_KERNEL_LINUX || \ 15 | PLATFORM_KERNEL == PLATFORM_KERNEL_XNU 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #else 23 | #error "Unsupported kernel." 24 | #endif 25 | 26 | static std::system_error 27 | current_system_error() 28 | { return std::system_error{errno, std::system_category()}; } 29 | 30 | static cc::expected 31 | full_read(int fd, uint8_t* buf, size_t count, off_t offset) 32 | { 33 | auto c = size_t{0}; 34 | do { 35 | auto r = ::pread(fd, buf + c, count - c, offset + c); 36 | if (r > 0) { 37 | c += r; 38 | } 39 | else if (r == 0) { 40 | return c; 41 | } 42 | else { 43 | if (errno == EINTR) { continue; } 44 | return current_system_error(); 45 | } 46 | } 47 | while (c < count); 48 | return c; 49 | } 50 | 51 | static cc::expected 52 | full_write(int fd, uint8_t* buf, size_t count, off_t offset) 53 | { 54 | auto c = size_t{0}; 55 | do { 56 | auto r = ::pwrite(fd, buf + c, count - c, offset + c); 57 | if (r > 0) { 58 | c += r; 59 | } 60 | else if (r == 0) { 61 | return c; 62 | } 63 | else { 64 | if (errno == EINTR) { continue; } 65 | return current_system_error(); 66 | } 67 | } 68 | while (c < count); 69 | return c; 70 | } 71 | 72 | static cc::expected 73 | safe_open(const char* path, int flags) 74 | { 75 | auto r = int{}; 76 | do { 77 | r = ::open(path, flags, S_IRUSR | S_IWUSR); 78 | } 79 | while (r == -1 && errno == EINTR); 80 | 81 | if (r == -1) { return current_system_error(); } 82 | return r; 83 | } 84 | 85 | static cc::expected 86 | safe_close(int fd) 87 | { 88 | auto r = ::close(fd); 89 | if (r == 0) { return true; } 90 | if (errno != EINTR) { return current_system_error(); } 91 | 92 | for (;;) { 93 | r = ::close(fd); 94 | if (errno == EBADF) { return true; } 95 | if (errno != EINTR) { return current_system_error(); } 96 | } 97 | } 98 | 99 | static cc::expected 100 | file_size(int fd) 101 | { 102 | using stat = struct stat; 103 | auto st = stat{}; 104 | auto r = ::fstat(fd, &st); 105 | if (r == -1) { return current_system_error(); } 106 | return st.st_size; 107 | } 108 | 109 | namespace detail { 110 | 111 | struct malloc_deleter 112 | { 113 | void operator()(uint8_t* p) const noexcept 114 | { std::free(p); } 115 | }; 116 | 117 | using buffer_type = std::unique_ptr; 118 | 119 | } 120 | 121 | static detail::buffer_type 122 | allocate_aligned(size_t align, size_t count) 123 | { 124 | auto p = (uint8_t*)nullptr; 125 | auto r = ::posix_memalign((void**)&p, align, count); 126 | if (r != 0) { throw std::system_error{r, std::system_category()}; } 127 | return detail::buffer_type{p}; 128 | } 129 | 130 | static void 131 | truncate(int fd, off_t fs) 132 | { 133 | if (::ftruncate(fd, fs) == -1) { 134 | throw current_system_error(); 135 | } 136 | } 137 | 138 | #if PLATFORM_KERNEL == PLATFORM_KERNEL_XNU 139 | 140 | static inline cc::expected 141 | purge_cache() 142 | { 143 | if (std::system("purge") == -1) { 144 | throw std::runtime_error{"Failed to purge cache."}; 145 | } 146 | return true; 147 | } 148 | 149 | static void 150 | preallocate(int fd, size_t count) 151 | { 152 | struct fstore fs; 153 | fs.fst_posmode = F_ALLOCATECONTIG; 154 | fs.fst_offset = F_PEOFPOSMODE; 155 | fs.fst_length = count; 156 | if (::fcntl(fd, F_PREALLOCATE, &fs) == -1) { 157 | fs.fst_posmode = F_ALLOCATEALL; 158 | if (::fcntl(fd, F_PREALLOCATE, &fs) == -1) { 159 | throw std::runtime_error{"Warning: failed to preallocate space."}; 160 | } 161 | } 162 | } 163 | 164 | static void 165 | disable_cache(int fd) 166 | { 167 | if (::fcntl(fd, F_NOCACHE, 1) == -1) { 168 | throw current_system_error(); 169 | } 170 | } 171 | 172 | static void 173 | enable_rdahead(int fd) 174 | { 175 | if (::fcntl(fd, F_RDAHEAD, 1) == -1) { 176 | throw std::system_error{errno, std::system_category()}; 177 | } 178 | } 179 | 180 | static void 181 | enable_rdadvise(int fd, off_t fs) 182 | { 183 | using radvisory = struct radvisory; 184 | auto rd = radvisory{}; 185 | rd.ra_offset = 0; 186 | rd.ra_count = fs; 187 | if (::fcntl(fd, F_RDADVISE, &rd) == -1) { 188 | throw std::system_error{errno, std::system_category()}; 189 | } 190 | } 191 | 192 | #elif PLATFORM_KERNEL == PLATFORM_KERNEL_LINUX 193 | 194 | static inline cc::expected 195 | purge_cache() 196 | { 197 | if (std::system("sync; echo 3 > /proc/sys/vm/drop_caches") == -1) { 198 | throw std::runtime_error{"Failed to purge cache."}; 199 | } 200 | return true; 201 | } 202 | 203 | static void 204 | fadvise_sequential_read(int fd, off_t fs) 205 | { 206 | // It turns out that this makes things slower on the machines that I 207 | // tested. 208 | // ::posix_fadvise(fd, 0, fs, POSIX_FADV_WILLNEED); 209 | ::posix_fadvise(fd, 0, fs, POSIX_FADV_NOREUSE); 210 | ::posix_fadvise(fd, 0, fs, POSIX_FADV_SEQUENTIAL); 211 | } 212 | 213 | static void 214 | preallocate(int fd, size_t count) 215 | { 216 | if (::fallocate(fd, 0, 0, count) == -1) { 217 | throw current_system_error(); 218 | } 219 | } 220 | 221 | static void 222 | truncate(int fd, size_t count) 223 | { 224 | if (::ftruncate(fd, count) == -1) { 225 | throw current_system_error(); 226 | } 227 | } 228 | 229 | #endif 230 | 231 | #endif 232 | -------------------------------------------------------------------------------- /include/read_common.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: read_common.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 06/16/2014 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef Z7FE6A1BA_51C8_492E_97C4_983095F7E88E 9 | #define Z7FE6A1BA_51C8_492E_97C4_983095F7E88E 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | static auto 18 | read_loop(int fd, uint8_t* buf, size_t buf_size) 19 | { 20 | auto off = off_t{0}; 21 | auto count = off_t{0}; 22 | 23 | for (;;) { 24 | auto n = (size_t)full_read(fd, buf, buf_size, off).get(); 25 | count += std::count_if(buf, buf + n, 26 | [](auto x) { return x == needle; }); 27 | if (n < buf_size) { break; } 28 | off += n; 29 | } 30 | return count; 31 | } 32 | 33 | static auto 34 | aio_read_loop(int fd, uint8_t* buf1, uint8_t* buf2, size_t buf_size) 35 | { 36 | using aiocb = struct aiocb; 37 | auto cb = aiocb{}; 38 | cb.aio_fildes = fd; 39 | cb.aio_nbytes = buf_size; 40 | 41 | auto l = std::array{{&cb}}; 42 | auto off = off_t{0}; 43 | auto count = off_t{0}; 44 | 45 | auto buf1_active = true; 46 | auto n = full_read(fd, buf1, buf_size, off).get(); 47 | if (size_t(n) < buf_size) { 48 | return (off_t)std::count_if(buf1, buf1 + n, 49 | [](auto x) { return x == needle; }); 50 | } 51 | off += buf_size; 52 | 53 | for (;;) { 54 | if (buf1_active) { 55 | cb.aio_buf = buf2; 56 | cb.aio_offset = off; 57 | if (::aio_read(&cb) == -1) { throw current_system_error(); } 58 | 59 | count += std::count_if(buf1, buf1 + buf_size, 60 | [](auto x) { return x == needle; }); 61 | } 62 | else { 63 | cb.aio_buf = buf1; 64 | cb.aio_offset = off; 65 | if (::aio_read(&cb) == -1) { throw current_system_error(); } 66 | 67 | count += std::count_if(buf2, buf2 + buf_size, 68 | [](auto x) { return x == needle; }); 69 | } 70 | 71 | buf1_active = !buf1_active; 72 | if (::aio_suspend(l.data(), 1, nullptr) == -1) { throw current_system_error(); } 73 | if (::aio_error(&cb) == -1) { throw current_system_error(); } 74 | n = ::aio_return(&cb); 75 | if (n == -1) { throw current_system_error(); } 76 | 77 | if (size_t(n) < buf_size) { 78 | if (buf1_active) { 79 | count += std::count_if(buf1, buf1 + n, 80 | [](auto x) { return x == needle; }); 81 | } 82 | else { 83 | count += std::count_if(buf2, buf2 + n, 84 | [](auto x) { return x == needle; }); 85 | } 86 | return count; 87 | } 88 | off += buf_size; 89 | } 90 | } 91 | 92 | static void 93 | read_worker( 94 | int fd, 95 | uint8_t* buf1, 96 | uint8_t* buf2, 97 | size_t buf_size, 98 | std::atomic& cv1, 99 | std::atomic& cv2 100 | ) 101 | { 102 | auto r = int{}; 103 | auto off = off_t(buf_size); 104 | auto buf1_active = true; 105 | 106 | for (;;) { 107 | if (buf1_active) { 108 | while (cv2.load(std::memory_order_acquire) != -1) {} 109 | r = full_read(fd, buf2, buf_size, off).get(); 110 | cv2.store(r, std::memory_order_release); 111 | } 112 | else { 113 | while (cv1.load(std::memory_order_acquire) != -1) {} 114 | r = full_read(fd, buf1, buf_size, off).get(); 115 | cv1.store(r, std::memory_order_release); 116 | } 117 | if (size_t(r) < buf_size) { return; } 118 | buf1_active = !buf1_active; 119 | off += buf_size; 120 | } 121 | } 122 | 123 | static auto 124 | async_read_loop(int fd, uint8_t* buf1, uint8_t* buf2, size_t buf_size) 125 | { 126 | auto r = full_read(fd, buf1, buf_size, 0).get(); 127 | if (size_t(r) < buf_size) { 128 | return (off_t)std::count_if(buf1, buf1 + r, 129 | [](auto x) { return x == needle; }); 130 | } 131 | 132 | std::atomic cv1(buf_size); 133 | std::atomic cv2{-1}; 134 | auto count = off_t{0}; 135 | auto buf1_active = true; 136 | auto t = std::thread(read_worker, fd, buf1, buf2, buf_size, 137 | std::ref(cv1), std::ref(cv2)); 138 | 139 | for (;;) { 140 | if (buf1_active) { 141 | while (cv1.load(std::memory_order_acquire) == -1) {} 142 | r = cv1.load(std::memory_order_relaxed); 143 | count += std::count_if(buf1, buf1 + r, 144 | [](auto x) { return x == needle; }); 145 | if (size_t(r) < buf_size) { goto exit; } 146 | cv1.store(-1, std::memory_order_release); 147 | } 148 | else { 149 | while (cv2.load(std::memory_order_acquire) == -1) {} 150 | r = cv2.load(std::memory_order_relaxed); 151 | count += std::count_if(buf2, buf2 + r, 152 | [](auto x) { return x == needle; }); 153 | if (size_t(r) < buf_size) { goto exit; } 154 | cv2.store(-1, std::memory_order_release); 155 | } 156 | buf1_active = !buf1_active; 157 | } 158 | exit: 159 | t.join(); 160 | return count; 161 | } 162 | 163 | static auto 164 | check(const char* path) 165 | { 166 | static constexpr auto buf_size = 65536; 167 | auto fd = safe_open(path, O_RDONLY).get(); 168 | auto buf = std::unique_ptr(new uint8_t[buf_size]); 169 | auto count = read_loop(fd, buf.get(), buf_size); 170 | ::close(fd); 171 | return count; 172 | } 173 | 174 | static auto 175 | read_plain(const char* path, size_t buf_size) 176 | { 177 | auto fd = safe_open(path, O_RDONLY).get(); 178 | auto buf = std::unique_ptr(new uint8_t[buf_size]); 179 | auto count = read_loop(fd, buf.get(), buf_size); 180 | ::close(fd); 181 | return count; 182 | } 183 | 184 | static auto 185 | read_mmap_plain(const char* path) 186 | { 187 | auto fd = safe_open(path, O_RDONLY).get(); 188 | auto fs = file_size(fd).get(); 189 | auto p = (uint8_t*)::mmap(nullptr, fs, PROT_READ, MAP_SHARED, fd, 0); 190 | auto count = std::count_if(p, p + fs, [](auto x) { return x == needle; }); 191 | ::munmap(p, fs); 192 | return count; 193 | } 194 | 195 | #endif 196 | -------------------------------------------------------------------------------- /include/test.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: test.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 06/12/2014 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef ZD477B76C_977A_4861_963D_3C448BD98F34 9 | #define ZD477B76C_977A_4861_963D_3C448BD98F34 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | static void 20 | print_header() 21 | { 22 | std::printf("%s, %s, %s, %s\n", "File Size", "Method", "Mean (ms)", "Stddev (ms)"); 23 | std::fflush(stdout); 24 | } 25 | 26 | /* 27 | ** The `*_read` and `*_write` functions have not been abstracted into one 28 | ** function, because clang was emitting bad code or getting ICE's when nested 29 | ** lambdas were used in certain situations. 30 | */ 31 | 32 | template 33 | static void test_read( 34 | const Function& func, 35 | const char* name, 36 | unsigned count, 37 | off_t file_size 38 | ) 39 | { 40 | using std::chrono::high_resolution_clock; 41 | using std::chrono::duration_cast; 42 | using std::chrono::duration; 43 | using milliseconds = duration>; 44 | 45 | auto mean = double{0}; 46 | auto sample = std::array{}; 47 | 48 | for (auto i = 0; i != num_trials; ++i) { 49 | auto t1 = high_resolution_clock::now(); 50 | if (func() != count) { throw std::runtime_error{"Mismatching count."}; } 51 | auto t2 = high_resolution_clock::now(); 52 | auto ms = duration_cast(t2 - t1).count(); 53 | sample[i] = ms; 54 | mean += ms; 55 | purge_cache().get(); 56 | } 57 | 58 | mean /= num_trials; 59 | auto stddev = std::sqrt(1.0 / num_trials * boost::accumulate( 60 | sample, 0.0, [&](auto x, auto y) { 61 | return x + std::pow(y - mean, 2); 62 | })); 63 | 64 | std::printf("%jd, %s, %f, %f\n", file_size, name, mean, stddev); 65 | std::fflush(stdout); 66 | } 67 | 68 | template 69 | static void test_read_range( 70 | const Function& func, 71 | const char* path, 72 | const char* name, 73 | const Range& range, 74 | off_t file_size, 75 | unsigned count 76 | ) 77 | { 78 | static constexpr auto kb = 1024; 79 | auto buf = std::array{}; 80 | 81 | for (const auto& bs : range) { 82 | if (bs * kb <= file_size) { 83 | std::snprintf(buf.data(), 64, "%s %d KB", name, bs); 84 | test_read(std::bind(func, path, bs * kb), buf.data(), count, file_size); 85 | } 86 | } 87 | } 88 | 89 | template 90 | static void test_write(const Function& func, const char* name, off_t count) 91 | { 92 | using std::chrono::high_resolution_clock; 93 | using std::chrono::duration_cast; 94 | using std::chrono::duration; 95 | using milliseconds = duration>; 96 | 97 | auto mean = double{0}; 98 | auto sample = std::array{}; 99 | 100 | for (auto i = 0; i != num_trials; ++i) { 101 | auto t1 = high_resolution_clock::now(); 102 | func(); 103 | auto t2 = high_resolution_clock::now(); 104 | auto ms = duration_cast(t2 - t1).count(); 105 | sample[i] = ms; 106 | mean += ms; 107 | } 108 | 109 | mean /= num_trials; 110 | auto stddev = std::sqrt(1.0 / num_trials * boost::accumulate( 111 | sample, 0.0, [&](auto x, auto y) { 112 | return x + std::pow(y - mean, 2); 113 | })); 114 | 115 | std::printf("%jd, %s, %f, %f\n", count, name, mean, stddev); 116 | std::fflush(stdout); 117 | } 118 | 119 | template 120 | static void test_write_range( 121 | const Function& func, 122 | const char* path, 123 | const char* name, 124 | const Range& range, 125 | off_t count 126 | ) 127 | { 128 | static constexpr auto kb = 1024; 129 | auto buf = std::array{}; 130 | 131 | for (const auto& bs : range) { 132 | if (bs * kb <= count) { 133 | std::snprintf(buf.data(), 64, "%s %d KB", name, bs); 134 | test_write(std::bind(func, path, bs * kb), buf.data(), count); 135 | } 136 | } 137 | } 138 | 139 | template 140 | static void test_copy_range( 141 | const Function& func, 142 | const char* src, 143 | const char* dst, 144 | const char* name, 145 | const Range& range, 146 | off_t count 147 | ) 148 | { 149 | static constexpr auto kb = 1024; 150 | auto buf = std::array{}; 151 | 152 | for (const auto& bs : range) { 153 | if (bs * kb <= count) { 154 | std::snprintf(buf.data(), 64, "%s %d KB", name, bs); 155 | test_write(std::bind(func, src, dst, bs * kb), buf.data(), count); 156 | } 157 | } 158 | } 159 | 160 | #endif 161 | -------------------------------------------------------------------------------- /include/write_common.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: write_common.hpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 06/16/2014 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #ifndef ZFD327A4C_B13C_4813_9572_DDC0936536FE 9 | #define ZFD327A4C_B13C_4813_9572_DDC0936536FE 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | static void 17 | fill_buffer(uint8_t* p, size_t count) 18 | { 19 | auto gen = std::mt19937{std::random_device{}()}; 20 | auto dist = std::uniform_int_distribution(0, 255); 21 | std::generate(p, p + count, [&]() { return dist(gen); }); 22 | } 23 | 24 | static auto 25 | write_loop(int fd, uint8_t* buf, size_t buf_size, size_t count) 26 | { 27 | for (auto off = off_t{0}; off < off_t(count); off += buf_size) { 28 | fill_buffer(buf, buf_size); 29 | auto r = full_write(fd, buf, buf_size, off); 30 | assert(r == buf_size); 31 | } 32 | } 33 | 34 | static void 35 | write_worker( 36 | int fd, 37 | uint8_t* buf1, 38 | uint8_t* buf2, 39 | std::atomic& cv1, 40 | std::atomic& cv2 41 | ) 42 | { 43 | auto r = int{}; 44 | auto s = int{}; 45 | auto off = off_t{0}; 46 | auto buf1_active = false; 47 | 48 | for (;;) { 49 | if (buf1_active) { 50 | while (cv2.load(std::memory_order_acquire) == -1) {} 51 | s = cv2.load(std::memory_order_relaxed); 52 | if (s == -2) { return; } 53 | r = full_write(fd, buf2, s, off).get(); 54 | cv2.store(-1, std::memory_order_release); 55 | } 56 | else { 57 | while (cv1.load(std::memory_order_acquire) == -1) {} 58 | s = cv1.load(std::memory_order_relaxed); 59 | if (s == -2) { return; } 60 | r = full_write(fd, buf1, s, off).get(); 61 | cv1.store(-1, std::memory_order_release); 62 | } 63 | assert(r == s); 64 | buf1_active = !buf1_active; 65 | off += s; 66 | } 67 | } 68 | 69 | static void 70 | async_write_loop( 71 | int fd, 72 | uint8_t* buf1, 73 | uint8_t* buf2, 74 | size_t buf_size, 75 | size_t count 76 | ) 77 | { 78 | if (count <= buf_size) { 79 | fill_buffer(buf1, count); 80 | auto r = full_write(fd, buf1, count, 0).get(); 81 | assert(r == count); 82 | return; 83 | } 84 | 85 | fill_buffer(buf1, buf_size); 86 | std::atomic cv1(buf_size); 87 | std::atomic cv2{-1}; 88 | auto rem = count - buf_size; 89 | auto buf1_active = false; 90 | auto t = std::thread(write_worker, fd, buf1, buf2, 91 | std::ref(cv1), std::ref(cv2)); 92 | 93 | for (;;) { 94 | if (buf1_active) { 95 | while (cv1.load(std::memory_order_acquire) != -1) {} 96 | if (rem > buf_size) { 97 | fill_buffer(buf1, buf_size); 98 | cv1.store(buf_size, std::memory_order_release); 99 | } 100 | else { 101 | fill_buffer(buf1, rem); 102 | cv1.store(-2, std::memory_order_release); 103 | goto exit; 104 | } 105 | } 106 | else { 107 | while (cv2.load(std::memory_order_acquire) != -1) {} 108 | if (rem > buf_size) { 109 | fill_buffer(buf2, buf_size); 110 | cv2.store(buf_size, std::memory_order_release); 111 | } 112 | else { 113 | fill_buffer(buf2, rem); 114 | cv2.store(-2, std::memory_order_release); 115 | goto exit; 116 | } 117 | } 118 | buf1_active = !buf1_active; 119 | rem -= buf_size; 120 | } 121 | exit: 122 | t.join(); 123 | } 124 | 125 | static void 126 | write_plain(const char* path, size_t buf_size, size_t count) 127 | { 128 | auto fd = safe_open(path, O_WRONLY | O_CREAT | O_TRUNC).get(); 129 | auto buf = std::unique_ptr{new uint8_t[buf_size]}; 130 | write_loop(fd, buf.get(), buf_size, count); 131 | ::close(fd); 132 | } 133 | 134 | static void 135 | write_async_plain(const char* path, size_t buf_size, size_t count) 136 | { 137 | auto fd = safe_open(path, O_WRONLY | O_CREAT | O_TRUNC).get(); 138 | auto buf1 = std::unique_ptr{new uint8_t[buf_size]}; 139 | auto buf2 = std::unique_ptr{new uint8_t[buf_size]}; 140 | async_write_loop(fd, buf1.get(), buf2.get(), buf_size, count); 141 | ::close(fd); 142 | } 143 | 144 | #endif 145 | -------------------------------------------------------------------------------- /reference/linux/aio_test_linux.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: aio_test_1.cpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 07/08/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | // For `__NR_*` system call definitions. 18 | #include 19 | #include 20 | 21 | static int 22 | io_setup(unsigned n, aio_context_t* c) 23 | { 24 | return syscall(__NR_io_setup, n, c); 25 | } 26 | 27 | static int 28 | io_destroy(aio_context_t c) 29 | { 30 | return syscall(__NR_io_destroy, c); 31 | } 32 | 33 | static int 34 | io_submit(aio_context_t c, long n, iocb** b) 35 | { 36 | return syscall(__NR_io_submit, c, n, b); 37 | } 38 | 39 | static int 40 | io_getevents(aio_context_t c, long min, long max, io_event* e, timespec* t) 41 | { 42 | return syscall(__NR_io_getevents, c, min, max, e, t); 43 | } 44 | 45 | int main() 46 | { 47 | using namespace std::chrono; 48 | static constexpr std::size_t n = 16384; 49 | 50 | // Initialize the file descriptor. If O_DIRECT is not used, the kernel 51 | // will block on `io_submit` until the job finishes, because non-direct 52 | // IO via the `aio` interface is not implemented. 53 | auto fd = open("dat/test.dat", O_RDONLY | O_DIRECT | O_NOATIME); 54 | if (fd < 0) { 55 | std::cerr << "open error" << std::endl; 56 | return EXIT_FAILURE; 57 | } 58 | 59 | char* p; 60 | auto r = ::posix_memalign((void**)&p, 512, n); 61 | if (r != 0) { 62 | std::cerr << "posix_memalign failed" << std::endl; 63 | return EXIT_FAILURE; 64 | } 65 | auto del = [](char* p) { std::free(p); }; 66 | std::unique_ptr buf{p, del}; 67 | 68 | // Initialize the IO context. 69 | aio_context_t c{0}; 70 | r = io_setup(128, &c); 71 | if (r < 0) { 72 | std::cerr << "io_setup error" << std::endl; 73 | return EXIT_FAILURE; 74 | } 75 | 76 | // Setup I/O control block. 77 | iocb b; 78 | std::memset(&b, 0, sizeof(b)); 79 | b.aio_fildes = fd; 80 | b.aio_lio_opcode = IOCB_CMD_PREAD; 81 | 82 | // Command-specific options for `pread`. 83 | b.aio_buf = (uint64_t)buf.get(); 84 | b.aio_offset = 0; 85 | b.aio_nbytes = n; 86 | iocb* bs[1] = {&b}; 87 | 88 | auto t1 = high_resolution_clock::now(); 89 | r = io_submit(c, 1, bs); 90 | if (r != 1) { 91 | if (r < 0) { 92 | std::cerr << "io_submit error" << std::endl; 93 | } 94 | else { 95 | std::cerr << "could not submit event" << std::endl; 96 | } 97 | return EXIT_FAILURE; 98 | } 99 | auto t2 = high_resolution_clock::now(); 100 | auto count = duration_cast>(t2 - t1).count(); 101 | std::cout << "Took " << count << " seconds to submit job." << std::endl; 102 | 103 | io_event e[1]; 104 | timespec t; 105 | t.tv_sec = 0; 106 | t.tv_nsec = 0; 107 | 108 | t1 = high_resolution_clock::now(); 109 | do { 110 | r = io_getevents(c, 1, 1, e, &t); 111 | std::cout << "Reading...\n"; 112 | } 113 | while (r == 0); 114 | t2 = high_resolution_clock::now(); 115 | count = duration_cast>(t2 - t1).count(); 116 | 117 | std::cout << "Waited for " << count << " seconds." << std::endl; 118 | std::cout << "Return code: " << r << "." << std::endl; 119 | //std::cout << buf.get() << std::endl; 120 | 121 | r = io_destroy(c); 122 | if (r < 0) { 123 | std::cerr << "io_destroy error" << std::endl; 124 | return EXIT_FAILURE; 125 | } 126 | return EXIT_SUCCESS; 127 | } 128 | -------------------------------------------------------------------------------- /reference/os_x/aio_test_os_x.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: aio_test_mac.cpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 07/08/2013 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | int main() 19 | { 20 | using namespace std::chrono; 21 | static constexpr std::size_t n = 81920; 22 | 23 | auto t1 = high_resolution_clock::now(); 24 | auto fd = open("dat/test.dat", O_RDONLY); 25 | if (fd < 0) { 26 | std::cerr << "open error" << std::endl; 27 | return EXIT_FAILURE; 28 | } 29 | if (::fcntl(fd, F_NOCACHE, 1) == -1) { 30 | std::cerr << "fcntl error" << std::endl; 31 | return EXIT_FAILURE; 32 | } 33 | auto t2 = high_resolution_clock::now(); 34 | auto c1 = duration_cast>(t2 - t1).count(); 35 | std::cout << "Time getting fd: " << c1 << std::endl; 36 | 37 | //char* p; 38 | //auto r = ::posix_memalign((void**)&p, 4096, n); 39 | //if (r != 0) { 40 | // std::cerr << "posix_memalign failed" << std::endl; 41 | // return EXIT_FAILURE; 42 | //} 43 | //auto del = [](char* p) { std::free(p); }; 44 | //std::unique_ptr buf{p, del}; 45 | t1 = high_resolution_clock::now(); 46 | std::unique_ptr buf{new char[n]}; 47 | t2 = high_resolution_clock::now(); 48 | auto c2 = duration_cast>(t2 - t1).count(); 49 | std::cout << "Time allocating buffer: " << c2 << std::endl; 50 | 51 | aiocb b; 52 | std::memset(&b, 0, sizeof(b)); 53 | b.aio_fildes = fd; 54 | b.aio_sigevent.sigev_notify = SIGEV_NONE; 55 | 56 | b.aio_buf = buf.get(); 57 | b.aio_offset = 0; 58 | b.aio_nbytes = n; 59 | 60 | t1 = high_resolution_clock::now(); 61 | if (aio_read(&b) != 0) { 62 | std::cerr << "read error" << std::endl; 63 | return EXIT_FAILURE; 64 | } 65 | t2 = high_resolution_clock::now(); 66 | auto c3 = duration_cast>(t2 - t1).count(); 67 | 68 | timespec t; 69 | t.tv_sec = 0; 70 | t.tv_nsec = 0; 71 | 72 | const aiocb* l[] = {&b}; 73 | 74 | t1 = high_resolution_clock::now(); 75 | while (aio_suspend(l, 1, &t) != 0) { 76 | std::cout << "Reading..." << std::endl; 77 | } 78 | t2 = high_resolution_clock::now(); 79 | auto c4 = duration_cast>(t2 - t1).count(); 80 | 81 | std::cout << "Time to submit: " << c3 << std::endl; 82 | std::cout << "Time spend waiting: " << c4 << std::endl; 83 | 84 | auto r = aio_return(&b); 85 | if (r == -1) { 86 | std::cerr << "error reading" << std::endl; 87 | return EXIT_FAILURE; 88 | } 89 | else { 90 | std::cout << r << " bytes read" << std::endl; 91 | return EXIT_SUCCESS; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /results/julie/read/read_16.csv: -------------------------------------------------------------------------------- 1 | File Size, Method, Mean (ms), Stddev (ms) 2 | 16777216, read_plain 4 Kb, 49.663585, 0.475444 3 | 16777216, read_plain 8 Kb, 49.832538, 0.408531 4 | 16777216, read_plain 12 Kb, 49.433244, 0.287925 5 | 16777216, read_plain 16 Kb, 49.251917, 0.542792 6 | 16777216, read_plain 24 Kb, 48.496201, 0.247126 7 | 16777216, read_plain 32 Kb, 48.436090, 0.190151 8 | 16777216, read_plain 40 Kb, 50.075122, 0.066877 9 | 16777216, read_plain 48 Kb, 50.146137, 0.065491 10 | 16777216, read_plain 56 Kb, 50.102773, 0.086445 11 | 16777216, read_plain 64 Kb, 50.143376, 0.051713 12 | 16777216, read_plain 256 Kb, 52.616099, 0.238311 13 | 16777216, read_plain 1024 Kb, 60.680622, 3.790453 14 | 16777216, read_plain 4096 Kb, 58.877700, 0.807865 15 | 16777216, read_plain 16384 Kb, 59.335702, 0.384453 16 | 16777216, read_direct 4 Kb, 249.734576, 5.231335 17 | 16777216, read_direct 8 Kb, 161.668132, 9.270740 18 | 16777216, read_direct 12 Kb, 127.028522, 11.231197 19 | 16777216, read_direct 16 Kb, 118.658742, 14.685690 20 | 16777216, read_direct 24 Kb, 94.956394, 8.098382 21 | 16777216, read_direct 32 Kb, 92.719162, 2.299758 22 | 16777216, read_direct 40 Kb, 90.403385, 2.147558 23 | 16777216, read_direct 48 Kb, 87.176010, 2.994028 24 | 16777216, read_direct 56 Kb, 86.173917, 0.814862 25 | 16777216, read_direct 64 Kb, 84.409558, 2.934792 26 | 16777216, read_direct 256 Kb, 72.934740, 3.232612 27 | 16777216, read_direct 1024 Kb, 61.669916, 3.576517 28 | 16777216, read_direct 4096 Kb, 61.752060, 2.697001 29 | 16777216, read_direct 16384 Kb, 58.232800, 3.579005 30 | 16777216, read_fadvise 4 Kb, 48.171093, 0.463176 31 | 16777216, read_fadvise 8 Kb, 47.459515, 0.198544 32 | 16777216, read_fadvise 12 Kb, 47.520655, 0.407281 33 | 16777216, read_fadvise 16 Kb, 47.327074, 0.184211 34 | 16777216, read_fadvise 24 Kb, 47.618964, 0.225103 35 | 16777216, read_fadvise 32 Kb, 47.875929, 0.445740 36 | 16777216, read_fadvise 40 Kb, 48.411045, 0.037239 37 | 16777216, read_fadvise 48 Kb, 48.713710, 0.863879 38 | 16777216, read_fadvise 56 Kb, 48.425020, 0.073165 39 | 16777216, read_fadvise 64 Kb, 48.992420, 0.951472 40 | 16777216, read_fadvise 256 Kb, 48.861803, 0.112181 41 | 16777216, read_fadvise 1024 Kb, 53.319433, 3.939563 42 | 16777216, read_fadvise 4096 Kb, 62.002839, 3.696841 43 | 16777216, read_fadvise 16384 Kb, 57.495263, 0.103138 44 | 16777216, aio_read_direct 4 Kb, 417.686975, 58.300546 45 | 16777216, aio_read_direct 8 Kb, 290.780883, 22.453843 46 | 16777216, aio_read_direct 12 Kb, 208.427376, 9.986053 47 | 16777216, aio_read_direct 16 Kb, 175.651968, 27.748160 48 | 16777216, aio_read_direct 24 Kb, 144.583171, 10.695254 49 | 16777216, aio_read_direct 32 Kb, 114.313573, 10.780034 50 | 16777216, aio_read_direct 40 Kb, 87.256742, 3.197049 51 | 16777216, aio_read_direct 48 Kb, 94.482333, 7.288248 52 | 16777216, aio_read_direct 56 Kb, 91.496341, 3.830116 53 | 16777216, aio_read_direct 64 Kb, 84.865191, 2.795898 54 | 16777216, aio_read_direct 256 Kb, 58.965621, 0.981930 55 | 16777216, aio_read_direct 1024 Kb, 52.119477, 0.289719 56 | 16777216, aio_read_direct 4096 Kb, 53.793722, 0.326364 57 | 16777216, aio_read_direct 16384 Kb, 56.698396, 0.376370 58 | 16777216, aio_read_fadvise 4 Kb, 49.459738, 0.534834 59 | 16777216, aio_read_fadvise 8 Kb, 48.164138, 0.629412 60 | 16777216, aio_read_fadvise 12 Kb, 48.064350, 0.251101 61 | 16777216, aio_read_fadvise 16 Kb, 48.810799, 0.948013 62 | 16777216, aio_read_fadvise 24 Kb, 47.710143, 0.176470 63 | 16777216, aio_read_fadvise 32 Kb, 47.942059, 0.265338 64 | 16777216, aio_read_fadvise 40 Kb, 48.595084, 0.080965 65 | 16777216, aio_read_fadvise 48 Kb, 48.678592, 0.043243 66 | 16777216, aio_read_fadvise 56 Kb, 48.757492, 0.409526 67 | 16777216, aio_read_fadvise 64 Kb, 48.626972, 0.248708 68 | 16777216, aio_read_fadvise 256 Kb, 48.635036, 0.253425 69 | 16777216, aio_read_fadvise 1024 Kb, 49.763634, 0.272446 70 | 16777216, aio_read_fadvise 4096 Kb, 52.136085, 1.009052 71 | 16777216, aio_read_fadvise 16384 Kb, 59.922381, 4.153305 72 | 16777216, read_async_plain 4 Kb, 50.421796, 0.468135 73 | 16777216, read_async_plain 8 Kb, 50.411670, 0.225911 74 | 16777216, read_async_plain 12 Kb, 51.149570, 0.412036 75 | 16777216, read_async_plain 16 Kb, 49.157598, 0.739959 76 | 16777216, read_async_plain 24 Kb, 48.613150, 0.645123 77 | 16777216, read_async_plain 32 Kb, 48.708710, 0.653014 78 | 16777216, read_async_plain 40 Kb, 50.029022, 0.689249 79 | 16777216, read_async_plain 48 Kb, 50.080192, 0.056531 80 | 16777216, read_async_plain 56 Kb, 50.236959, 0.423967 81 | 16777216, read_async_plain 64 Kb, 50.149803, 0.124622 82 | 16777216, read_async_plain 256 Kb, 50.322214, 0.204721 83 | 16777216, read_async_plain 1024 Kb, 50.760745, 0.209229 84 | 16777216, read_async_plain 4096 Kb, 53.416040, 0.974345 85 | 16777216, read_async_plain 16384 Kb, 61.365901, 4.105960 86 | 16777216, read_async_direct 4 Kb, 229.468989, 2.177977 87 | 16777216, read_async_direct 8 Kb, 136.732628, 0.724478 88 | 16777216, read_async_direct 12 Kb, 102.096250, 1.408858 89 | 16777216, read_async_direct 16 Kb, 88.544957, 2.005041 90 | 16777216, read_async_direct 24 Kb, 77.493666, 4.569241 91 | 16777216, read_async_direct 32 Kb, 67.025051, 1.144690 92 | 16777216, read_async_direct 40 Kb, 63.604255, 0.762289 93 | 16777216, read_async_direct 48 Kb, 61.467382, 2.648495 94 | 16777216, read_async_direct 56 Kb, 71.416485, 6.806987 95 | 16777216, read_async_direct 64 Kb, 72.721960, 0.281984 96 | 16777216, read_async_direct 256 Kb, 54.577500, 0.481780 97 | 16777216, read_async_direct 1024 Kb, 50.174594, 0.763868 98 | 16777216, read_async_direct 4096 Kb, 51.035060, 0.538106 99 | 16777216, read_async_direct 16384 Kb, 58.504075, 0.442549 100 | 16777216, read_async_fadvise 4 Kb, 48.360066, 0.215797 101 | 16777216, read_async_fadvise 8 Kb, 47.563389, 0.283465 102 | 16777216, read_async_fadvise 12 Kb, 47.736607, 0.253365 103 | 16777216, read_async_fadvise 16 Kb, 47.975255, 0.504284 104 | 16777216, read_async_fadvise 24 Kb, 47.909315, 0.763470 105 | 16777216, read_async_fadvise 32 Kb, 48.124733, 0.093210 106 | 16777216, read_async_fadvise 40 Kb, 48.788107, 0.739732 107 | 16777216, read_async_fadvise 48 Kb, 48.739756, 0.851514 108 | 16777216, read_async_fadvise 56 Kb, 48.541168, 0.182438 109 | 16777216, read_async_fadvise 64 Kb, 48.256295, 0.103769 110 | 16777216, read_async_fadvise 256 Kb, 48.779308, 0.162361 111 | 16777216, read_async_fadvise 1024 Kb, 49.303764, 0.618612 112 | 16777216, read_async_fadvise 4096 Kb, 50.757784, 0.285000 113 | 16777216, read_async_fadvise 16384 Kb, 63.687525, 4.030644 114 | 16777216, mmap_plain, 51.023704, 0.140795 115 | 16777216, mmap_direct, 51.106279, 0.251891 116 | 16777216, mmap_fadvise, 49.209852, 0.150294 117 | -------------------------------------------------------------------------------- /results/julie/read/read_32.csv: -------------------------------------------------------------------------------- 1 | File Size, Method, Mean (ms), Stddev (ms) 2 | 33554432, read_plain 4 Kb, 97.283921, 0.248044 3 | 33554432, read_plain 8 Kb, 97.404816, 0.412496 4 | 33554432, read_plain 12 Kb, 98.550908, 0.418743 5 | 33554432, read_plain 16 Kb, 97.729508, 1.078810 6 | 33554432, read_plain 24 Kb, 96.948111, 0.088997 7 | 33554432, read_plain 32 Kb, 97.037457, 0.430946 8 | 33554432, read_plain 40 Kb, 95.560645, 0.343115 9 | 33554432, read_plain 48 Kb, 95.435269, 0.103574 10 | 33554432, read_plain 56 Kb, 95.335795, 0.145578 11 | 33554432, read_plain 64 Kb, 95.180008, 0.201495 12 | 33554432, read_plain 256 Kb, 95.809164, 0.341684 13 | 33554432, read_plain 1024 Kb, 105.879935, 0.254899 14 | 33554432, read_plain 4096 Kb, 118.385884, 7.250894 15 | 33554432, read_plain 16384 Kb, 113.081502, 0.330179 16 | 33554432, read_direct 4 Kb, 496.652454, 5.568518 17 | 33554432, read_direct 8 Kb, 305.726278, 17.556078 18 | 33554432, read_direct 12 Kb, 261.681047, 27.044467 19 | 33554432, read_direct 16 Kb, 234.140499, 27.951943 20 | 33554432, read_direct 24 Kb, 191.526921, 17.678983 21 | 33554432, read_direct 32 Kb, 180.696866, 9.378430 22 | 33554432, read_direct 40 Kb, 177.515135, 5.831890 23 | 33554432, read_direct 48 Kb, 171.925445, 10.938554 24 | 33554432, read_direct 56 Kb, 164.242632, 4.957123 25 | 33554432, read_direct 64 Kb, 167.801091, 7.154574 26 | 33554432, read_direct 256 Kb, 131.898571, 2.110051 27 | 33554432, read_direct 1024 Kb, 128.739417, 8.920686 28 | 33554432, read_direct 4096 Kb, 115.429370, 1.170550 29 | 33554432, read_direct 16384 Kb, 124.621479, 9.018052 30 | 33554432, read_fadvise 4 Kb, 95.758554, 0.776078 31 | 33554432, read_fadvise 8 Kb, 96.354703, 0.818207 32 | 33554432, read_fadvise 12 Kb, 96.374293, 0.358752 33 | 33554432, read_fadvise 16 Kb, 94.722098, 0.149347 34 | 33554432, read_fadvise 24 Kb, 95.832362, 0.123839 35 | 33554432, read_fadvise 32 Kb, 95.865382, 1.119069 36 | 33554432, read_fadvise 40 Kb, 94.932828, 0.123222 37 | 33554432, read_fadvise 48 Kb, 95.028691, 0.157774 38 | 33554432, read_fadvise 56 Kb, 95.018351, 0.230275 39 | 33554432, read_fadvise 64 Kb, 95.346080, 1.006242 40 | 33554432, read_fadvise 256 Kb, 95.185100, 0.205232 41 | 33554432, read_fadvise 1024 Kb, 98.988262, 5.516553 42 | 33554432, read_fadvise 4096 Kb, 111.927107, 3.615125 43 | 33554432, read_fadvise 16384 Kb, 112.323297, 0.357311 44 | 33554432, aio_read_direct 4 Kb, 975.118453, 79.230799 45 | 33554432, aio_read_direct 8 Kb, 559.814652, 50.894354 46 | 33554432, aio_read_direct 12 Kb, 443.035842, 32.168606 47 | 33554432, aio_read_direct 16 Kb, 370.631272, 48.074266 48 | 33554432, aio_read_direct 24 Kb, 272.334659, 17.607254 49 | 33554432, aio_read_direct 32 Kb, 225.379908, 23.298463 50 | 33554432, aio_read_direct 40 Kb, 202.392824, 10.556853 51 | 33554432, aio_read_direct 48 Kb, 178.200780, 13.106701 52 | 33554432, aio_read_direct 56 Kb, 172.645240, 13.670251 53 | 33554432, aio_read_direct 64 Kb, 163.444872, 12.082288 54 | 33554432, aio_read_direct 256 Kb, 115.321737, 1.744796 55 | 33554432, aio_read_direct 1024 Kb, 104.473644, 1.584611 56 | 33554432, aio_read_direct 4096 Kb, 102.663755, 0.295278 57 | 33554432, aio_read_direct 16384 Kb, 112.434877, 3.047322 58 | 33554432, aio_read_fadvise 4 Kb, 95.709422, 1.043863 59 | 33554432, aio_read_fadvise 8 Kb, 96.195192, 1.062558 60 | 33554432, aio_read_fadvise 12 Kb, 96.580849, 0.430171 61 | 33554432, aio_read_fadvise 16 Kb, 95.611109, 0.621044 62 | 33554432, aio_read_fadvise 24 Kb, 95.277372, 0.241760 63 | 33554432, aio_read_fadvise 32 Kb, 96.040865, 0.312633 64 | 33554432, aio_read_fadvise 40 Kb, 94.800057, 0.270281 65 | 33554432, aio_read_fadvise 48 Kb, 94.990863, 0.182046 66 | 33554432, aio_read_fadvise 56 Kb, 95.058721, 0.065452 67 | 33554432, aio_read_fadvise 64 Kb, 95.319253, 0.211939 68 | 33554432, aio_read_fadvise 256 Kb, 94.931414, 0.207877 69 | 33554432, aio_read_fadvise 1024 Kb, 96.199311, 0.465257 70 | 33554432, aio_read_fadvise 4096 Kb, 97.346852, 0.937398 71 | 33554432, aio_read_fadvise 16384 Kb, 112.790574, 7.615154 72 | 33554432, read_async_plain 4 Kb, 96.844845, 1.482803 73 | 33554432, read_async_plain 8 Kb, 95.381114, 0.242712 74 | 33554432, read_async_plain 12 Kb, 95.497591, 0.153505 75 | 33554432, read_async_plain 16 Kb, 98.100059, 0.415828 76 | 33554432, read_async_plain 24 Kb, 97.004021, 0.257190 77 | 33554432, read_async_plain 32 Kb, 96.999245, 0.195825 78 | 33554432, read_async_plain 40 Kb, 95.482895, 0.212781 79 | 33554432, read_async_plain 48 Kb, 95.363997, 0.232787 80 | 33554432, read_async_plain 56 Kb, 95.514398, 0.366946 81 | 33554432, read_async_plain 64 Kb, 95.267558, 0.158247 82 | 33554432, read_async_plain 256 Kb, 95.374080, 0.210933 83 | 33554432, read_async_plain 1024 Kb, 95.744632, 0.255649 84 | 33554432, read_async_plain 4096 Kb, 97.310425, 0.197470 85 | 33554432, read_async_plain 16384 Kb, 104.707331, 0.456775 86 | 33554432, read_async_direct 4 Kb, 455.648291, 1.765196 87 | 33554432, read_async_direct 8 Kb, 270.316443, 0.787556 88 | 33554432, read_async_direct 12 Kb, 197.995811, 1.494774 89 | 33554432, read_async_direct 16 Kb, 171.579765, 1.336477 90 | 33554432, read_async_direct 24 Kb, 146.243493, 2.580699 91 | 33554432, read_async_direct 32 Kb, 130.848504, 2.275991 92 | 33554432, read_async_direct 40 Kb, 123.537192, 0.637784 93 | 33554432, read_async_direct 48 Kb, 119.192560, 0.918706 94 | 33554432, read_async_direct 56 Kb, 144.619209, 6.744462 95 | 33554432, read_async_direct 64 Kb, 139.526331, 0.545650 96 | 33554432, read_async_direct 256 Kb, 104.946995, 1.167228 97 | 33554432, read_async_direct 1024 Kb, 99.027017, 0.809943 98 | 33554432, read_async_direct 4096 Kb, 98.540038, 0.511146 99 | 33554432, read_async_direct 16384 Kb, 107.605250, 0.667247 100 | 33554432, read_async_fadvise 4 Kb, 95.811370, 1.199113 101 | 33554432, read_async_fadvise 8 Kb, 96.039187, 0.460532 102 | 33554432, read_async_fadvise 12 Kb, 96.338568, 0.255121 103 | 33554432, read_async_fadvise 16 Kb, 95.594876, 0.620636 104 | 33554432, read_async_fadvise 24 Kb, 95.301210, 0.085298 105 | 33554432, read_async_fadvise 32 Kb, 95.395666, 0.794533 106 | 33554432, read_async_fadvise 40 Kb, 95.168834, 0.753157 107 | 33554432, read_async_fadvise 48 Kb, 94.932166, 0.179009 108 | 33554432, read_async_fadvise 56 Kb, 94.883386, 0.155155 109 | 33554432, read_async_fadvise 64 Kb, 94.836988, 0.144855 110 | 33554432, read_async_fadvise 256 Kb, 94.833804, 0.099674 111 | 33554432, read_async_fadvise 1024 Kb, 95.493414, 0.603865 112 | 33554432, read_async_fadvise 4096 Kb, 96.872220, 0.176506 113 | 33554432, read_async_fadvise 16384 Kb, 109.887747, 3.744226 114 | 33554432, mmap_plain, 97.245157, 0.106688 115 | 33554432, mmap_direct, 96.786330, 0.571043 116 | 33554432, mmap_fadvise, 96.527920, 0.216909 117 | -------------------------------------------------------------------------------- /results/julie/read/read_8.csv: -------------------------------------------------------------------------------- 1 | File Size, Method, Mean (ms), Stddev (ms) 2 | 8388608, read_plain 4 Kb, 23.953938, 0.358237 3 | 8388608, read_plain 8 Kb, 23.998918, 0.266776 4 | 8388608, read_plain 12 Kb, 24.490556, 0.114601 5 | 8388608, read_plain 16 Kb, 24.452869, 0.051771 6 | 8388608, read_plain 24 Kb, 23.761896, 0.048564 7 | 8388608, read_plain 32 Kb, 23.878782, 0.092935 8 | 8388608, read_plain 40 Kb, 23.839714, 0.094517 9 | 8388608, read_plain 48 Kb, 24.594592, 1.178847 10 | 8388608, read_plain 56 Kb, 23.855844, 0.139781 11 | 8388608, read_plain 64 Kb, 23.951400, 0.100578 12 | 8388608, read_plain 256 Kb, 26.326431, 0.365219 13 | 8388608, read_plain 1024 Kb, 26.722577, 0.351278 14 | 8388608, read_plain 4096 Kb, 29.839341, 2.130845 15 | 8388608, read_direct 4 Kb, 123.898402, 1.897035 16 | 8388608, read_direct 8 Kb, 80.954437, 7.339283 17 | 8388608, read_direct 12 Kb, 60.778446, 3.884634 18 | 8388608, read_direct 16 Kb, 50.759551, 0.232899 19 | 8388608, read_direct 24 Kb, 45.180992, 2.605095 20 | 8388608, read_direct 32 Kb, 41.436388, 2.917420 21 | 8388608, read_direct 40 Kb, 45.051908, 2.493619 22 | 8388608, read_direct 48 Kb, 42.409930, 1.626426 23 | 8388608, read_direct 56 Kb, 42.739956, 0.536149 24 | 8388608, read_direct 64 Kb, 42.953693, 1.224488 25 | 8388608, read_direct 256 Kb, 32.772355, 1.410324 26 | 8388608, read_direct 1024 Kb, 32.268619, 1.053344 27 | 8388608, read_direct 4096 Kb, 30.526075, 2.208437 28 | 8388608, read_fadvise 4 Kb, 23.400900, 0.350220 29 | 8388608, read_fadvise 8 Kb, 23.655141, 0.071046 30 | 8388608, read_fadvise 12 Kb, 23.381879, 0.043616 31 | 8388608, read_fadvise 16 Kb, 23.243273, 0.202775 32 | 8388608, read_fadvise 24 Kb, 23.183583, 0.224320 33 | 8388608, read_fadvise 32 Kb, 23.528457, 0.058778 34 | 8388608, read_fadvise 40 Kb, 23.297463, 0.224762 35 | 8388608, read_fadvise 48 Kb, 23.639135, 0.867415 36 | 8388608, read_fadvise 56 Kb, 23.338447, 0.143645 37 | 8388608, read_fadvise 64 Kb, 23.677740, 0.650623 38 | 8388608, read_fadvise 256 Kb, 24.063633, 0.808229 39 | 8388608, read_fadvise 1024 Kb, 26.229711, 2.100700 40 | 8388608, read_fadvise 4096 Kb, 31.788881, 0.082554 41 | 8388608, aio_read_direct 4 Kb, 235.902462, 40.005806 42 | 8388608, aio_read_direct 8 Kb, 126.460259, 33.753993 43 | 8388608, aio_read_direct 12 Kb, 114.517936, 6.084701 44 | 8388608, aio_read_direct 16 Kb, 84.917111, 7.630082 45 | 8388608, aio_read_direct 24 Kb, 75.432004, 2.255766 46 | 8388608, aio_read_direct 32 Kb, 59.356935, 6.103791 47 | 8388608, aio_read_direct 40 Kb, 53.825180, 2.553340 48 | 8388608, aio_read_direct 48 Kb, 47.377146, 4.209663 49 | 8388608, aio_read_direct 56 Kb, 41.419934, 1.027686 50 | 8388608, aio_read_direct 64 Kb, 41.552108, 1.670892 51 | 8388608, aio_read_direct 256 Kb, 28.292249, 0.720069 52 | 8388608, aio_read_direct 1024 Kb, 25.703814, 0.307736 53 | 8388608, aio_read_direct 4096 Kb, 29.380549, 0.133755 54 | 8388608, aio_read_fadvise 4 Kb, 24.170426, 0.317283 55 | 8388608, aio_read_fadvise 8 Kb, 23.633672, 0.207091 56 | 8388608, aio_read_fadvise 12 Kb, 24.212681, 0.699739 57 | 8388608, aio_read_fadvise 16 Kb, 23.730920, 0.167780 58 | 8388608, aio_read_fadvise 24 Kb, 23.797387, 0.889458 59 | 8388608, aio_read_fadvise 32 Kb, 23.526697, 0.235746 60 | 8388608, aio_read_fadvise 40 Kb, 23.904075, 0.105907 61 | 8388608, aio_read_fadvise 48 Kb, 23.280335, 0.183998 62 | 8388608, aio_read_fadvise 56 Kb, 23.283913, 0.114570 63 | 8388608, aio_read_fadvise 64 Kb, 23.440900, 0.211873 64 | 8388608, aio_read_fadvise 256 Kb, 23.485644, 0.164335 65 | 8388608, aio_read_fadvise 1024 Kb, 24.308682, 0.502297 66 | 8388608, aio_read_fadvise 4096 Kb, 27.160925, 1.174004 67 | 8388608, read_async_plain 4 Kb, 24.567568, 0.926763 68 | 8388608, read_async_plain 8 Kb, 23.939930, 0.244213 69 | 8388608, read_async_plain 12 Kb, 24.605385, 0.150309 70 | 8388608, read_async_plain 16 Kb, 24.152157, 0.484006 71 | 8388608, read_async_plain 24 Kb, 23.865596, 0.050571 72 | 8388608, read_async_plain 32 Kb, 23.988757, 0.016914 73 | 8388608, read_async_plain 40 Kb, 23.801303, 0.087051 74 | 8388608, read_async_plain 48 Kb, 24.009230, 0.339206 75 | 8388608, read_async_plain 56 Kb, 23.974887, 0.320727 76 | 8388608, read_async_plain 64 Kb, 24.064248, 0.322031 77 | 8388608, read_async_plain 256 Kb, 23.835216, 0.067988 78 | 8388608, read_async_plain 1024 Kb, 24.695898, 0.315878 79 | 8388608, read_async_plain 4096 Kb, 26.361546, 0.095592 80 | 8388608, read_async_direct 4 Kb, 122.173943, 3.557142 81 | 8388608, read_async_direct 8 Kb, 69.589479, 1.960586 82 | 8388608, read_async_direct 12 Kb, 51.597370, 0.883164 83 | 8388608, read_async_direct 16 Kb, 46.124794, 2.203319 84 | 8388608, read_async_direct 24 Kb, 44.706017, 8.712334 85 | 8388608, read_async_direct 32 Kb, 34.549246, 1.334169 86 | 8388608, read_async_direct 40 Kb, 33.053931, 0.669606 87 | 8388608, read_async_direct 48 Kb, 30.254137, 0.766589 88 | 8388608, read_async_direct 56 Kb, 34.167717, 3.658802 89 | 8388608, read_async_direct 64 Kb, 35.127399, 0.636728 90 | 8388608, read_async_direct 256 Kb, 25.747667, 0.017569 91 | 8388608, read_async_direct 1024 Kb, 24.280905, 0.137911 92 | 8388608, read_async_direct 4096 Kb, 27.602150, 0.203901 93 | 8388608, read_async_fadvise 4 Kb, 23.403829, 0.066084 94 | 8388608, read_async_fadvise 8 Kb, 23.480511, 0.159217 95 | 8388608, read_async_fadvise 12 Kb, 23.593236, 0.230302 96 | 8388608, read_async_fadvise 16 Kb, 23.624667, 0.207802 97 | 8388608, read_async_fadvise 24 Kb, 23.958183, 0.779185 98 | 8388608, read_async_fadvise 32 Kb, 23.938171, 0.395198 99 | 8388608, read_async_fadvise 40 Kb, 23.259665, 0.092245 100 | 8388608, read_async_fadvise 48 Kb, 23.735849, 0.895512 101 | 8388608, read_async_fadvise 56 Kb, 23.359428, 0.158086 102 | 8388608, read_async_fadvise 64 Kb, 23.585598, 0.752871 103 | 8388608, read_async_fadvise 256 Kb, 23.638734, 0.245512 104 | 8388608, read_async_fadvise 1024 Kb, 24.030706, 0.496508 105 | 8388608, read_async_fadvise 4096 Kb, 26.023087, 0.177320 106 | 8388608, mmap_plain, 24.051181, 0.133543 107 | 8388608, mmap_direct, 24.136514, 0.175650 108 | 8388608, mmap_fadvise, 24.081823, 0.066167 109 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_112.csv: -------------------------------------------------------------------------------- 1 | Method, File Size (KB), Mean (ms), Stddev (ms) 2 | read_plain 4 Kb, 112, 404.728234, 45.025227 3 | read_plain 8 Kb, 112, 395.225043, 36.029591 4 | read_plain 12 Kb, 112, 399.453917, 52.501497 5 | read_plain 16 Kb, 112, 373.333035, 38.785959 6 | read_plain 24 Kb, 112, 405.277793, 47.751842 7 | read_plain 32 Kb, 112, 415.813331, 65.769007 8 | read_plain 40 Kb, 112, 377.141472, 23.588570 9 | read_plain 48 Kb, 112, 403.266369, 47.611441 10 | read_plain 56 Kb, 112, 398.875204, 41.707370 11 | read_plain 64 Kb, 112, 442.937493, 54.147143 12 | read_plain 256 Kb, 112, 446.795705, 74.126304 13 | read_plain 1024 Kb, 112, 422.396337, 51.356571 14 | read_plain 4096 Kb, 112, 327.589870, 51.835784 15 | read_plain 16384 Kb, 112, 346.529242, 35.534549 16 | read_plain 65536 Kb, 112, 388.748349, 62.478254 17 | read_nocache 4 Kb, 112, 3316.791754, 130.503784 18 | read_nocache 8 Kb, 112, 1774.865410, 47.612567 19 | read_nocache 12 Kb, 112, 1291.740949, 29.636277 20 | read_nocache 16 Kb, 112, 1071.493230, 23.524041 21 | read_nocache 24 Kb, 112, 843.541669, 56.488130 22 | read_nocache 32 Kb, 112, 676.288551, 24.465096 23 | read_nocache 40 Kb, 112, 619.005901, 41.346632 24 | read_nocache 48 Kb, 112, 625.574914, 67.420949 25 | read_nocache 56 Kb, 112, 551.540733, 49.539100 26 | read_nocache 64 Kb, 112, 527.203355, 52.713785 27 | read_nocache 256 Kb, 112, 651.900947, 31.050807 28 | read_nocache 1024 Kb, 112, 407.308762, 77.952654 29 | read_nocache 4096 Kb, 112, 375.467077, 73.852523 30 | read_nocache 16384 Kb, 112, 435.886169, 74.630849 31 | read_nocache 65536 Kb, 112, 431.716223, 79.099478 32 | read_readahead 4 Kb, 112, 393.993177, 27.103520 33 | read_readahead 8 Kb, 112, 382.751872, 14.846199 34 | read_readahead 12 Kb, 112, 404.787834, 44.390337 35 | read_readahead 16 Kb, 112, 391.596759, 30.672870 36 | read_readahead 24 Kb, 112, 435.796944, 67.108410 37 | read_readahead 32 Kb, 112, 395.691235, 38.770071 38 | read_readahead 40 Kb, 112, 391.541579, 40.441923 39 | read_readahead 48 Kb, 112, 426.814241, 51.207198 40 | read_readahead 56 Kb, 112, 421.111858, 67.815447 41 | read_readahead 64 Kb, 112, 410.887018, 78.257512 42 | read_readahead 256 Kb, 112, 452.899076, 95.299718 43 | read_readahead 1024 Kb, 112, 332.549910, 38.639995 44 | read_readahead 4096 Kb, 112, 342.190429, 58.071239 45 | read_readahead 16384 Kb, 112, 360.235710, 47.545359 46 | read_readahead 65536 Kb, 112, 365.088898, 36.856127 47 | read_rdadvise 4 Kb, 112, 344.040632, 83.543608 48 | read_rdadvise 8 Kb, 112, 334.268051, 75.473032 49 | read_rdadvise 12 Kb, 112, 319.533135, 64.408618 50 | read_rdadvise 16 Kb, 112, 314.407501, 46.167573 51 | read_rdadvise 24 Kb, 112, 360.124769, 86.003419 52 | read_rdadvise 32 Kb, 112, 342.835797, 88.112455 53 | read_rdadvise 40 Kb, 112, 348.123587, 68.971531 54 | read_rdadvise 48 Kb, 112, 303.074943, 55.257855 55 | read_rdadvise 56 Kb, 112, 309.153922, 52.466569 56 | read_rdadvise 64 Kb, 112, 282.621367, 28.384218 57 | read_rdadvise 256 Kb, 112, 332.983420, 75.454653 58 | read_rdadvise 1024 Kb, 112, 313.203109, 56.533498 59 | read_rdadvise 4096 Kb, 112, 299.074550, 53.381702 60 | read_rdadvise 16384 Kb, 112, 318.785470, 64.289039 61 | read_rdadvise 65536 Kb, 112, 391.490219, 83.238700 62 | read_async_nocache 4 Kb, 112, 3495.681508, 648.071085 63 | read_async_nocache 8 Kb, 112, 2101.167613, 74.173770 64 | read_async_nocache 12 Kb, 112, 1504.277548, 37.635388 65 | read_async_nocache 16 Kb, 112, 1200.663327, 48.834702 66 | read_async_nocache 24 Kb, 112, 883.518739, 36.715936 67 | read_async_nocache 32 Kb, 112, 720.300129, 48.149217 68 | read_async_nocache 40 Kb, 112, 629.020437, 41.204562 69 | read_async_nocache 48 Kb, 112, 540.456386, 57.315550 70 | read_async_nocache 56 Kb, 112, 450.858895, 62.239510 71 | read_async_nocache 64 Kb, 112, 412.841289, 61.576984 72 | read_async_nocache 256 Kb, 112, 550.759001, 91.036479 73 | read_async_nocache 1024 Kb, 112, 323.880201, 66.754968 74 | read_async_nocache 4096 Kb, 112, 296.400845, 88.102347 75 | read_async_nocache 16384 Kb, 112, 319.720631, 90.931227 76 | read_async_nocache 65536 Kb, 112, 398.413316, 73.884348 77 | read_async_rdahead 4 Kb, 112, 387.840259, 58.966209 78 | read_async_rdahead 8 Kb, 112, 397.303343, 77.255299 79 | read_async_rdahead 12 Kb, 112, 400.103770, 60.014017 80 | read_async_rdahead 16 Kb, 112, 418.598816, 66.939094 81 | read_async_rdahead 24 Kb, 112, 423.184657, 65.339719 82 | read_async_rdahead 32 Kb, 112, 448.980905, 95.206711 83 | read_async_rdahead 40 Kb, 112, 383.932389, 52.378158 84 | read_async_rdahead 48 Kb, 112, 400.229870, 59.752395 85 | read_async_rdahead 56 Kb, 112, 410.020063, 67.339209 86 | read_async_rdahead 64 Kb, 112, 396.575404, 83.392880 87 | read_async_rdahead 256 Kb, 112, 407.009266, 88.253080 88 | read_async_rdahead 1024 Kb, 112, 339.792689, 46.442496 89 | read_async_rdahead 4096 Kb, 112, 320.197327, 64.353548 90 | read_async_rdahead 16384 Kb, 112, 364.086992, 73.797922 91 | read_async_rdahead 65536 Kb, 112, 398.803459, 62.548161 92 | read_async_rdadvise 4 Kb, 112, 338.647964, 80.324769 93 | read_async_rdadvise 8 Kb, 112, 322.563583, 52.386742 94 | read_async_rdadvise 12 Kb, 112, 330.082941, 36.096456 95 | read_async_rdadvise 16 Kb, 112, 312.922587, 70.177058 96 | read_async_rdadvise 24 Kb, 112, 355.822180, 77.441673 97 | read_async_rdadvise 32 Kb, 112, 397.738612, 78.457878 98 | read_async_rdadvise 40 Kb, 112, 298.630848, 61.933964 99 | read_async_rdadvise 48 Kb, 112, 330.185654, 58.393057 100 | read_async_rdadvise 56 Kb, 112, 328.522233, 70.391907 101 | read_async_rdadvise 64 Kb, 112, 329.302022, 63.967681 102 | read_async_rdadvise 256 Kb, 112, 273.031294, 18.648682 103 | read_async_rdadvise 1024 Kb, 112, 307.432536, 60.149859 104 | read_async_rdadvise 4096 Kb, 112, 299.249252, 42.954108 105 | read_async_rdadvise 16384 Kb, 112, 338.274757, 73.149133 106 | read_async_rdadvise 65536 Kb, 112, 328.092518, 46.988420 107 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_128.csv: -------------------------------------------------------------------------------- 1 | Method, File Size (KB), Mean (ms), Stddev (ms) 2 | read_plain 4 Kb, 128, 448.407680, 42.369711 3 | read_plain 8 Kb, 128, 446.908928, 33.571939 4 | read_plain 12 Kb, 128, 464.581592, 55.269000 5 | read_plain 16 Kb, 128, 423.914013, 51.500731 6 | read_plain 24 Kb, 128, 430.687548, 4.571611 7 | read_plain 32 Kb, 128, 448.838779, 36.651732 8 | read_plain 40 Kb, 128, 426.883063, 29.553864 9 | read_plain 48 Kb, 128, 430.767157, 7.775307 10 | read_plain 56 Kb, 128, 543.410251, 66.432310 11 | read_plain 64 Kb, 128, 472.887889, 51.571349 12 | read_plain 256 Kb, 128, 471.820914, 51.944952 13 | read_plain 1024 Kb, 128, 466.700388, 68.269675 14 | read_plain 4096 Kb, 128, 372.356590, 50.890786 15 | read_plain 16384 Kb, 128, 407.386230, 36.012789 16 | read_plain 65536 Kb, 128, 446.590444, 76.785644 17 | read_nocache 4 Kb, 128, 3837.477815, 105.232661 18 | read_nocache 8 Kb, 128, 1964.011538, 38.157190 19 | read_nocache 12 Kb, 128, 1462.351751, 33.270747 20 | read_nocache 16 Kb, 128, 1219.582689, 36.903113 21 | read_nocache 24 Kb, 128, 960.074023, 48.880932 22 | read_nocache 32 Kb, 128, 861.809030, 65.314951 23 | read_nocache 40 Kb, 128, 769.119148, 69.982791 24 | read_nocache 48 Kb, 128, 681.687766, 60.475087 25 | read_nocache 56 Kb, 128, 644.112571, 48.574114 26 | read_nocache 64 Kb, 128, 612.783105, 76.658413 27 | read_nocache 256 Kb, 128, 747.898795, 36.721711 28 | read_nocache 1024 Kb, 128, 414.447190, 2.181875 29 | read_nocache 4096 Kb, 128, 413.465001, 60.625706 30 | read_nocache 16384 Kb, 128, 458.943003, 84.769674 31 | read_nocache 65536 Kb, 128, 398.727772, 35.994803 32 | read_readahead 4 Kb, 128, 496.623475, 55.776969 33 | read_readahead 8 Kb, 128, 474.573371, 44.654601 34 | read_readahead 12 Kb, 128, 502.322200, 79.255194 35 | read_readahead 16 Kb, 128, 457.384856, 45.703352 36 | read_readahead 24 Kb, 128, 452.273669, 33.821938 37 | read_readahead 32 Kb, 128, 461.266495, 55.669702 38 | read_readahead 40 Kb, 128, 439.871557, 26.697672 39 | read_readahead 48 Kb, 128, 492.330715, 73.645962 40 | read_readahead 56 Kb, 128, 448.284634, 37.523562 41 | read_readahead 64 Kb, 128, 479.631385, 45.357259 42 | read_readahead 256 Kb, 128, 466.420893, 56.301062 43 | read_readahead 1024 Kb, 128, 421.404173, 64.093147 44 | read_readahead 4096 Kb, 128, 406.616546, 56.970178 45 | read_readahead 16384 Kb, 128, 415.724333, 43.563861 46 | read_readahead 65536 Kb, 128, 415.700562, 40.634919 47 | read_rdadvise 4 Kb, 128, 363.566014, 48.290176 48 | read_rdadvise 8 Kb, 128, 350.207026, 41.750843 49 | read_rdadvise 12 Kb, 128, 432.110331, 85.938160 50 | read_rdadvise 16 Kb, 128, 341.756589, 40.297879 51 | read_rdadvise 24 Kb, 128, 371.471017, 82.393424 52 | read_rdadvise 32 Kb, 128, 388.953818, 80.927307 53 | read_rdadvise 40 Kb, 128, 390.010044, 91.202135 54 | read_rdadvise 48 Kb, 128, 341.436212, 28.326997 55 | read_rdadvise 56 Kb, 128, 337.884916, 40.075244 56 | read_rdadvise 64 Kb, 128, 376.147304, 100.136023 57 | read_rdadvise 256 Kb, 128, 373.317428, 88.973543 58 | read_rdadvise 1024 Kb, 128, 390.989407, 87.370199 59 | read_rdadvise 4096 Kb, 128, 383.962892, 78.811816 60 | read_rdadvise 16384 Kb, 128, 391.655164, 91.031659 61 | read_rdadvise 65536 Kb, 128, 395.708208, 89.687326 62 | read_async_nocache 4 Kb, 128, 2942.777650, 320.538847 63 | read_async_nocache 8 Kb, 128, 1877.088682, 80.480777 64 | read_async_nocache 12 Kb, 128, 1386.003160, 106.335308 65 | read_async_nocache 16 Kb, 128, 1025.743307, 49.006740 66 | read_async_nocache 24 Kb, 128, 782.316112, 52.250638 67 | read_async_nocache 32 Kb, 128, 634.141997, 27.072921 68 | read_async_nocache 40 Kb, 128, 614.871475, 68.542832 69 | read_async_nocache 48 Kb, 128, 553.730191, 90.895621 70 | read_async_nocache 56 Kb, 128, 470.564281, 42.105854 71 | read_async_nocache 64 Kb, 128, 484.889263, 62.575695 72 | read_async_nocache 256 Kb, 128, 594.571549, 53.992224 73 | read_async_nocache 1024 Kb, 128, 367.664042, 54.760471 74 | read_async_nocache 4096 Kb, 128, 371.858189, 103.473451 75 | read_async_nocache 16384 Kb, 128, 365.185771, 86.175539 76 | read_async_nocache 65536 Kb, 128, 539.030622, 91.181492 77 | read_async_rdahead 4 Kb, 128, 457.591438, 101.979087 78 | read_async_rdahead 8 Kb, 128, 451.525264, 47.101971 79 | read_async_rdahead 12 Kb, 128, 494.765927, 80.473778 80 | read_async_rdahead 16 Kb, 128, 435.808796, 48.564586 81 | read_async_rdahead 24 Kb, 128, 449.289731, 49.574938 82 | read_async_rdahead 32 Kb, 128, 442.344676, 71.121904 83 | read_async_rdahead 40 Kb, 128, 438.048847, 55.350831 84 | read_async_rdahead 48 Kb, 128, 450.324429, 49.505592 85 | read_async_rdahead 56 Kb, 128, 446.115401, 50.306467 86 | read_async_rdahead 64 Kb, 128, 464.162498, 72.500365 87 | read_async_rdahead 256 Kb, 128, 464.244059, 70.582319 88 | read_async_rdahead 1024 Kb, 128, 367.288237, 35.592593 89 | read_async_rdahead 4096 Kb, 128, 336.888288, 51.395254 90 | read_async_rdahead 16384 Kb, 128, 327.442680, 3.438779 91 | read_async_rdahead 65536 Kb, 128, 511.741250, 82.641296 92 | read_async_rdadvise 4 Kb, 128, 451.746751, 62.374076 93 | read_async_rdadvise 8 Kb, 128, 362.190046, 67.993599 94 | read_async_rdadvise 12 Kb, 128, 372.902694, 74.859250 95 | read_async_rdadvise 16 Kb, 128, 387.733826, 61.455908 96 | read_async_rdadvise 24 Kb, 128, 395.771024, 87.450729 97 | read_async_rdadvise 32 Kb, 128, 384.447486, 38.658765 98 | read_async_rdadvise 40 Kb, 128, 397.617478, 82.236189 99 | read_async_rdadvise 48 Kb, 128, 394.499874, 87.165239 100 | read_async_rdadvise 56 Kb, 128, 374.575306, 99.044683 101 | read_async_rdadvise 64 Kb, 128, 355.901796, 74.307701 102 | read_async_rdadvise 256 Kb, 128, 355.420207, 74.005902 103 | read_async_rdadvise 1024 Kb, 128, 375.164877, 101.313588 104 | read_async_rdadvise 4096 Kb, 128, 415.786351, 95.050060 105 | read_async_rdadvise 16384 Kb, 128, 352.116801, 68.355772 106 | read_async_rdadvise 65536 Kb, 128, 380.872460, 57.923207 107 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_16.csv: -------------------------------------------------------------------------------- 1 | Method, File Size (KB), Mean (ms), Stddev (ms) 2 | read_plain 4 Kb, 16, 89.857965, 23.301018 3 | read_plain 8 Kb, 16, 70.889042, 13.991190 4 | read_plain 12 Kb, 16, 71.555393, 14.850544 5 | read_plain 16 Kb, 16, 65.827047, 9.829299 6 | read_plain 24 Kb, 16, 63.043112, 0.458872 7 | read_plain 32 Kb, 16, 61.543535, 0.793192 8 | read_plain 40 Kb, 16, 61.748406, 0.639636 9 | read_plain 48 Kb, 16, 63.990917, 5.056015 10 | read_plain 56 Kb, 16, 61.879954, 0.666240 11 | read_plain 64 Kb, 16, 66.770285, 17.333813 12 | read_plain 256 Kb, 16, 61.860713, 5.434716 13 | read_plain 1024 Kb, 16, 52.523037, 0.863519 14 | read_plain 4096 Kb, 16, 48.137394, 1.253708 15 | read_plain 16384 Kb, 16, 60.860736, 13.928639 16 | read_nocache 4 Kb, 16, 547.066919, 47.952360 17 | read_nocache 8 Kb, 16, 311.125165, 19.432585 18 | read_nocache 12 Kb, 16, 239.177113, 25.544224 19 | read_nocache 16 Kb, 16, 202.106836, 21.142643 20 | read_nocache 24 Kb, 16, 155.220939, 19.086740 21 | read_nocache 32 Kb, 16, 117.835076, 4.336653 22 | read_nocache 40 Kb, 16, 109.958007, 7.529030 23 | read_nocache 48 Kb, 16, 110.888796, 12.365609 24 | read_nocache 56 Kb, 16, 99.642180, 5.576126 25 | read_nocache 64 Kb, 16, 99.569930, 12.994572 26 | read_nocache 256 Kb, 16, 93.296871, 3.112942 27 | read_nocache 1024 Kb, 16, 55.707829, 0.975314 28 | read_nocache 4096 Kb, 16, 49.463407, 1.275932 29 | read_nocache 16384 Kb, 16, 51.375004, 1.679687 30 | read_readahead 4 Kb, 16, 69.436552, 20.770237 31 | read_readahead 8 Kb, 16, 62.598633, 0.426987 32 | read_readahead 12 Kb, 16, 63.074316, 0.864597 33 | read_readahead 16 Kb, 16, 61.758755, 1.100261 34 | read_readahead 24 Kb, 16, 63.450343, 0.544442 35 | read_readahead 32 Kb, 16, 61.296078, 0.707470 36 | read_readahead 40 Kb, 16, 67.228013, 16.249196 37 | read_readahead 48 Kb, 16, 68.454744, 14.326035 38 | read_readahead 56 Kb, 16, 61.774842, 0.586327 39 | read_readahead 64 Kb, 16, 61.283802, 0.584416 40 | read_readahead 256 Kb, 16, 60.264735, 0.959642 41 | read_readahead 1024 Kb, 16, 56.437402, 10.736494 42 | read_readahead 4096 Kb, 16, 48.183427, 0.870353 43 | read_readahead 16384 Kb, 16, 52.749742, 1.031905 44 | read_rdadvise 4 Kb, 16, 36.944370, 0.417050 45 | read_rdadvise 8 Kb, 16, 36.467342, 0.857696 46 | read_rdadvise 12 Kb, 16, 41.358886, 14.890817 47 | read_rdadvise 16 Kb, 16, 40.376672, 12.881717 48 | read_rdadvise 24 Kb, 16, 36.571472, 0.655871 49 | read_rdadvise 32 Kb, 16, 36.168795, 0.733795 50 | read_rdadvise 40 Kb, 16, 36.360751, 0.576082 51 | read_rdadvise 48 Kb, 16, 36.255361, 0.329364 52 | read_rdadvise 56 Kb, 16, 36.501201, 0.734927 53 | read_rdadvise 64 Kb, 16, 42.097745, 14.780752 54 | read_rdadvise 256 Kb, 16, 40.174077, 11.506182 55 | read_rdadvise 1024 Kb, 16, 39.374903, 7.973299 56 | read_rdadvise 4096 Kb, 16, 41.930408, 10.023610 57 | read_rdadvise 16384 Kb, 16, 46.563473, 0.658796 58 | read_async_nocache 4 Kb, 16, 294.925513, 20.103889 59 | read_async_nocache 8 Kb, 16, 187.425850, 23.789628 60 | read_async_nocache 12 Kb, 16, 169.974566, 37.085077 61 | read_async_nocache 16 Kb, 16, 124.082512, 19.873131 62 | read_async_nocache 24 Kb, 16, 116.174064, 32.361491 63 | read_async_nocache 32 Kb, 16, 84.222821, 18.489883 64 | read_async_nocache 40 Kb, 16, 80.333961, 22.098203 65 | read_async_nocache 48 Kb, 16, 73.600532, 7.714166 66 | read_async_nocache 56 Kb, 16, 80.271424, 16.695584 67 | read_async_nocache 64 Kb, 16, 93.671862, 28.449579 68 | read_async_nocache 256 Kb, 16, 77.709911, 1.425598 69 | read_async_nocache 1024 Kb, 16, 51.183204, 13.495150 70 | read_async_nocache 4096 Kb, 16, 42.481178, 1.093698 71 | read_async_nocache 16384 Kb, 16, 52.020453, 1.724242 72 | read_async_rdahead 4 Kb, 16, 57.671974, 0.601502 73 | read_async_rdahead 8 Kb, 16, 58.014371, 0.393235 74 | read_async_rdahead 12 Kb, 16, 61.458364, 8.871435 75 | read_async_rdahead 16 Kb, 16, 57.257959, 0.537413 76 | read_async_rdahead 24 Kb, 16, 59.629074, 5.224279 77 | read_async_rdahead 32 Kb, 16, 57.258704, 1.447053 78 | read_async_rdahead 40 Kb, 16, 61.483012, 11.877607 79 | read_async_rdahead 48 Kb, 16, 57.370545, 0.683500 80 | read_async_rdahead 56 Kb, 16, 60.779366, 12.073696 81 | read_async_rdahead 64 Kb, 16, 56.510776, 0.460635 82 | read_async_rdahead 256 Kb, 16, 59.173692, 9.492806 83 | read_async_rdahead 1024 Kb, 16, 55.041456, 10.915384 84 | read_async_rdahead 4096 Kb, 16, 44.535332, 1.203277 85 | read_async_rdahead 16384 Kb, 16, 53.476252, 1.641033 86 | read_async_rdadvise 4 Kb, 16, 40.560194, 3.109562 87 | read_async_rdadvise 8 Kb, 16, 46.580718, 10.733254 88 | read_async_rdadvise 12 Kb, 16, 41.321348, 4.428674 89 | read_async_rdadvise 16 Kb, 16, 38.488199, 3.476699 90 | read_async_rdadvise 24 Kb, 16, 41.550587, 3.059087 91 | read_async_rdadvise 32 Kb, 16, 39.866777, 3.802143 92 | read_async_rdadvise 40 Kb, 16, 42.590165, 10.278411 93 | read_async_rdadvise 48 Kb, 16, 43.302312, 12.408066 94 | read_async_rdadvise 56 Kb, 16, 39.446935, 3.641081 95 | read_async_rdadvise 64 Kb, 16, 38.055008, 3.467396 96 | read_async_rdadvise 256 Kb, 16, 37.096670, 1.067366 97 | read_async_rdadvise 1024 Kb, 16, 36.586763, 0.672449 98 | read_async_rdadvise 4096 Kb, 16, 39.411639, 0.539486 99 | read_async_rdadvise 16384 Kb, 16, 47.375500, 1.310069 100 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_160.csv: -------------------------------------------------------------------------------- 1 | Method, File Size (KB), Mean (ms), Stddev (ms) 2 | read_plain 4 Kb, 160, 526.662981, 13.626435 3 | read_plain 8 Kb, 160, 516.367132, 12.412685 4 | read_plain 12 Kb, 160, 535.686359, 9.694708 5 | read_plain 16 Kb, 160, 560.597693, 56.787110 6 | read_plain 24 Kb, 160, 554.664160, 44.602921 7 | read_plain 32 Kb, 160, 530.399076, 3.974867 8 | read_plain 40 Kb, 160, 548.063765, 33.991261 9 | read_plain 48 Kb, 160, 587.806392, 68.106062 10 | read_plain 56 Kb, 160, 615.070670, 76.949979 11 | read_plain 64 Kb, 160, 591.269008, 63.238907 12 | read_plain 256 Kb, 160, 551.567906, 61.322291 13 | read_plain 1024 Kb, 160, 457.038648, 42.646327 14 | read_plain 4096 Kb, 160, 488.677461, 48.506089 15 | read_plain 16384 Kb, 160, 540.670120, 56.973844 16 | read_plain 65536 Kb, 160, 533.745163, 43.903393 17 | read_nocache 4 Kb, 160, 4657.616987, 87.284081 18 | read_nocache 8 Kb, 160, 2474.754861, 36.650439 19 | read_nocache 12 Kb, 160, 1893.515091, 36.133780 20 | read_nocache 16 Kb, 160, 1481.375924, 25.576546 21 | read_nocache 24 Kb, 160, 1173.026426, 33.799841 22 | read_nocache 32 Kb, 160, 1042.658055, 97.938673 23 | read_nocache 40 Kb, 160, 918.915335, 77.510869 24 | read_nocache 48 Kb, 160, 817.873977, 44.897301 25 | read_nocache 56 Kb, 160, 852.797984, 95.416380 26 | read_nocache 64 Kb, 160, 849.075563, 203.418252 27 | read_nocache 256 Kb, 160, 866.660936, 80.277929 28 | read_nocache 1024 Kb, 160, 531.307886, 40.076648 29 | read_nocache 4096 Kb, 160, 532.962424, 62.587880 30 | read_nocache 16384 Kb, 160, 511.559365, 66.060995 31 | read_nocache 65536 Kb, 160, 507.117047, 60.736943 32 | read_readahead 4 Kb, 160, 573.493886, 66.053069 33 | read_readahead 8 Kb, 160, 583.659339, 43.201211 34 | read_readahead 12 Kb, 160, 586.294615, 67.748884 35 | read_readahead 16 Kb, 160, 594.122136, 66.915498 36 | read_readahead 24 Kb, 160, 619.494377, 72.344161 37 | read_readahead 32 Kb, 160, 607.011527, 89.251055 38 | read_readahead 40 Kb, 160, 577.281071, 61.106290 39 | read_readahead 48 Kb, 160, 544.503270, 31.108159 40 | read_readahead 56 Kb, 160, 567.227058, 61.219425 41 | read_readahead 64 Kb, 160, 577.207210, 51.165850 42 | read_readahead 256 Kb, 160, 571.273155, 81.387644 43 | read_readahead 1024 Kb, 160, 492.618951, 58.812961 44 | read_readahead 4096 Kb, 160, 481.102096, 65.317641 45 | read_readahead 16384 Kb, 160, 554.725694, 71.423071 46 | read_readahead 65536 Kb, 160, 544.003948, 55.575290 47 | read_rdadvise 4 Kb, 160, 515.349331, 100.919308 48 | read_rdadvise 8 Kb, 160, 474.499597, 73.242764 49 | read_rdadvise 12 Kb, 160, 543.487429, 108.728663 50 | read_rdadvise 16 Kb, 160, 525.700500, 107.413912 51 | read_rdadvise 24 Kb, 160, 460.607297, 75.453579 52 | read_rdadvise 32 Kb, 160, 468.655056, 72.529017 53 | read_rdadvise 40 Kb, 160, 545.149025, 118.733399 54 | read_rdadvise 48 Kb, 160, 518.588335, 93.430442 55 | read_rdadvise 56 Kb, 160, 445.350968, 42.136928 56 | read_rdadvise 64 Kb, 160, 530.274536, 102.610718 57 | read_rdadvise 256 Kb, 160, 481.408500, 76.379433 58 | read_rdadvise 1024 Kb, 160, 549.166270, 138.680044 59 | read_rdadvise 4096 Kb, 160, 454.282738, 80.479184 60 | read_rdadvise 16384 Kb, 160, 501.591404, 79.773767 61 | read_rdadvise 65536 Kb, 160, 505.235445, 91.589042 62 | read_async_nocache 4 Kb, 160, 3948.642066, 434.761658 63 | read_async_nocache 8 Kb, 160, 2409.751398, 62.163131 64 | read_async_nocache 12 Kb, 160, 1768.341811, 57.345784 65 | read_async_nocache 16 Kb, 160, 1430.740843, 59.941638 66 | read_async_nocache 24 Kb, 160, 1030.746842, 70.869046 67 | read_async_nocache 32 Kb, 160, 850.355082, 55.744987 68 | read_async_nocache 40 Kb, 160, 733.718123, 58.147913 69 | read_async_nocache 48 Kb, 160, 681.258675, 91.115856 70 | read_async_nocache 56 Kb, 160, 674.557860, 62.665508 71 | read_async_nocache 64 Kb, 160, 624.714897, 87.879896 72 | read_async_nocache 256 Kb, 160, 717.066618, 94.820651 73 | read_async_nocache 1024 Kb, 160, 546.603302, 122.614050 74 | read_async_nocache 4096 Kb, 160, 476.676282, 76.748233 75 | read_async_nocache 16384 Kb, 160, 438.705672, 68.186338 76 | read_async_nocache 65536 Kb, 160, 535.061242, 83.377406 77 | read_async_rdahead 4 Kb, 160, 562.153276, 84.645932 78 | read_async_rdahead 8 Kb, 160, 540.319882, 58.684347 79 | read_async_rdahead 12 Kb, 160, 614.231643, 103.584580 80 | read_async_rdahead 16 Kb, 160, 546.409799, 75.729988 81 | read_async_rdahead 24 Kb, 160, 568.630204, 91.961965 82 | read_async_rdahead 32 Kb, 160, 529.161745, 63.981128 83 | read_async_rdahead 40 Kb, 160, 535.189458, 51.793230 84 | read_async_rdahead 48 Kb, 160, 590.308583, 91.308649 85 | read_async_rdahead 56 Kb, 160, 565.990887, 65.169615 86 | read_async_rdahead 64 Kb, 160, 585.407889, 67.817813 87 | read_async_rdahead 256 Kb, 160, 546.257543, 83.553310 88 | read_async_rdahead 1024 Kb, 160, 499.103177, 72.873968 89 | read_async_rdahead 4096 Kb, 160, 395.371730, 38.185633 90 | read_async_rdahead 16384 Kb, 160, 448.909402, 62.433671 91 | read_async_rdahead 65536 Kb, 160, 587.849326, 81.022996 92 | read_async_rdadvise 4 Kb, 160, 569.400074, 84.112969 93 | read_async_rdadvise 8 Kb, 160, 531.903284, 114.910424 94 | read_async_rdadvise 12 Kb, 160, 492.465008, 97.604145 95 | read_async_rdadvise 16 Kb, 160, 501.409904, 97.347394 96 | read_async_rdadvise 24 Kb, 160, 532.283293, 90.129872 97 | read_async_rdadvise 32 Kb, 160, 529.352337, 120.453850 98 | read_async_rdadvise 40 Kb, 160, 436.817743, 62.186985 99 | read_async_rdadvise 48 Kb, 160, 464.399616, 76.325012 100 | read_async_rdadvise 56 Kb, 160, 485.577588, 112.733044 101 | read_async_rdadvise 64 Kb, 160, 528.911384, 115.813319 102 | read_async_rdadvise 256 Kb, 160, 463.255137, 81.965627 103 | read_async_rdadvise 1024 Kb, 160, 521.495955, 111.302102 104 | read_async_rdadvise 4096 Kb, 160, 512.125934, 106.694342 105 | read_async_rdadvise 16384 Kb, 160, 500.680136, 97.735664 106 | read_async_rdadvise 65536 Kb, 160, 492.606505, 77.374330 107 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_192.csv: -------------------------------------------------------------------------------- 1 | Method, File Size (KB), Mean (ms), Stddev (ms) 2 | read_plain 4 Kb, 192, 650.043148, 58.816421 3 | read_plain 8 Kb, 192, 729.760900, 77.888358 4 | read_plain 12 Kb, 192, 698.359704, 97.097333 5 | read_plain 16 Kb, 192, 692.412349, 74.034600 6 | read_plain 24 Kb, 192, 658.563305, 39.321846 7 | read_plain 32 Kb, 192, 678.993048, 48.679309 8 | read_plain 40 Kb, 192, 692.010899, 88.967396 9 | read_plain 48 Kb, 192, 670.981527, 50.463081 10 | read_plain 56 Kb, 192, 678.284256, 55.421287 11 | read_plain 64 Kb, 192, 629.356429, 27.465633 12 | read_plain 256 Kb, 192, 630.825778, 32.639924 13 | read_plain 1024 Kb, 192, 652.882853, 97.246452 14 | read_plain 4096 Kb, 192, 581.619124, 54.103207 15 | read_plain 16384 Kb, 192, 601.298413, 51.444225 16 | read_plain 65536 Kb, 192, 691.256770, 92.172329 17 | read_nocache 4 Kb, 192, 5485.604659, 146.810773 18 | read_nocache 8 Kb, 192, 2927.807320, 22.595271 19 | read_nocache 12 Kb, 192, 2172.030397, 53.100572 20 | read_nocache 16 Kb, 192, 1784.125475, 25.757559 21 | read_nocache 24 Kb, 192, 1397.763566, 62.079148 22 | read_nocache 32 Kb, 192, 1157.871476, 51.147857 23 | read_nocache 40 Kb, 192, 1068.150818, 51.810727 24 | read_nocache 48 Kb, 192, 981.814945, 68.431514 25 | read_nocache 56 Kb, 192, 992.885193, 92.355288 26 | read_nocache 64 Kb, 192, 858.802653, 47.801025 27 | read_nocache 256 Kb, 192, 1063.669469, 111.052467 28 | read_nocache 1024 Kb, 192, 646.061361, 53.096839 29 | read_nocache 4096 Kb, 192, 704.940347, 82.353008 30 | read_nocache 16384 Kb, 192, 686.622579, 85.781144 31 | read_nocache 65536 Kb, 192, 674.030526, 108.566360 32 | read_readahead 4 Kb, 192, 712.306583, 82.966938 33 | read_readahead 8 Kb, 192, 698.057837, 46.108784 34 | read_readahead 12 Kb, 192, 694.484308, 76.063272 35 | read_readahead 16 Kb, 192, 712.319182, 76.737945 36 | read_readahead 24 Kb, 192, 693.696224, 38.640632 37 | read_readahead 32 Kb, 192, 692.540248, 81.287599 38 | read_readahead 40 Kb, 192, 677.027025, 59.531698 39 | read_readahead 48 Kb, 192, 768.231502, 72.421864 40 | read_readahead 56 Kb, 192, 690.758228, 66.384882 41 | read_readahead 64 Kb, 192, 658.570148, 45.710245 42 | read_readahead 256 Kb, 192, 715.326467, 94.962493 43 | read_readahead 1024 Kb, 192, 632.287898, 90.517853 44 | read_readahead 4096 Kb, 192, 611.628296, 68.314101 45 | read_readahead 16384 Kb, 192, 653.983014, 76.350736 46 | read_readahead 65536 Kb, 192, 660.765909, 60.539722 47 | read_rdadvise 4 Kb, 192, 660.309182, 105.992799 48 | read_rdadvise 8 Kb, 192, 548.960514, 64.652478 49 | read_rdadvise 12 Kb, 192, 651.945605, 115.718116 50 | read_rdadvise 16 Kb, 192, 576.590243, 73.277433 51 | read_rdadvise 24 Kb, 192, 661.681484, 133.639128 52 | read_rdadvise 32 Kb, 192, 606.575633, 87.371662 53 | read_rdadvise 40 Kb, 192, 704.680174, 119.546490 54 | read_rdadvise 48 Kb, 192, 621.925406, 104.878607 55 | read_rdadvise 56 Kb, 192, 601.839180, 79.432195 56 | read_rdadvise 64 Kb, 192, 607.854399, 74.067032 57 | read_rdadvise 256 Kb, 192, 632.110463, 138.966234 58 | read_rdadvise 1024 Kb, 192, 559.132873, 73.701687 59 | read_rdadvise 4096 Kb, 192, 618.077938, 120.129083 60 | read_rdadvise 16384 Kb, 192, 592.726360, 97.986813 61 | read_rdadvise 65536 Kb, 192, 714.429387, 96.964645 62 | read_async_nocache 4 Kb, 192, 5251.950370, 825.705536 63 | read_async_nocache 8 Kb, 192, 2976.398114, 183.996280 64 | read_async_nocache 12 Kb, 192, 2088.576791, 67.657187 65 | read_async_nocache 16 Kb, 192, 1640.264211, 79.471962 66 | read_async_nocache 24 Kb, 192, 1300.639788, 75.519462 67 | read_async_nocache 32 Kb, 192, 995.579912, 50.489842 68 | read_async_nocache 40 Kb, 192, 922.106832, 74.661997 69 | read_async_nocache 48 Kb, 192, 901.646490, 133.200815 70 | read_async_nocache 56 Kb, 192, 805.307807, 93.675951 71 | read_async_nocache 64 Kb, 192, 722.566879, 70.942064 72 | read_async_nocache 256 Kb, 192, 844.030163, 60.161712 73 | read_async_nocache 1024 Kb, 192, 630.320719, 119.809974 74 | read_async_nocache 4096 Kb, 192, 592.953879, 93.699581 75 | read_async_nocache 16384 Kb, 192, 606.602989, 118.863693 76 | read_async_nocache 65536 Kb, 192, 887.559418, 740.616161 77 | read_async_rdahead 4 Kb, 192, 706.348960, 96.121846 78 | read_async_rdahead 8 Kb, 192, 680.277352, 58.590831 79 | read_async_rdahead 12 Kb, 192, 642.301800, 83.417589 80 | read_async_rdahead 16 Kb, 192, 657.656206, 94.913362 81 | read_async_rdahead 24 Kb, 192, 645.530357, 61.590925 82 | read_async_rdahead 32 Kb, 192, 649.269345, 68.996580 83 | read_async_rdahead 40 Kb, 192, 696.720423, 87.578606 84 | read_async_rdahead 48 Kb, 192, 623.384073, 70.519234 85 | read_async_rdahead 56 Kb, 192, 2503.204778, 5509.666776 86 | read_async_rdahead 64 Kb, 192, 758.547164, 142.572359 87 | read_async_rdahead 256 Kb, 192, 740.516855, 118.170644 88 | read_async_rdahead 1024 Kb, 192, 687.080608, 140.184400 89 | read_async_rdahead 4096 Kb, 192, 520.518078, 109.448754 90 | read_async_rdahead 16384 Kb, 192, 612.661501, 109.943787 91 | read_async_rdahead 65536 Kb, 192, 650.978946, 110.666511 92 | read_async_rdadvise 4 Kb, 192, 571.531491, 122.776727 93 | read_async_rdadvise 8 Kb, 192, 637.160288, 99.717523 94 | read_async_rdadvise 12 Kb, 192, 551.787016, 104.372732 95 | read_async_rdadvise 16 Kb, 192, 557.960958, 119.912340 96 | read_async_rdadvise 24 Kb, 192, 541.418806, 83.338505 97 | read_async_rdadvise 32 Kb, 192, 575.423055, 101.644486 98 | read_async_rdadvise 40 Kb, 192, 529.472943, 100.902724 99 | read_async_rdadvise 48 Kb, 192, 517.508848, 69.792885 100 | read_async_rdadvise 56 Kb, 192, 509.618047, 61.197515 101 | read_async_rdadvise 64 Kb, 192, 511.971940, 112.693998 102 | read_async_rdadvise 256 Kb, 192, 510.458774, 104.784263 103 | read_async_rdadvise 1024 Kb, 192, 548.391698, 94.347677 104 | read_async_rdadvise 4096 Kb, 192, 465.762028, 24.078303 105 | read_async_rdadvise 16384 Kb, 192, 490.223664, 52.579816 106 | read_async_rdadvise 65536 Kb, 192, 566.318593, 70.387740 107 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_224.csv: -------------------------------------------------------------------------------- 1 | Method, File Size (KB), Mean (ms), Stddev (ms) 2 | read_plain 4 Kb, 224, 741.249472, 43.399819 3 | read_plain 8 Kb, 224, 741.124900, 48.427310 4 | read_plain 12 Kb, 224, 759.801372, 52.994560 5 | read_plain 16 Kb, 224, 744.278730, 43.396030 6 | read_plain 24 Kb, 224, 726.773182, 19.016682 7 | read_plain 32 Kb, 224, 737.690638, 57.990389 8 | read_plain 40 Kb, 224, 742.183986, 40.934994 9 | read_plain 48 Kb, 224, 742.153021, 51.756842 10 | read_plain 56 Kb, 224, 756.623635, 49.871475 11 | read_plain 64 Kb, 224, 824.416594, 90.371522 12 | read_plain 256 Kb, 224, 771.538653, 108.458399 13 | read_plain 1024 Kb, 224, 708.037105, 96.408870 14 | read_plain 4096 Kb, 224, 691.749216, 68.197712 15 | read_plain 16384 Kb, 224, 731.975018, 121.089810 16 | read_plain 65536 Kb, 224, 632.566961, 37.356715 17 | read_nocache 4 Kb, 224, 6895.608041, 77.865554 18 | read_nocache 8 Kb, 224, 3879.828810, 69.967080 19 | read_nocache 12 Kb, 224, 2917.377806, 49.964615 20 | read_nocache 16 Kb, 224, 2415.690037, 54.706618 21 | read_nocache 24 Kb, 224, 1831.938201, 26.548937 22 | read_nocache 32 Kb, 224, 1484.781694, 29.750285 23 | read_nocache 40 Kb, 224, 1336.913747, 30.760838 24 | read_nocache 48 Kb, 224, 1219.086577, 28.769835 25 | read_nocache 56 Kb, 224, 1149.965619, 54.587734 26 | read_nocache 64 Kb, 224, 1153.932150, 73.092409 27 | read_nocache 256 Kb, 224, 1175.640570, 105.868467 28 | read_nocache 1024 Kb, 224, 825.349229, 91.955508 29 | read_nocache 4096 Kb, 224, 730.206159, 107.302783 30 | read_nocache 16384 Kb, 224, 668.021357, 72.946475 31 | read_nocache 65536 Kb, 224, 703.113482, 95.501260 32 | read_readahead 4 Kb, 224, 837.842754, 87.903830 33 | read_readahead 8 Kb, 224, 815.623388, 46.840729 34 | read_readahead 12 Kb, 224, 850.883035, 87.776763 35 | read_readahead 16 Kb, 224, 828.117658, 99.586623 36 | read_readahead 24 Kb, 224, 919.995880, 122.829146 37 | read_readahead 32 Kb, 224, 896.490708, 95.178209 38 | read_readahead 40 Kb, 224, 827.126276, 57.650916 39 | read_readahead 48 Kb, 224, 822.074132, 50.487968 40 | read_readahead 56 Kb, 224, 809.470909, 48.934003 41 | read_readahead 64 Kb, 224, 872.140606, 96.475019 42 | read_readahead 256 Kb, 224, 873.184466, 75.335139 43 | read_readahead 1024 Kb, 224, 733.024257, 58.380782 44 | read_readahead 4096 Kb, 224, 698.417725, 94.774570 45 | read_readahead 16384 Kb, 224, 811.058017, 111.248678 46 | read_readahead 65536 Kb, 224, 791.650393, 109.181815 47 | read_rdadvise 4 Kb, 224, 774.194271, 93.440932 48 | read_rdadvise 8 Kb, 224, 696.018353, 148.804784 49 | read_rdadvise 12 Kb, 224, 698.399580, 102.020980 50 | read_rdadvise 16 Kb, 224, 677.845083, 88.027692 51 | read_rdadvise 24 Kb, 224, 636.618241, 93.208746 52 | read_rdadvise 32 Kb, 224, 750.341123, 112.345330 53 | read_rdadvise 40 Kb, 224, 684.809959, 130.895942 54 | read_rdadvise 48 Kb, 224, 675.533690, 95.264619 55 | read_rdadvise 56 Kb, 224, 655.773779, 90.399821 56 | read_rdadvise 64 Kb, 224, 672.958101, 107.392211 57 | read_rdadvise 256 Kb, 224, 661.987736, 100.505901 58 | read_rdadvise 1024 Kb, 224, 653.313854, 84.547955 59 | read_rdadvise 4096 Kb, 224, 613.884130, 50.519496 60 | read_rdadvise 16384 Kb, 224, 633.195595, 75.927940 61 | read_rdadvise 65536 Kb, 224, 767.089644, 139.504809 62 | read_async_nocache 4 Kb, 224, 3834.523766, 56.634206 63 | read_async_nocache 8 Kb, 224, 2218.046358, 59.674341 64 | read_async_nocache 12 Kb, 224, 1649.040517, 65.931843 65 | read_async_nocache 16 Kb, 224, 1433.511181, 73.030358 66 | read_async_nocache 24 Kb, 224, 1150.415663, 92.565559 67 | read_async_nocache 32 Kb, 224, 935.520679, 57.089616 68 | read_async_nocache 40 Kb, 224, 904.292783, 124.112367 69 | read_async_nocache 48 Kb, 224, 845.283734, 72.812522 70 | read_async_nocache 56 Kb, 224, 877.320596, 185.384549 71 | read_async_nocache 64 Kb, 224, 908.577420, 177.479670 72 | read_async_nocache 256 Kb, 224, 843.999105, 101.460537 73 | read_async_nocache 1024 Kb, 224, 717.331968, 190.963432 74 | read_async_nocache 4096 Kb, 224, 615.575765, 130.463409 75 | read_async_nocache 16384 Kb, 224, 611.510150, 122.017230 76 | read_async_nocache 65536 Kb, 224, 687.543927, 120.228687 77 | read_async_rdahead 4 Kb, 224, 763.050001, 66.821060 78 | read_async_rdahead 8 Kb, 224, 832.307664, 94.735818 79 | read_async_rdahead 12 Kb, 224, 759.200229, 74.102894 80 | read_async_rdahead 16 Kb, 224, 783.103688, 80.209396 81 | read_async_rdahead 24 Kb, 224, 740.862360, 77.235622 82 | read_async_rdahead 32 Kb, 224, 743.556165, 63.598117 83 | read_async_rdahead 40 Kb, 224, 744.504180, 59.714628 84 | read_async_rdahead 48 Kb, 224, 790.331295, 92.928942 85 | read_async_rdahead 56 Kb, 224, 767.069817, 83.289684 86 | read_async_rdahead 64 Kb, 224, 755.017769, 82.304943 87 | read_async_rdahead 256 Kb, 224, 741.154380, 56.441790 88 | read_async_rdahead 1024 Kb, 224, 716.955487, 58.773988 89 | read_async_rdahead 4096 Kb, 224, 584.999789, 89.957298 90 | read_async_rdahead 16384 Kb, 224, 627.838928, 61.687014 91 | read_async_rdahead 65536 Kb, 224, 656.544181, 102.221486 92 | read_async_rdadvise 4 Kb, 224, 627.926368, 73.527574 93 | read_async_rdadvise 8 Kb, 224, 673.762860, 112.394424 94 | read_async_rdadvise 12 Kb, 224, 738.607596, 101.932861 95 | read_async_rdadvise 16 Kb, 224, 622.268579, 87.053987 96 | read_async_rdadvise 24 Kb, 224, 670.189246, 135.417002 97 | read_async_rdadvise 32 Kb, 224, 606.283923, 75.919193 98 | read_async_rdadvise 40 Kb, 224, 653.345808, 139.555189 99 | read_async_rdadvise 48 Kb, 224, 585.059752, 62.385787 100 | read_async_rdadvise 56 Kb, 224, 644.446799, 131.925509 101 | read_async_rdadvise 64 Kb, 224, 672.631154, 122.025963 102 | read_async_rdadvise 256 Kb, 224, 637.787213, 149.232044 103 | read_async_rdadvise 1024 Kb, 224, 674.247303, 108.955511 104 | read_async_rdadvise 4096 Kb, 224, 677.491596, 169.357550 105 | read_async_rdadvise 16384 Kb, 224, 583.360957, 30.705747 106 | read_async_rdadvise 65536 Kb, 224, 688.619267, 104.780244 107 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_24.csv: -------------------------------------------------------------------------------- 1 | Method, File Size (KB), Mean (ms), Stddev (ms) 2 | read_plain 4 Kb, 24, 91.565083, 1.082610 3 | read_plain 8 Kb, 24, 96.718697, 16.617928 4 | read_plain 12 Kb, 24, 96.821427, 15.183574 5 | read_plain 16 Kb, 24, 114.076482, 29.065951 6 | read_plain 24 Kb, 24, 105.369384, 28.071789 7 | read_plain 32 Kb, 24, 125.731209, 38.905741 8 | read_plain 40 Kb, 24, 109.422516, 30.158312 9 | read_plain 48 Kb, 24, 114.800478, 30.016565 10 | read_plain 56 Kb, 24, 105.643881, 29.451309 11 | read_plain 64 Kb, 24, 116.882766, 32.278321 12 | read_plain 256 Kb, 24, 107.795634, 30.443293 13 | read_plain 1024 Kb, 24, 87.192220, 20.450225 14 | read_plain 4096 Kb, 24, 78.170954, 17.735352 15 | read_plain 16384 Kb, 24, 78.093494, 2.280650 16 | read_nocache 4 Kb, 24, 776.966209, 13.901948 17 | read_nocache 8 Kb, 24, 451.981487, 34.758929 18 | read_nocache 12 Kb, 24, 342.268327, 18.657819 19 | read_nocache 16 Kb, 24, 288.711374, 19.617461 20 | read_nocache 24 Kb, 24, 226.538672, 20.927058 21 | read_nocache 32 Kb, 24, 200.299216, 37.217472 22 | read_nocache 40 Kb, 24, 161.741587, 11.413382 23 | read_nocache 48 Kb, 24, 151.647863, 17.446307 24 | read_nocache 56 Kb, 24, 142.500496, 11.509108 25 | read_nocache 64 Kb, 24, 137.478876, 12.161482 26 | read_nocache 256 Kb, 24, 145.786726, 15.952847 27 | read_nocache 1024 Kb, 24, 81.849799, 0.780937 28 | read_nocache 4096 Kb, 24, 78.297983, 18.829765 29 | read_nocache 16384 Kb, 24, 73.681500, 1.503759 30 | read_readahead 4 Kb, 24, 91.266124, 1.255009 31 | read_readahead 8 Kb, 24, 90.431517, 0.822425 32 | read_readahead 12 Kb, 24, 91.897027, 0.527163 33 | read_readahead 16 Kb, 24, 100.594128, 24.157767 34 | read_readahead 24 Kb, 24, 93.611247, 7.359428 35 | read_readahead 32 Kb, 24, 89.970472, 0.572351 36 | read_readahead 40 Kb, 24, 89.866263, 0.995793 37 | read_readahead 48 Kb, 24, 92.065433, 0.923363 38 | read_readahead 56 Kb, 24, 90.489138, 0.803058 39 | read_readahead 64 Kb, 24, 96.187997, 17.379939 40 | read_readahead 256 Kb, 24, 93.727129, 18.874697 41 | read_readahead 1024 Kb, 24, 77.865912, 0.547293 42 | read_readahead 4096 Kb, 24, 82.157339, 24.673597 43 | read_readahead 16384 Kb, 24, 79.601933, 6.594287 44 | read_rdadvise 4 Kb, 24, 59.761792, 12.491845 45 | read_rdadvise 8 Kb, 24, 53.071633, 0.643130 46 | read_rdadvise 12 Kb, 24, 60.518874, 12.767134 47 | read_rdadvise 16 Kb, 24, 53.137404, 0.709233 48 | read_rdadvise 24 Kb, 24, 59.323368, 18.458554 49 | read_rdadvise 32 Kb, 24, 58.258633, 15.665274 50 | read_rdadvise 40 Kb, 24, 63.732077, 22.478291 51 | read_rdadvise 48 Kb, 24, 63.834913, 18.267044 52 | read_rdadvise 56 Kb, 24, 60.325818, 17.574227 53 | read_rdadvise 64 Kb, 24, 52.811333, 0.512963 54 | read_rdadvise 256 Kb, 24, 60.070762, 17.318647 55 | read_rdadvise 1024 Kb, 24, 53.316005, 0.664153 56 | read_rdadvise 4096 Kb, 24, 55.009454, 0.846498 57 | read_rdadvise 16384 Kb, 24, 66.663056, 12.653157 58 | read_async_nocache 4 Kb, 24, 433.293735, 13.627851 59 | read_async_nocache 8 Kb, 24, 257.761968, 19.080066 60 | read_async_nocache 12 Kb, 24, 203.210935, 20.498251 61 | read_async_nocache 16 Kb, 24, 173.648570, 20.102261 62 | read_async_nocache 24 Kb, 24, 145.453954, 21.002465 63 | read_async_nocache 32 Kb, 24, 117.019140, 15.446015 64 | read_async_nocache 40 Kb, 24, 105.286491, 6.738556 65 | read_async_nocache 48 Kb, 24, 102.440135, 12.933179 66 | read_async_nocache 56 Kb, 24, 100.402052, 9.601338 67 | read_async_nocache 64 Kb, 24, 100.546821, 11.903345 68 | read_async_nocache 256 Kb, 24, 114.081972, 1.670253 69 | read_async_nocache 1024 Kb, 24, 74.831749, 27.156535 70 | read_async_nocache 4096 Kb, 24, 60.662412, 0.927243 71 | read_async_nocache 16384 Kb, 24, 76.188311, 1.319874 72 | read_async_rdahead 4 Kb, 24, 83.836079, 0.385065 73 | read_async_rdahead 8 Kb, 24, 86.661845, 9.299295 74 | read_async_rdahead 12 Kb, 24, 84.945185, 0.859302 75 | read_async_rdahead 16 Kb, 24, 84.317369, 1.051812 76 | read_async_rdahead 24 Kb, 24, 93.328876, 25.953383 77 | read_async_rdahead 32 Kb, 24, 92.175528, 27.024869 78 | read_async_rdahead 40 Kb, 24, 83.971695, 0.383060 79 | read_async_rdahead 48 Kb, 24, 82.667584, 1.425962 80 | read_async_rdahead 56 Kb, 24, 83.015019, 0.653953 81 | read_async_rdahead 64 Kb, 24, 82.359830, 0.768610 82 | read_async_rdahead 256 Kb, 24, 87.318713, 16.418927 83 | read_async_rdahead 1024 Kb, 24, 75.707541, 0.517678 84 | read_async_rdahead 4096 Kb, 24, 73.661970, 22.902328 85 | read_async_rdahead 16384 Kb, 24, 78.221233, 8.672400 86 | read_async_rdadvise 4 Kb, 24, 66.134563, 13.181884 87 | read_async_rdadvise 8 Kb, 24, 67.753003, 16.497549 88 | read_async_rdadvise 12 Kb, 24, 67.886715, 17.946438 89 | read_async_rdadvise 16 Kb, 24, 54.825064, 4.797795 90 | read_async_rdadvise 24 Kb, 24, 72.449009, 13.235340 91 | read_async_rdadvise 32 Kb, 24, 77.164778, 18.809085 92 | read_async_rdadvise 40 Kb, 24, 69.832069, 13.770823 93 | read_async_rdadvise 48 Kb, 24, 66.889223, 17.999011 94 | read_async_rdadvise 56 Kb, 24, 64.225210, 18.198687 95 | read_async_rdadvise 64 Kb, 24, 70.526187, 25.475916 96 | read_async_rdadvise 256 Kb, 24, 67.399605, 21.703173 97 | read_async_rdadvise 1024 Kb, 24, 64.570714, 21.749290 98 | read_async_rdadvise 4096 Kb, 24, 75.453726, 22.367227 99 | read_async_rdadvise 16384 Kb, 24, 78.850394, 26.725750 100 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_256.csv: -------------------------------------------------------------------------------- 1 | Method, File Size (KB), Mean (ms), Stddev (ms) 2 | read_plain 4 Kb, 256, 968.197466, 108.008299 3 | read_plain 8 Kb, 256, 941.848013, 57.874521 4 | read_plain 12 Kb, 256, 964.331317, 110.630672 5 | read_plain 16 Kb, 256, 935.146160, 79.547716 6 | read_plain 24 Kb, 256, 1014.535490, 141.176662 7 | read_plain 32 Kb, 256, 958.530876, 120.593432 8 | read_plain 40 Kb, 256, 974.670228, 87.470508 9 | read_plain 48 Kb, 256, 924.890810, 74.446608 10 | read_plain 56 Kb, 256, 944.020505, 83.109781 11 | read_plain 64 Kb, 256, 948.440212, 80.704693 12 | read_plain 256 Kb, 256, 882.661166, 96.149890 13 | read_plain 1024 Kb, 256, 789.059888, 37.714384 14 | read_plain 4096 Kb, 256, 758.159841, 106.209208 15 | read_plain 16384 Kb, 256, 761.992480, 59.656993 16 | read_plain 65536 Kb, 256, 804.045416, 79.750027 17 | read_plain 262144 Kb, 256, 824.644412, 101.132332 18 | read_nocache 4 Kb, 256, 8266.287352, 115.895422 19 | read_nocache 8 Kb, 256, 4822.561093, 165.981970 20 | read_nocache 12 Kb, 256, 3567.446413, 46.568284 21 | read_nocache 16 Kb, 256, 2874.583932, 66.813906 22 | read_nocache 24 Kb, 256, 2203.370788, 61.600186 23 | read_nocache 32 Kb, 256, 1823.900028, 91.212856 24 | read_nocache 40 Kb, 256, 1599.164888, 77.148087 25 | read_nocache 48 Kb, 256, 1450.623333, 64.982078 26 | read_nocache 56 Kb, 256, 1353.078255, 53.087560 27 | read_nocache 64 Kb, 256, 1305.617889, 83.340177 28 | read_nocache 256 Kb, 256, 1515.511025, 110.190686 29 | read_nocache 1024 Kb, 256, 1031.869017, 100.607254 30 | read_nocache 4096 Kb, 256, 832.675196, 132.123770 31 | read_nocache 16384 Kb, 256, 807.787841, 102.126579 32 | read_nocache 65536 Kb, 256, 840.874523, 110.526095 33 | read_nocache 262144 Kb, 256, 911.087008, 101.801211 34 | read_readahead 4 Kb, 256, 970.881335, 87.552856 35 | read_readahead 8 Kb, 256, 1016.406888, 116.584870 36 | read_readahead 12 Kb, 256, 966.591343, 121.681863 37 | read_readahead 16 Kb, 256, 967.365186, 104.670612 38 | read_readahead 24 Kb, 256, 1032.216436, 105.999179 39 | read_readahead 32 Kb, 256, 914.580725, 58.124442 40 | read_readahead 40 Kb, 256, 1008.276657, 79.588548 41 | read_readahead 48 Kb, 256, 951.296720, 60.118532 42 | read_readahead 56 Kb, 256, 936.856667, 116.167212 43 | read_readahead 64 Kb, 256, 958.190952, 81.650503 44 | read_readahead 256 Kb, 256, 891.600948, 58.548943 45 | read_readahead 1024 Kb, 256, 848.652452, 125.837543 46 | read_readahead 4096 Kb, 256, 744.500593, 94.793177 47 | read_readahead 16384 Kb, 256, 843.816010, 88.502790 48 | read_readahead 65536 Kb, 256, 784.936793, 75.923752 49 | read_readahead 262144 Kb, 256, 797.547114, 80.853112 50 | read_rdadvise 4 Kb, 256, 806.355038, 91.305877 51 | read_rdadvise 8 Kb, 256, 795.636185, 143.795383 52 | read_rdadvise 12 Kb, 256, 798.869729, 131.846570 53 | read_rdadvise 16 Kb, 256, 768.184868, 96.195179 54 | read_rdadvise 24 Kb, 256, 802.898597, 123.296743 55 | read_rdadvise 32 Kb, 256, 795.662776, 127.342023 56 | read_rdadvise 40 Kb, 256, 781.298819, 145.416891 57 | read_rdadvise 48 Kb, 256, 776.269549, 88.170665 58 | read_rdadvise 56 Kb, 256, 792.504092, 171.943342 59 | read_rdadvise 64 Kb, 256, 1083.474416, 775.710672 60 | read_rdadvise 256 Kb, 256, 826.863143, 114.548050 61 | read_rdadvise 1024 Kb, 256, 772.025883, 90.768532 62 | read_rdadvise 4096 Kb, 256, 770.598231, 73.582035 63 | read_rdadvise 16384 Kb, 256, 850.595257, 116.182512 64 | read_rdadvise 65536 Kb, 256, 792.929332, 77.436308 65 | read_rdadvise 262144 Kb, 256, 918.434904, 98.816735 66 | read_async_nocache 4 Kb, 256, 4335.429860, 76.342299 67 | read_async_nocache 8 Kb, 256, 2441.820484, 45.366895 68 | read_async_nocache 12 Kb, 256, 1912.902848, 84.476223 69 | read_async_nocache 16 Kb, 256, 1595.002669, 91.014792 70 | read_async_nocache 24 Kb, 256, 1299.489804, 104.386535 71 | read_async_nocache 32 Kb, 256, 1080.139089, 101.262472 72 | read_async_nocache 40 Kb, 256, 1111.962332, 149.644368 73 | read_async_nocache 48 Kb, 256, 997.868273, 137.229252 74 | read_async_nocache 56 Kb, 256, 928.010158, 115.816674 75 | read_async_nocache 64 Kb, 256, 944.499547, 133.545401 76 | read_async_nocache 256 Kb, 256, 1085.046314, 89.398598 77 | read_async_nocache 1024 Kb, 256, 730.191302, 111.751739 78 | read_async_nocache 4096 Kb, 256, 734.871909, 178.364081 79 | read_async_nocache 16384 Kb, 256, 645.753442, 117.444630 80 | read_async_nocache 65536 Kb, 256, 792.805313, 58.037587 81 | read_async_nocache 262144 Kb, 256, 941.743243, 110.116085 82 | read_async_rdahead 4 Kb, 256, 920.013586, 141.384644 83 | read_async_rdahead 8 Kb, 256, 924.369044, 119.176380 84 | read_async_rdahead 12 Kb, 256, 900.241538, 132.984011 85 | read_async_rdahead 16 Kb, 256, 894.608551, 147.455771 86 | read_async_rdahead 24 Kb, 256, 936.056761, 135.635042 87 | read_async_rdahead 32 Kb, 256, 934.943888, 136.920965 88 | read_async_rdahead 40 Kb, 256, 856.349937, 103.229175 89 | read_async_rdahead 48 Kb, 256, 904.590921, 143.815327 90 | read_async_rdahead 56 Kb, 256, 798.420481, 66.906174 91 | read_async_rdahead 64 Kb, 256, 849.384880, 103.590005 92 | read_async_rdahead 256 Kb, 256, 846.001826, 111.052647 93 | read_async_rdahead 1024 Kb, 256, 787.964777, 65.452140 94 | read_async_rdahead 4096 Kb, 256, 664.840891, 84.168890 95 | read_async_rdahead 16384 Kb, 256, 728.221415, 169.495825 96 | read_async_rdahead 65536 Kb, 256, 788.837902, 120.262053 97 | read_async_rdahead 262144 Kb, 256, 845.727017, 108.521894 98 | read_async_rdadvise 4 Kb, 256, 735.098554, 73.884525 99 | read_async_rdadvise 8 Kb, 256, 816.314383, 155.968145 100 | read_async_rdadvise 12 Kb, 256, 744.920796, 103.140686 101 | read_async_rdadvise 16 Kb, 256, 771.589294, 106.136355 102 | read_async_rdadvise 24 Kb, 256, 802.294822, 67.174951 103 | read_async_rdadvise 32 Kb, 256, 715.522257, 59.429179 104 | read_async_rdadvise 40 Kb, 256, 720.988629, 68.140974 105 | read_async_rdadvise 48 Kb, 256, 782.469035, 140.459912 106 | read_async_rdadvise 56 Kb, 256, 738.176489, 78.224458 107 | read_async_rdadvise 64 Kb, 256, 764.900467, 121.693997 108 | read_async_rdadvise 256 Kb, 256, 754.231263, 99.777586 109 | read_async_rdadvise 1024 Kb, 256, 725.234176, 104.026417 110 | read_async_rdadvise 4096 Kb, 256, 752.520787, 118.364877 111 | read_async_rdadvise 16384 Kb, 256, 768.457263, 131.671473 112 | read_async_rdadvise 65536 Kb, 256, 802.871067, 109.646419 113 | read_async_rdadvise 262144 Kb, 256, 839.041597, 81.946225 114 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_32.csv: -------------------------------------------------------------------------------- 1 | Method, File Size (KB), Mean (ms), Stddev (ms) 2 | read_plain 4 Kb, 32, 145.171068, 29.293599 3 | read_plain 8 Kb, 32, 138.291136, 35.430672 4 | read_plain 12 Kb, 32, 120.640845, 1.507195 5 | read_plain 16 Kb, 32, 125.793308, 17.164429 6 | read_plain 24 Kb, 32, 120.381608, 1.596260 7 | read_plain 32 Kb, 32, 118.904818, 1.235409 8 | read_plain 40 Kb, 32, 131.971412, 23.410516 9 | read_plain 48 Kb, 32, 130.557272, 30.375203 10 | read_plain 56 Kb, 32, 121.827979, 7.585153 11 | read_plain 64 Kb, 32, 120.647149, 5.872091 12 | read_plain 256 Kb, 32, 122.907831, 17.664826 13 | read_plain 1024 Kb, 32, 106.846794, 12.504458 14 | read_plain 4096 Kb, 32, 93.208099, 9.061059 15 | read_plain 16384 Kb, 32, 100.294567, 2.397653 16 | read_nocache 4 Kb, 32, 1137.112253, 13.997491 17 | read_nocache 8 Kb, 32, 671.373888, 69.047148 18 | read_nocache 12 Kb, 32, 494.493152, 33.779289 19 | read_nocache 16 Kb, 32, 404.656312, 30.306695 20 | read_nocache 24 Kb, 32, 311.893533, 21.893146 21 | read_nocache 32 Kb, 32, 243.394628, 4.527788 22 | read_nocache 40 Kb, 32, 230.392742, 27.207629 23 | read_nocache 48 Kb, 32, 208.777401, 25.720860 24 | read_nocache 56 Kb, 32, 182.817149, 21.089675 25 | read_nocache 64 Kb, 32, 168.292650, 16.876689 26 | read_nocache 256 Kb, 32, 173.486492, 4.336300 27 | read_nocache 1024 Kb, 32, 120.464042, 26.104226 28 | read_nocache 4096 Kb, 32, 105.644717, 12.308805 29 | read_nocache 16384 Kb, 32, 98.109510, 2.220248 30 | read_readahead 4 Kb, 32, 123.081405, 26.253275 31 | read_readahead 8 Kb, 32, 153.960694, 37.037040 32 | read_readahead 12 Kb, 32, 119.712116, 21.968161 33 | read_readahead 16 Kb, 32, 115.862790, 4.966169 34 | read_readahead 24 Kb, 32, 135.724980, 40.029673 35 | read_readahead 32 Kb, 32, 118.722552, 22.041825 36 | read_readahead 40 Kb, 32, 109.097985, 1.715197 37 | read_readahead 48 Kb, 32, 120.457629, 25.592508 38 | read_readahead 56 Kb, 32, 135.133880, 39.582627 39 | read_readahead 64 Kb, 32, 108.316910, 1.909272 40 | read_readahead 256 Kb, 32, 106.358259, 1.095736 41 | read_readahead 1024 Kb, 32, 102.332817, 20.940029 42 | read_readahead 4096 Kb, 32, 87.249488, 1.449460 43 | read_readahead 16384 Kb, 32, 103.452802, 14.220506 44 | read_rdadvise 4 Kb, 32, 68.458807, 0.558020 45 | read_rdadvise 8 Kb, 32, 76.726906, 24.995576 46 | read_rdadvise 12 Kb, 32, 76.036133, 14.093962 47 | read_rdadvise 16 Kb, 32, 96.187495, 28.404794 48 | read_rdadvise 24 Kb, 32, 95.661561, 24.797396 49 | read_rdadvise 32 Kb, 32, 75.366938, 23.089113 50 | read_rdadvise 40 Kb, 32, 87.221583, 34.242425 51 | read_rdadvise 48 Kb, 32, 138.439919, 76.006192 52 | read_rdadvise 56 Kb, 32, 81.355933, 28.501823 53 | read_rdadvise 64 Kb, 32, 82.043002, 28.807536 54 | read_rdadvise 256 Kb, 32, 76.001144, 22.630138 55 | read_rdadvise 1024 Kb, 32, 68.545107, 0.462030 56 | read_rdadvise 4096 Kb, 32, 82.407697, 28.919260 57 | read_rdadvise 16384 Kb, 32, 109.357427, 27.350426 58 | read_async_nocache 4 Kb, 32, 1086.613123, 556.407823 59 | read_async_nocache 8 Kb, 32, 428.184200, 24.996255 60 | read_async_nocache 12 Kb, 32, 308.838744, 24.464328 61 | read_async_nocache 16 Kb, 32, 240.882582, 3.569581 62 | read_async_nocache 24 Kb, 32, 200.156682, 24.637075 63 | read_async_nocache 32 Kb, 32, 172.238081, 29.527754 64 | read_async_nocache 40 Kb, 32, 139.901342, 7.985122 65 | read_async_nocache 48 Kb, 32, 139.455174, 42.179200 66 | read_async_nocache 56 Kb, 32, 141.348053, 46.801740 67 | read_async_nocache 64 Kb, 32, 131.049519, 37.586009 68 | read_async_nocache 256 Kb, 32, 152.620072, 47.508751 69 | read_async_nocache 1024 Kb, 32, 90.905525, 20.112997 70 | read_async_nocache 4096 Kb, 32, 79.809845, 1.068709 71 | read_async_nocache 16384 Kb, 32, 117.737371, 25.236581 72 | read_async_rdahead 4 Kb, 32, 121.199750, 25.966798 73 | read_async_rdahead 8 Kb, 32, 111.938230, 15.255360 74 | read_async_rdahead 12 Kb, 32, 106.530463, 8.639317 75 | read_async_rdahead 16 Kb, 32, 104.111801, 3.228992 76 | read_async_rdahead 24 Kb, 32, 114.104636, 20.513158 77 | read_async_rdahead 32 Kb, 32, 108.565328, 9.446982 78 | read_async_rdahead 40 Kb, 32, 126.033175, 38.771047 79 | read_async_rdahead 48 Kb, 32, 126.214494, 24.190822 80 | read_async_rdahead 56 Kb, 32, 117.805237, 30.584649 81 | read_async_rdahead 64 Kb, 32, 102.128070, 2.896448 82 | read_async_rdahead 256 Kb, 32, 108.070124, 23.077276 83 | read_async_rdahead 1024 Kb, 32, 100.827076, 17.607036 84 | read_async_rdahead 4096 Kb, 32, 85.713985, 11.881304 85 | read_async_rdahead 16384 Kb, 32, 104.398620, 12.392276 86 | read_async_rdadvise 4 Kb, 32, 76.305521, 11.579201 87 | read_async_rdadvise 8 Kb, 32, 80.767326, 16.444540 88 | read_async_rdadvise 12 Kb, 32, 95.964834, 20.976946 89 | read_async_rdadvise 16 Kb, 32, 76.533081, 13.160012 90 | read_async_rdadvise 24 Kb, 32, 94.430934, 27.350327 91 | read_async_rdadvise 32 Kb, 32, 82.001229, 13.867855 92 | read_async_rdadvise 40 Kb, 32, 80.048633, 12.669204 93 | read_async_rdadvise 48 Kb, 32, 91.775548, 12.052957 94 | read_async_rdadvise 56 Kb, 32, 70.820222, 8.192028 95 | read_async_rdadvise 64 Kb, 32, 79.514193, 12.989884 96 | read_async_rdadvise 256 Kb, 32, 68.174895, 0.528475 97 | read_async_rdadvise 1024 Kb, 32, 75.156912, 19.901796 98 | read_async_rdadvise 4096 Kb, 32, 75.178993, 11.875344 99 | read_async_rdadvise 16384 Kb, 32, 93.957976, 18.292701 100 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_320.csv: -------------------------------------------------------------------------------- 1 | Method, Mean (ms), Stddev (ms) 2 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_40.csv: -------------------------------------------------------------------------------- 1 | Method, File Size (KB), Mean (ms), Stddev (ms) 2 | read_plain 4 Kb, 40, 141.247444, 1.797185 3 | read_plain 8 Kb, 40, 147.162930, 22.149994 4 | read_plain 12 Kb, 40, 144.962489, 17.189314 5 | read_plain 16 Kb, 40, 144.658885, 22.821143 6 | read_plain 24 Kb, 40, 145.124099, 20.901032 7 | read_plain 32 Kb, 40, 137.857147, 2.438420 8 | read_plain 40 Kb, 40, 142.315476, 17.244814 9 | read_plain 48 Kb, 40, 136.770374, 1.948859 10 | read_plain 56 Kb, 40, 148.903683, 30.356400 11 | read_plain 64 Kb, 40, 158.011562, 34.797390 12 | read_plain 256 Kb, 40, 130.783893, 3.192856 13 | read_plain 1024 Kb, 40, 127.210557, 26.183199 14 | read_plain 4096 Kb, 40, 122.218433, 20.559012 15 | read_plain 16384 Kb, 40, 129.702351, 2.181648 16 | read_nocache 4 Kb, 40, 1311.458600, 29.280731 17 | read_nocache 8 Kb, 40, 729.921616, 22.951815 18 | read_nocache 12 Kb, 40, 519.913793, 7.452009 19 | read_nocache 16 Kb, 40, 437.760372, 21.447768 20 | read_nocache 24 Kb, 40, 334.485917, 15.610453 21 | read_nocache 32 Kb, 40, 272.026718, 25.960637 22 | read_nocache 40 Kb, 40, 238.716029, 6.584671 23 | read_nocache 48 Kb, 40, 223.971475, 19.532497 24 | read_nocache 56 Kb, 40, 255.405601, 34.244982 25 | read_nocache 64 Kb, 40, 223.497349, 31.710697 26 | read_nocache 256 Kb, 40, 238.113711, 30.277732 27 | read_nocache 1024 Kb, 40, 157.893718, 25.312253 28 | read_nocache 4096 Kb, 40, 142.655994, 35.238732 29 | read_nocache 16384 Kb, 40, 138.717526, 33.794528 30 | read_readahead 4 Kb, 40, 138.558358, 2.286361 31 | read_readahead 8 Kb, 40, 137.053734, 2.082958 32 | read_readahead 12 Kb, 40, 137.645621, 2.166405 33 | read_readahead 16 Kb, 40, 138.371571, 2.320944 34 | read_readahead 24 Kb, 40, 140.137117, 4.451269 35 | read_readahead 32 Kb, 40, 159.343057, 26.968678 36 | read_readahead 40 Kb, 40, 146.106150, 14.840455 37 | read_readahead 48 Kb, 40, 146.294196, 15.386616 38 | read_readahead 56 Kb, 40, 141.361555, 8.665461 39 | read_readahead 64 Kb, 40, 148.300511, 26.828392 40 | read_readahead 256 Kb, 40, 132.932699, 7.156020 41 | read_readahead 1024 Kb, 40, 119.524890, 12.137826 42 | read_readahead 4096 Kb, 40, 122.806550, 18.402552 43 | read_readahead 16384 Kb, 40, 124.027551, 0.973621 44 | read_rdadvise 4 Kb, 40, 86.677698, 4.800879 45 | read_rdadvise 8 Kb, 40, 87.724928, 7.698144 46 | read_rdadvise 12 Kb, 40, 92.141056, 19.894370 47 | read_rdadvise 16 Kb, 40, 104.088683, 29.307721 48 | read_rdadvise 24 Kb, 40, 86.207745, 1.336650 49 | read_rdadvise 32 Kb, 40, 106.520926, 33.406932 50 | read_rdadvise 40 Kb, 40, 90.854058, 9.825265 51 | read_rdadvise 48 Kb, 40, 85.888639, 0.332063 52 | read_rdadvise 56 Kb, 40, 96.348182, 13.821639 53 | read_rdadvise 64 Kb, 40, 89.455116, 10.333915 54 | read_rdadvise 256 Kb, 40, 101.833925, 32.306192 55 | read_rdadvise 1024 Kb, 40, 86.354018, 0.780027 56 | read_rdadvise 4096 Kb, 40, 96.368781, 17.769337 57 | read_rdadvise 16384 Kb, 40, 99.612632, 12.555343 58 | read_async_nocache 4 Kb, 40, 940.386158, 56.897786 59 | read_async_nocache 8 Kb, 40, 559.213303, 12.187408 60 | read_async_nocache 12 Kb, 40, 418.302330, 26.143138 61 | read_async_nocache 16 Kb, 40, 335.484158, 17.290743 62 | read_async_nocache 24 Kb, 40, 245.354366, 3.590470 63 | read_async_nocache 32 Kb, 40, 229.389581, 43.135271 64 | read_async_nocache 40 Kb, 40, 181.618302, 18.866876 65 | read_async_nocache 48 Kb, 40, 160.119791, 1.627976 66 | read_async_nocache 56 Kb, 40, 160.254605, 40.304436 67 | read_async_nocache 64 Kb, 40, 153.042771, 30.109884 68 | read_async_nocache 256 Kb, 40, 164.473412, 6.320216 69 | read_async_nocache 1024 Kb, 40, 125.666273, 42.591429 70 | read_async_nocache 4096 Kb, 40, 97.714394, 1.006041 71 | read_async_nocache 16384 Kb, 40, 153.754192, 40.375549 72 | read_async_rdahead 4 Kb, 40, 128.500572, 1.198863 73 | read_async_rdahead 8 Kb, 40, 134.528252, 21.423404 74 | read_async_rdahead 12 Kb, 40, 157.639726, 37.215477 75 | read_async_rdahead 16 Kb, 40, 145.444359, 39.527077 76 | read_async_rdahead 24 Kb, 40, 132.793825, 13.185188 77 | read_async_rdahead 32 Kb, 40, 153.595251, 46.023504 78 | read_async_rdahead 40 Kb, 40, 127.247338, 3.245489 79 | read_async_rdahead 48 Kb, 40, 141.224860, 29.687204 80 | read_async_rdahead 56 Kb, 40, 144.843313, 35.893238 81 | read_async_rdahead 64 Kb, 40, 134.419487, 27.662480 82 | read_async_rdahead 256 Kb, 40, 155.402243, 35.539558 83 | read_async_rdahead 1024 Kb, 40, 128.572979, 9.886668 84 | read_async_rdahead 4096 Kb, 40, 116.731976, 21.375828 85 | read_async_rdahead 16384 Kb, 40, 116.049975, 3.353959 86 | read_async_rdadvise 4 Kb, 40, 115.784581, 23.156603 87 | read_async_rdadvise 8 Kb, 40, 109.999447, 31.159492 88 | read_async_rdadvise 12 Kb, 40, 120.699893, 36.091212 89 | read_async_rdadvise 16 Kb, 40, 95.825493, 18.407079 90 | read_async_rdadvise 24 Kb, 40, 93.791317, 14.241790 91 | read_async_rdadvise 32 Kb, 40, 107.765109, 11.953750 92 | read_async_rdadvise 40 Kb, 40, 103.589693, 16.227547 93 | read_async_rdadvise 48 Kb, 40, 93.604524, 13.985987 94 | read_async_rdadvise 56 Kb, 40, 102.237359, 25.036895 95 | read_async_rdadvise 64 Kb, 40, 94.636236, 15.057552 96 | read_async_rdadvise 256 Kb, 40, 90.396411, 12.294217 97 | read_async_rdadvise 1024 Kb, 40, 92.329844, 21.123358 98 | read_async_rdadvise 4096 Kb, 40, 97.170713, 28.428426 99 | read_async_rdadvise 16384 Kb, 40, 112.579125, 27.371750 100 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_48.csv: -------------------------------------------------------------------------------- 1 | Method, File Size (KB), Mean (ms), Stddev (ms) 2 | read_plain 4 Kb, 48, 186.396018, 45.889596 3 | read_plain 8 Kb, 48, 170.710411, 32.616694 4 | read_plain 12 Kb, 48, 169.589479, 13.527202 5 | read_plain 16 Kb, 48, 166.426882, 2.835208 6 | read_plain 24 Kb, 48, 164.983183, 2.330238 7 | read_plain 32 Kb, 48, 163.933213, 4.467660 8 | read_plain 40 Kb, 48, 163.894661, 1.542184 9 | read_plain 48 Kb, 48, 165.130224, 1.603405 10 | read_plain 56 Kb, 48, 199.576810, 45.612627 11 | read_plain 64 Kb, 48, 181.625143, 11.369150 12 | read_plain 256 Kb, 48, 171.499064, 2.607737 13 | read_plain 1024 Kb, 48, 151.089768, 1.450665 14 | read_plain 4096 Kb, 48, 152.194754, 31.344910 15 | read_plain 16384 Kb, 48, 159.486981, 21.886169 16 | read_nocache 4 Kb, 48, 1564.301764, 21.976469 17 | read_nocache 8 Kb, 48, 845.691552, 4.600932 18 | read_nocache 12 Kb, 48, 618.048938, 5.675180 19 | read_nocache 16 Kb, 48, 461.352963, 14.034326 20 | read_nocache 24 Kb, 48, 383.245120, 31.754951 21 | read_nocache 32 Kb, 48, 350.183379, 34.351497 22 | read_nocache 40 Kb, 48, 301.932666, 23.411821 23 | read_nocache 48 Kb, 48, 274.863749, 31.256306 24 | read_nocache 56 Kb, 48, 245.891305, 2.132702 25 | read_nocache 64 Kb, 48, 268.826318, 67.381641 26 | read_nocache 256 Kb, 48, 302.283692, 50.384246 27 | read_nocache 1024 Kb, 48, 217.566021, 46.557662 28 | read_nocache 4096 Kb, 48, 177.421905, 44.796537 29 | read_nocache 16384 Kb, 48, 155.712030, 17.790718 30 | read_readahead 4 Kb, 48, 166.884550, 3.204532 31 | read_readahead 8 Kb, 48, 190.004571, 36.066828 32 | read_readahead 12 Kb, 48, 180.984567, 1.643800 33 | read_readahead 16 Kb, 48, 172.150803, 6.367842 34 | read_readahead 24 Kb, 48, 167.686806, 2.256400 35 | read_readahead 32 Kb, 48, 169.757449, 7.965871 36 | read_readahead 40 Kb, 48, 163.153160, 2.724260 37 | read_readahead 48 Kb, 48, 165.921116, 1.690336 38 | read_readahead 56 Kb, 48, 173.222667, 21.892760 39 | read_readahead 64 Kb, 48, 163.804264, 2.083636 40 | read_readahead 256 Kb, 48, 156.896991, 2.101281 41 | read_readahead 1024 Kb, 48, 144.308411, 17.014445 42 | read_readahead 4096 Kb, 48, 153.211329, 34.927023 43 | read_readahead 16384 Kb, 48, 154.827983, 21.312080 44 | read_rdadvise 4 Kb, 48, 124.246084, 39.321202 45 | read_rdadvise 8 Kb, 48, 117.860300, 32.724298 46 | read_rdadvise 12 Kb, 48, 113.719305, 34.241744 47 | read_rdadvise 16 Kb, 48, 110.497596, 17.490923 48 | read_rdadvise 24 Kb, 48, 109.317218, 11.519030 49 | read_rdadvise 32 Kb, 48, 126.607011, 33.381522 50 | read_rdadvise 40 Kb, 48, 128.859054, 27.793594 51 | read_rdadvise 48 Kb, 48, 115.148658, 20.322505 52 | read_rdadvise 56 Kb, 48, 111.079426, 25.615499 53 | read_rdadvise 64 Kb, 48, 110.309918, 24.610088 54 | read_rdadvise 256 Kb, 48, 121.017754, 39.410141 55 | read_rdadvise 1024 Kb, 48, 102.415675, 0.741373 56 | read_rdadvise 4096 Kb, 48, 119.066793, 29.753185 57 | read_rdadvise 16384 Kb, 48, 117.788683, 0.927135 58 | read_async_nocache 4 Kb, 48, 1186.033327, 66.125996 59 | read_async_nocache 8 Kb, 48, 714.103780, 48.727688 60 | read_async_nocache 12 Kb, 48, 539.383361, 37.325393 61 | read_async_nocache 16 Kb, 48, 405.616545, 8.255092 62 | read_async_nocache 24 Kb, 48, 311.832932, 30.484850 63 | read_async_nocache 32 Kb, 48, 259.662348, 28.601038 64 | read_async_nocache 40 Kb, 48, 232.443030, 39.279802 65 | read_async_nocache 48 Kb, 48, 209.899837, 39.478179 66 | read_async_nocache 56 Kb, 48, 204.834135, 56.454301 67 | read_async_nocache 64 Kb, 48, 178.688563, 30.380997 68 | read_async_nocache 256 Kb, 48, 205.426919, 35.384112 69 | read_async_nocache 1024 Kb, 48, 140.398805, 37.411031 70 | read_async_nocache 4096 Kb, 48, 116.764955, 1.261549 71 | read_async_nocache 16384 Kb, 48, 167.266313, 45.382330 72 | read_async_rdahead 4 Kb, 48, 162.090846, 19.957011 73 | read_async_rdahead 8 Kb, 48, 157.876422, 5.290502 74 | read_async_rdahead 12 Kb, 48, 165.167193, 23.313362 75 | read_async_rdahead 16 Kb, 48, 167.108413, 22.570098 76 | read_async_rdahead 24 Kb, 48, 154.152741, 2.977556 77 | read_async_rdahead 32 Kb, 48, 167.180021, 37.540656 78 | read_async_rdahead 40 Kb, 48, 152.362350, 2.668138 79 | read_async_rdahead 48 Kb, 48, 151.766523, 2.877015 80 | read_async_rdahead 56 Kb, 48, 153.456950, 3.089110 81 | read_async_rdahead 64 Kb, 48, 150.568763, 2.375742 82 | read_async_rdahead 256 Kb, 48, 155.426062, 27.032476 83 | read_async_rdahead 1024 Kb, 48, 134.769839, 2.482885 84 | read_async_rdahead 4096 Kb, 48, 123.663509, 8.551217 85 | read_async_rdahead 16384 Kb, 48, 160.505422, 40.245640 86 | read_async_rdadvise 4 Kb, 48, 113.632366, 18.223614 87 | read_async_rdadvise 8 Kb, 48, 132.843268, 35.166989 88 | read_async_rdadvise 12 Kb, 48, 127.044225, 25.285153 89 | read_async_rdadvise 16 Kb, 48, 118.729521, 20.415489 90 | read_async_rdadvise 24 Kb, 48, 117.122218, 19.662183 91 | read_async_rdadvise 32 Kb, 48, 130.375676, 23.837184 92 | read_async_rdadvise 40 Kb, 48, 137.174222, 41.339553 93 | read_async_rdadvise 48 Kb, 48, 131.290625, 24.941350 94 | read_async_rdadvise 56 Kb, 48, 124.500570, 30.573241 95 | read_async_rdadvise 64 Kb, 48, 137.457869, 36.875126 96 | read_async_rdadvise 256 Kb, 48, 118.553340, 33.826838 97 | read_async_rdadvise 1024 Kb, 48, 102.364424, 0.474573 98 | read_async_rdadvise 4096 Kb, 48, 122.602106, 29.536070 99 | read_async_rdadvise 16384 Kb, 48, 129.525314, 20.932637 100 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_56.csv: -------------------------------------------------------------------------------- 1 | Method, File Size (KB), Mean (ms), Stddev (ms) 2 | read_plain 4 Kb, 56, 202.930689, 10.149882 3 | read_plain 8 Kb, 56, 205.444457, 20.691792 4 | read_plain 12 Kb, 56, 203.146005, 9.339134 5 | read_plain 16 Kb, 56, 205.133491, 18.159567 6 | read_plain 24 Kb, 56, 206.238998, 26.397695 7 | read_plain 32 Kb, 56, 195.265831, 3.125169 8 | read_plain 40 Kb, 56, 201.966385, 21.578801 9 | read_plain 48 Kb, 56, 218.424752, 31.203198 10 | read_plain 56 Kb, 56, 253.819390, 52.779973 11 | read_plain 64 Kb, 56, 230.538453, 35.036930 12 | read_plain 256 Kb, 56, 198.103739, 0.851408 13 | read_plain 1024 Kb, 56, 183.103082, 21.645976 14 | read_plain 4096 Kb, 56, 186.913962, 45.631708 15 | read_plain 16384 Kb, 56, 186.493833, 24.709980 16 | read_nocache 4 Kb, 56, 1804.264273, 20.613521 17 | read_nocache 8 Kb, 56, 1000.785585, 22.649004 18 | read_nocache 12 Kb, 56, 722.122267, 8.106576 19 | read_nocache 16 Kb, 56, 608.153140, 33.696774 20 | read_nocache 24 Kb, 56, 455.141760, 10.470838 21 | read_nocache 32 Kb, 56, 373.216956, 6.520017 22 | read_nocache 40 Kb, 56, 346.042594, 25.927787 23 | read_nocache 48 Kb, 56, 309.486686, 14.844196 24 | read_nocache 56 Kb, 56, 300.245376, 37.696420 25 | read_nocache 64 Kb, 56, 281.927875, 30.897546 26 | read_nocache 256 Kb, 56, 333.632531, 43.717031 27 | read_nocache 1024 Kb, 56, 213.288547, 37.031845 28 | read_nocache 4096 Kb, 56, 191.528271, 38.029670 29 | read_nocache 16384 Kb, 56, 190.320664, 31.862650 30 | read_readahead 4 Kb, 56, 237.931754, 47.408021 31 | read_readahead 8 Kb, 56, 209.146474, 1.862155 32 | read_readahead 12 Kb, 56, 228.917660, 32.883840 33 | read_readahead 16 Kb, 56, 218.363845, 40.645670 34 | read_readahead 24 Kb, 56, 203.252065, 18.703189 35 | read_readahead 32 Kb, 56, 222.268345, 36.915099 36 | read_readahead 40 Kb, 56, 201.050638, 18.863358 37 | read_readahead 48 Kb, 56, 207.241726, 30.891125 38 | read_readahead 56 Kb, 56, 199.076785, 3.648461 39 | read_readahead 64 Kb, 56, 202.073975, 20.263693 40 | read_readahead 256 Kb, 56, 195.229407, 25.203867 41 | read_readahead 1024 Kb, 56, 168.270955, 29.075419 42 | read_readahead 4096 Kb, 56, 176.769680, 30.803317 43 | read_readahead 16384 Kb, 56, 176.329962, 3.126651 44 | read_rdadvise 4 Kb, 56, 148.471717, 34.094704 45 | read_rdadvise 8 Kb, 56, 149.564975, 28.881199 46 | read_rdadvise 12 Kb, 56, 142.348841, 27.926223 47 | read_rdadvise 16 Kb, 56, 145.684338, 31.466459 48 | read_rdadvise 24 Kb, 56, 126.453065, 1.763676 49 | read_rdadvise 32 Kb, 56, 156.405229, 42.712478 50 | read_rdadvise 40 Kb, 56, 143.592356, 33.512927 51 | read_rdadvise 48 Kb, 56, 157.601403, 46.696235 52 | read_rdadvise 56 Kb, 56, 153.135437, 50.227039 53 | read_rdadvise 64 Kb, 56, 138.142037, 35.309396 54 | read_rdadvise 256 Kb, 56, 133.525371, 29.777828 55 | read_rdadvise 1024 Kb, 56, 149.917571, 44.543283 56 | read_rdadvise 4096 Kb, 56, 144.709454, 44.705375 57 | read_rdadvise 16384 Kb, 56, 128.542766, 0.586511 58 | read_async_nocache 4 Kb, 56, 1415.413062, 134.126663 59 | read_async_nocache 8 Kb, 56, 886.368864, 23.710701 60 | read_async_nocache 12 Kb, 56, 620.915454, 24.389755 61 | read_async_nocache 16 Kb, 56, 488.119938, 4.956578 62 | read_async_nocache 24 Kb, 56, 360.655701, 24.037415 63 | read_async_nocache 32 Kb, 56, 289.258699, 8.121916 64 | read_async_nocache 40 Kb, 56, 272.834343, 34.733885 65 | read_async_nocache 48 Kb, 56, 233.491613, 10.304465 66 | read_async_nocache 56 Kb, 56, 227.082917, 42.295685 67 | read_async_nocache 64 Kb, 56, 228.229760, 64.527289 68 | read_async_nocache 256 Kb, 56, 246.087610, 33.496579 69 | read_async_nocache 1024 Kb, 56, 163.307170, 33.158730 70 | read_async_nocache 4096 Kb, 56, 137.968364, 12.676346 71 | read_async_nocache 16384 Kb, 56, 164.907527, 41.302148 72 | read_async_rdahead 4 Kb, 56, 240.511049, 50.545433 73 | read_async_rdahead 8 Kb, 56, 193.319684, 22.569825 74 | read_async_rdahead 12 Kb, 56, 194.931952, 30.858729 75 | read_async_rdahead 16 Kb, 56, 193.656406, 29.568542 76 | read_async_rdahead 24 Kb, 56, 203.509658, 38.573276 77 | read_async_rdahead 32 Kb, 56, 183.808438, 1.575826 78 | read_async_rdahead 40 Kb, 56, 197.322249, 41.677452 79 | read_async_rdahead 48 Kb, 56, 181.969572, 3.517076 80 | read_async_rdahead 56 Kb, 56, 219.773446, 41.769992 81 | read_async_rdahead 64 Kb, 56, 193.595827, 29.204868 82 | read_async_rdahead 256 Kb, 56, 187.793747, 34.868761 83 | read_async_rdahead 1024 Kb, 56, 179.028662, 35.180346 84 | read_async_rdahead 4096 Kb, 56, 133.854341, 1.343241 85 | read_async_rdahead 16384 Kb, 56, 188.611359, 50.030723 86 | read_async_rdadvise 4 Kb, 56, 143.974294, 25.366961 87 | read_async_rdadvise 8 Kb, 56, 154.732239, 25.205390 88 | read_async_rdadvise 12 Kb, 56, 162.767236, 44.802650 89 | read_async_rdadvise 16 Kb, 56, 153.803190, 22.910086 90 | read_async_rdadvise 24 Kb, 56, 168.699449, 47.532302 91 | read_async_rdadvise 32 Kb, 56, 131.653126, 17.358342 92 | read_async_rdadvise 40 Kb, 56, 168.297402, 30.541510 93 | read_async_rdadvise 48 Kb, 56, 168.220576, 50.631351 94 | read_async_rdadvise 56 Kb, 56, 157.163463, 47.304600 95 | read_async_rdadvise 64 Kb, 56, 163.214177, 49.875397 96 | read_async_rdadvise 256 Kb, 56, 146.359159, 40.999931 97 | read_async_rdadvise 1024 Kb, 56, 140.094161, 31.166285 98 | read_async_rdadvise 4096 Kb, 56, 152.140122, 59.036864 99 | read_async_rdadvise 16384 Kb, 56, 155.201073, 43.795470 100 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_64.csv: -------------------------------------------------------------------------------- 1 | Method, File Size (KB), Mean (ms), Stddev (ms) 2 | read_plain 4 Kb, 64, 236.784771, 31.399921 3 | read_plain 8 Kb, 64, 214.753575, 4.106124 4 | read_plain 12 Kb, 64, 247.439646, 53.932143 5 | read_plain 16 Kb, 64, 212.491762, 8.246044 6 | read_plain 24 Kb, 64, 220.851846, 4.538932 7 | read_plain 32 Kb, 64, 228.610100, 24.280148 8 | read_plain 40 Kb, 64, 222.269754, 21.622355 9 | read_plain 48 Kb, 64, 218.383770, 3.882651 10 | read_plain 56 Kb, 64, 238.773161, 34.379189 11 | read_plain 64 Kb, 64, 246.323931, 39.229985 12 | read_plain 256 Kb, 64, 221.503468, 3.152950 13 | read_plain 1024 Kb, 64, 205.848468, 16.729448 14 | read_plain 4096 Kb, 64, 186.521128, 1.787908 15 | read_plain 16384 Kb, 64, 238.536868, 49.746727 16 | read_plain 65536 Kb, 64, 237.099722, 52.529031 17 | read_nocache 4 Kb, 64, 2075.285524, 16.165299 18 | read_nocache 8 Kb, 64, 1141.232591, 36.217921 19 | read_nocache 12 Kb, 64, 822.228574, 14.739883 20 | read_nocache 16 Kb, 64, 673.935634, 18.005242 21 | read_nocache 24 Kb, 64, 515.459832, 45.812803 22 | read_nocache 32 Kb, 64, 440.941753, 13.464382 23 | read_nocache 40 Kb, 64, 438.341348, 53.373129 24 | read_nocache 48 Kb, 64, 364.673691, 19.509188 25 | read_nocache 56 Kb, 64, 336.378891, 24.517923 26 | read_nocache 64 Kb, 64, 327.193736, 36.095108 27 | read_nocache 256 Kb, 64, 353.771886, 8.652218 28 | read_nocache 1024 Kb, 64, 252.252508, 49.633065 29 | read_nocache 4096 Kb, 64, 203.543197, 13.529598 30 | read_nocache 16384 Kb, 64, 233.929407, 67.324277 31 | read_nocache 65536 Kb, 64, 224.376380, 40.283194 32 | read_readahead 4 Kb, 64, 250.549025, 57.331137 33 | read_readahead 8 Kb, 64, 245.397014, 35.591373 34 | read_readahead 12 Kb, 64, 236.386018, 38.157734 35 | read_readahead 16 Kb, 64, 252.841794, 52.276933 36 | read_readahead 24 Kb, 64, 242.074702, 52.682060 37 | read_readahead 32 Kb, 64, 262.097663, 43.421502 38 | read_readahead 40 Kb, 64, 226.568190, 31.964962 39 | read_readahead 48 Kb, 64, 239.866668, 38.843728 40 | read_readahead 56 Kb, 64, 263.447346, 54.847589 41 | read_readahead 64 Kb, 64, 215.943704, 7.070674 42 | read_readahead 256 Kb, 64, 212.559038, 7.557596 43 | read_readahead 1024 Kb, 64, 195.424795, 32.265765 44 | read_readahead 4096 Kb, 64, 198.692878, 36.760806 45 | read_readahead 16384 Kb, 64, 197.522762, 1.355019 46 | read_readahead 65536 Kb, 64, 209.103833, 3.844528 47 | read_rdadvise 4 Kb, 64, 197.042353, 55.036909 48 | read_rdadvise 8 Kb, 64, 153.893862, 2.151166 49 | read_rdadvise 12 Kb, 64, 161.183851, 24.498180 50 | read_rdadvise 16 Kb, 64, 186.294447, 62.369591 51 | read_rdadvise 24 Kb, 64, 162.069110, 36.214233 52 | read_rdadvise 32 Kb, 64, 177.635790, 55.268520 53 | read_rdadvise 40 Kb, 64, 163.865024, 35.481879 54 | read_rdadvise 48 Kb, 64, 156.051587, 27.366009 55 | read_rdadvise 56 Kb, 64, 161.929481, 37.282581 56 | read_rdadvise 64 Kb, 64, 173.409395, 51.142270 57 | read_rdadvise 256 Kb, 64, 152.227306, 28.919949 58 | read_rdadvise 1024 Kb, 64, 144.185294, 2.150230 59 | read_rdadvise 4096 Kb, 64, 170.978374, 48.872008 60 | read_rdadvise 16384 Kb, 64, 184.289818, 52.593524 61 | read_rdadvise 65536 Kb, 64, 200.941246, 13.031269 62 | read_async_nocache 4 Kb, 64, 1636.611588, 164.211931 63 | read_async_nocache 8 Kb, 64, 1001.080871, 22.661199 64 | read_async_nocache 12 Kb, 64, 723.761818, 35.483466 65 | read_async_nocache 16 Kb, 64, 556.088382, 25.541290 66 | read_async_nocache 24 Kb, 64, 422.970992, 27.856624 67 | read_async_nocache 32 Kb, 64, 337.158452, 25.119364 68 | read_async_nocache 40 Kb, 64, 315.751576, 45.416643 69 | read_async_nocache 48 Kb, 64, 290.301156, 72.499476 70 | read_async_nocache 56 Kb, 64, 262.983706, 39.341390 71 | read_async_nocache 64 Kb, 64, 251.857977, 43.928396 72 | read_async_nocache 256 Kb, 64, 335.071429, 49.692647 73 | read_async_nocache 1024 Kb, 64, 184.788185, 37.493398 74 | read_async_nocache 4096 Kb, 64, 161.762273, 33.362496 75 | read_async_nocache 16384 Kb, 64, 211.097939, 48.395489 76 | read_async_nocache 65536 Kb, 64, 246.192106, 47.106874 77 | read_async_rdahead 4 Kb, 64, 213.721900, 29.183231 78 | read_async_rdahead 8 Kb, 64, 235.846085, 53.840644 79 | read_async_rdahead 12 Kb, 64, 206.131434, 3.737854 80 | read_async_rdahead 16 Kb, 64, 222.212951, 30.495498 81 | read_async_rdahead 24 Kb, 64, 231.691583, 46.983167 82 | read_async_rdahead 32 Kb, 64, 215.720781, 36.166309 83 | read_async_rdahead 40 Kb, 64, 231.133268, 41.090996 84 | read_async_rdahead 48 Kb, 64, 232.088742, 36.000647 85 | read_async_rdahead 56 Kb, 64, 232.526753, 40.923123 86 | read_async_rdahead 64 Kb, 64, 221.212532, 45.140084 87 | read_async_rdahead 256 Kb, 64, 207.987034, 37.413458 88 | read_async_rdahead 1024 Kb, 64, 187.075125, 16.454229 89 | read_async_rdahead 4096 Kb, 64, 184.754866, 47.619985 90 | read_async_rdahead 16384 Kb, 64, 186.818387, 28.668005 91 | read_async_rdahead 65536 Kb, 64, 208.925725, 1.795460 92 | read_async_rdadvise 4 Kb, 64, 178.695511, 37.824511 93 | read_async_rdadvise 8 Kb, 64, 204.916740, 55.088723 94 | read_async_rdadvise 12 Kb, 64, 179.435721, 33.900742 95 | read_async_rdadvise 16 Kb, 64, 186.159637, 39.272578 96 | read_async_rdadvise 24 Kb, 64, 165.927037, 24.680252 97 | read_async_rdadvise 32 Kb, 64, 179.963785, 35.244150 98 | read_async_rdadvise 40 Kb, 64, 190.977615, 64.718092 99 | read_async_rdadvise 48 Kb, 64, 167.869131, 35.681864 100 | read_async_rdadvise 56 Kb, 64, 188.979701, 69.151032 101 | read_async_rdadvise 64 Kb, 64, 189.564010, 41.616838 102 | read_async_rdadvise 256 Kb, 64, 156.323207, 32.250894 103 | read_async_rdadvise 1024 Kb, 64, 151.287233, 42.560735 104 | read_async_rdadvise 4096 Kb, 64, 162.957849, 50.675598 105 | read_async_rdadvise 16384 Kb, 64, 178.694667, 52.991280 106 | read_async_rdadvise 65536 Kb, 64, 211.911414, 35.720609 107 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_8.csv: -------------------------------------------------------------------------------- 1 | Method, File Size (KB), Mean (ms), Stddev (ms) 2 | read_plain 4 Kb, 8, 32.999976, 0.478282 3 | read_plain 8 Kb, 8, 33.092512, 0.728778 4 | read_plain 12 Kb, 8, 40.096393, 12.664784 5 | read_plain 16 Kb, 8, 33.078408, 0.507994 6 | read_plain 24 Kb, 8, 33.737779, 0.777140 7 | read_plain 32 Kb, 8, 32.735999, 1.119851 8 | read_plain 40 Kb, 8, 32.662492, 1.386333 9 | read_plain 48 Kb, 8, 33.419439, 1.096937 10 | read_plain 56 Kb, 8, 33.127350, 0.597167 11 | read_plain 64 Kb, 8, 32.494417, 0.750136 12 | read_plain 256 Kb, 8, 35.325950, 10.271948 13 | read_plain 1024 Kb, 8, 28.491524, 0.884514 14 | read_plain 4096 Kb, 8, 27.645776, 0.606327 15 | read_nocache 4 Kb, 8, 277.609313, 16.544270 16 | read_nocache 8 Kb, 8, 170.140608, 18.467511 17 | read_nocache 12 Kb, 8, 135.102312, 24.213287 18 | read_nocache 16 Kb, 8, 111.685323, 18.753648 19 | read_nocache 24 Kb, 8, 87.114495, 8.420914 20 | read_nocache 32 Kb, 8, 64.793163, 2.907283 21 | read_nocache 40 Kb, 8, 61.451949, 4.746597 22 | read_nocache 48 Kb, 8, 58.276625, 3.747338 23 | read_nocache 56 Kb, 8, 52.947473, 3.420178 24 | read_nocache 64 Kb, 8, 58.952486, 2.835659 25 | read_nocache 256 Kb, 8, 48.470244, 2.391914 26 | read_nocache 1024 Kb, 8, 33.023758, 10.483658 27 | read_nocache 4096 Kb, 8, 26.389923, 0.858123 28 | read_readahead 4 Kb, 8, 32.914805, 0.454501 29 | read_readahead 8 Kb, 8, 33.323430, 0.569684 30 | read_readahead 12 Kb, 8, 33.561862, 0.732380 31 | read_readahead 16 Kb, 8, 32.852542, 0.507238 32 | read_readahead 24 Kb, 8, 34.075786, 0.515008 33 | read_readahead 32 Kb, 8, 32.323021, 0.467896 34 | read_readahead 40 Kb, 8, 32.726545, 0.629900 35 | read_readahead 48 Kb, 8, 33.447936, 0.683893 36 | read_readahead 56 Kb, 8, 36.829338, 10.386124 37 | read_readahead 64 Kb, 8, 32.494538, 0.531844 38 | read_readahead 256 Kb, 8, 32.803711, 0.790247 39 | read_readahead 1024 Kb, 8, 33.031446, 8.739805 40 | read_readahead 4096 Kb, 8, 30.090318, 8.544603 41 | read_rdadvise 4 Kb, 8, 20.238374, 0.749644 42 | read_rdadvise 8 Kb, 8, 20.621498, 0.277357 43 | read_rdadvise 12 Kb, 8, 20.352393, 0.461583 44 | read_rdadvise 16 Kb, 8, 20.415106, 0.486555 45 | read_rdadvise 24 Kb, 8, 20.362395, 0.334834 46 | read_rdadvise 32 Kb, 8, 19.743418, 0.656119 47 | read_rdadvise 40 Kb, 8, 22.214120, 6.238741 48 | read_rdadvise 48 Kb, 8, 20.264123, 0.626533 49 | read_rdadvise 56 Kb, 8, 20.371658, 0.349279 50 | read_rdadvise 64 Kb, 8, 20.332005, 0.633350 51 | read_rdadvise 256 Kb, 8, 20.286070, 0.563478 52 | read_rdadvise 1024 Kb, 8, 20.783382, 0.528641 53 | read_rdadvise 4096 Kb, 8, 24.231643, 5.457697 54 | read_async_nocache 4 Kb, 8, 158.006203, 18.585643 55 | read_async_nocache 8 Kb, 8, 102.844887, 14.333840 56 | read_async_nocache 12 Kb, 8, 84.251095, 8.482808 57 | read_async_nocache 16 Kb, 8, 73.180864, 10.022172 58 | read_async_nocache 24 Kb, 8, 57.926266, 9.299522 59 | read_async_nocache 32 Kb, 8, 46.385910, 4.835807 60 | read_async_nocache 40 Kb, 8, 40.852091, 2.926126 61 | read_async_nocache 48 Kb, 8, 39.667065, 4.635878 62 | read_async_nocache 56 Kb, 8, 37.935477, 2.556289 63 | read_async_nocache 64 Kb, 8, 53.711619, 21.372689 64 | read_async_nocache 256 Kb, 8, 39.590404, 0.907088 65 | read_async_nocache 1024 Kb, 8, 23.597282, 0.762202 66 | read_async_nocache 4096 Kb, 8, 29.904557, 10.975179 67 | read_async_rdahead 4 Kb, 8, 33.775888, 8.226275 68 | read_async_rdahead 8 Kb, 8, 31.051132, 0.201243 69 | read_async_rdahead 12 Kb, 8, 31.719818, 0.863121 70 | read_async_rdahead 16 Kb, 8, 30.905802, 0.920647 71 | read_async_rdahead 24 Kb, 8, 31.392714, 0.620591 72 | read_async_rdahead 32 Kb, 8, 30.049281, 0.559250 73 | read_async_rdahead 40 Kb, 8, 30.651621, 0.445763 74 | read_async_rdahead 48 Kb, 8, 32.732763, 5.803929 75 | read_async_rdahead 56 Kb, 8, 33.752998, 9.924485 76 | read_async_rdahead 64 Kb, 8, 29.914508, 0.504901 77 | read_async_rdahead 256 Kb, 8, 29.984643, 0.908285 78 | read_async_rdahead 1024 Kb, 8, 28.524114, 5.440983 79 | read_async_rdahead 4096 Kb, 8, 23.641552, 0.569569 80 | read_async_rdadvise 4 Kb, 8, 20.922266, 1.917908 81 | read_async_rdadvise 8 Kb, 8, 23.709684, 4.190056 82 | read_async_rdadvise 12 Kb, 8, 22.497447, 1.569176 83 | read_async_rdadvise 16 Kb, 8, 21.765614, 3.511529 84 | read_async_rdadvise 24 Kb, 8, 27.565899, 8.109963 85 | read_async_rdadvise 32 Kb, 8, 22.399500, 1.198121 86 | read_async_rdadvise 40 Kb, 8, 20.593337, 1.585694 87 | read_async_rdadvise 48 Kb, 8, 22.061983, 2.067472 88 | read_async_rdadvise 56 Kb, 8, 23.673516, 6.750513 89 | read_async_rdadvise 64 Kb, 8, 20.713600, 1.409586 90 | read_async_rdadvise 256 Kb, 8, 26.248693, 6.320560 91 | read_async_rdadvise 1024 Kb, 8, 28.213756, 7.693604 92 | read_async_rdadvise 4096 Kb, 8, 30.422751, 6.434696 93 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_80.csv: -------------------------------------------------------------------------------- 1 | Method, File Size (KB), Mean (ms), Stddev (ms) 2 | read_plain 4 Kb, 80, 287.145053, 22.299891 3 | read_plain 8 Kb, 80, 295.086506, 34.842903 4 | read_plain 12 Kb, 80, 287.095596, 34.069170 5 | read_plain 16 Kb, 80, 278.036892, 13.851792 6 | read_plain 24 Kb, 80, 291.455873, 44.026796 7 | read_plain 32 Kb, 80, 309.001722, 48.930357 8 | read_plain 40 Kb, 80, 289.846043, 34.083929 9 | read_plain 48 Kb, 80, 276.628057, 5.762960 10 | read_plain 56 Kb, 80, 274.937850, 3.163856 11 | read_plain 64 Kb, 80, 278.520511, 30.021546 12 | read_plain 256 Kb, 80, 260.319674, 3.768024 13 | read_plain 1024 Kb, 80, 247.294377, 47.946249 14 | read_plain 4096 Kb, 80, 266.136302, 31.989967 15 | read_plain 16384 Kb, 80, 274.396930, 9.369301 16 | read_plain 65536 Kb, 80, 294.251086, 42.321209 17 | read_nocache 4 Kb, 80, 2453.909301, 126.288288 18 | read_nocache 8 Kb, 80, 1385.663399, 17.428042 19 | read_nocache 12 Kb, 80, 973.405518, 21.893971 20 | read_nocache 16 Kb, 80, 718.807239, 24.711601 21 | read_nocache 24 Kb, 80, 590.687864, 53.422370 22 | read_nocache 32 Kb, 80, 487.017253, 13.274834 23 | read_nocache 40 Kb, 80, 460.675483, 67.059268 24 | read_nocache 48 Kb, 80, 469.307623, 44.553144 25 | read_nocache 56 Kb, 80, 475.493681, 83.854486 26 | read_nocache 64 Kb, 80, 405.587669, 58.702164 27 | read_nocache 256 Kb, 80, 452.388754, 11.055322 28 | read_nocache 1024 Kb, 80, 264.010625, 9.900826 29 | read_nocache 4096 Kb, 80, 246.196744, 21.784637 30 | read_nocache 16384 Kb, 80, 225.593608, 2.738527 31 | read_nocache 65536 Kb, 80, 306.822461, 82.158635 32 | read_readahead 4 Kb, 80, 318.263004, 28.901493 33 | read_readahead 8 Kb, 80, 304.468137, 4.469637 34 | read_readahead 12 Kb, 80, 311.184218, 7.518575 35 | read_readahead 16 Kb, 80, 329.617928, 56.004155 36 | read_readahead 24 Kb, 80, 310.949400, 34.644815 37 | read_readahead 32 Kb, 80, 296.956211, 33.761099 38 | read_readahead 40 Kb, 80, 288.537767, 24.837371 39 | read_readahead 48 Kb, 80, 284.261522, 13.250910 40 | read_readahead 56 Kb, 80, 282.650873, 23.092250 41 | read_readahead 64 Kb, 80, 269.577246, 5.201246 42 | read_readahead 256 Kb, 80, 271.446974, 34.179803 43 | read_readahead 1024 Kb, 80, 242.386787, 33.963471 44 | read_readahead 4096 Kb, 80, 230.674894, 37.553743 45 | read_readahead 16384 Kb, 80, 259.613679, 37.210172 46 | read_readahead 65536 Kb, 80, 263.422612, 29.749522 47 | read_rdadvise 4 Kb, 80, 221.243905, 35.109736 48 | read_rdadvise 8 Kb, 80, 196.454840, 17.773833 49 | read_rdadvise 12 Kb, 80, 234.789613, 48.863487 50 | read_rdadvise 16 Kb, 80, 208.444388, 47.974314 51 | read_rdadvise 24 Kb, 80, 198.196901, 42.710459 52 | read_rdadvise 32 Kb, 80, 199.128253, 25.195639 53 | read_rdadvise 40 Kb, 80, 223.860696, 70.554783 54 | read_rdadvise 48 Kb, 80, 213.683469, 64.299695 55 | read_rdadvise 56 Kb, 80, 203.093071, 46.000701 56 | read_rdadvise 64 Kb, 80, 218.092667, 64.550196 57 | read_rdadvise 256 Kb, 80, 211.020986, 51.145649 58 | read_rdadvise 1024 Kb, 80, 233.393761, 58.761339 59 | read_rdadvise 4096 Kb, 80, 227.403327, 46.666327 60 | read_rdadvise 16384 Kb, 80, 253.931094, 73.767337 61 | read_rdadvise 65536 Kb, 80, 256.732476, 57.629589 62 | read_async_nocache 4 Kb, 80, 2080.039307, 322.421105 63 | read_async_nocache 8 Kb, 80, 1033.223577, 54.197588 64 | read_async_nocache 12 Kb, 80, 715.859492, 28.267555 65 | read_async_nocache 16 Kb, 80, 650.531909, 56.936060 66 | read_async_nocache 24 Kb, 80, 497.760557, 28.008726 67 | read_async_nocache 32 Kb, 80, 390.743446, 55.981873 68 | read_async_nocache 40 Kb, 80, 330.692148, 36.419052 69 | read_async_nocache 48 Kb, 80, 340.739474, 72.960762 70 | read_async_nocache 56 Kb, 80, 345.043819, 94.920740 71 | read_async_nocache 64 Kb, 80, 299.017275, 81.402595 72 | read_async_nocache 256 Kb, 80, 364.344737, 28.818836 73 | read_async_nocache 1024 Kb, 80, 216.707790, 27.792453 74 | read_async_nocache 4096 Kb, 80, 199.379094, 30.314601 75 | read_async_nocache 16384 Kb, 80, 242.668034, 59.679104 76 | read_async_nocache 65536 Kb, 80, 293.096500, 67.919915 77 | read_async_rdahead 4 Kb, 80, 256.899874, 13.431021 78 | read_async_rdahead 8 Kb, 80, 284.427177, 37.377292 79 | read_async_rdahead 12 Kb, 80, 283.585642, 42.016453 80 | read_async_rdahead 16 Kb, 80, 259.885892, 4.744540 81 | read_async_rdahead 24 Kb, 80, 292.064830, 47.817274 82 | read_async_rdahead 32 Kb, 80, 304.164969, 53.015283 83 | read_async_rdahead 40 Kb, 80, 252.699794, 7.369699 84 | read_async_rdahead 48 Kb, 80, 305.038274, 55.833119 85 | read_async_rdahead 56 Kb, 80, 278.362229, 35.876932 86 | read_async_rdahead 64 Kb, 80, 270.791741, 52.270341 87 | read_async_rdahead 256 Kb, 80, 286.392899, 47.726584 88 | read_async_rdahead 1024 Kb, 80, 265.472880, 46.400610 89 | read_async_rdahead 4096 Kb, 80, 202.090540, 23.589585 90 | read_async_rdahead 16384 Kb, 80, 237.572119, 49.434354 91 | read_async_rdahead 65536 Kb, 80, 263.528752, 21.309006 92 | read_async_rdadvise 4 Kb, 80, 203.474377, 72.294118 93 | read_async_rdadvise 8 Kb, 80, 191.744833, 27.623535 94 | read_async_rdadvise 12 Kb, 80, 244.259785, 71.486372 95 | read_async_rdadvise 16 Kb, 80, 215.760116, 32.695992 96 | read_async_rdadvise 24 Kb, 80, 228.742907, 48.164351 97 | read_async_rdadvise 32 Kb, 80, 220.707976, 46.274725 98 | read_async_rdadvise 40 Kb, 80, 229.372605, 64.122912 99 | read_async_rdadvise 48 Kb, 80, 206.754938, 49.370620 100 | read_async_rdadvise 56 Kb, 80, 214.691093, 45.917769 101 | read_async_rdadvise 64 Kb, 80, 231.834121, 46.031872 102 | read_async_rdadvise 256 Kb, 80, 194.998873, 57.353161 103 | read_async_rdadvise 1024 Kb, 80, 187.556160, 46.076030 104 | read_async_rdadvise 4096 Kb, 80, 175.302102, 4.127774 105 | read_async_rdadvise 16384 Kb, 80, 235.422722, 64.848396 106 | read_async_rdadvise 65536 Kb, 80, 225.196273, 24.871086 107 | -------------------------------------------------------------------------------- /results/macbook_pro/read/read_96.csv: -------------------------------------------------------------------------------- 1 | Method, File Size (KB), Mean (ms), Stddev (ms) 2 | read_plain 4 Kb, 96, 336.814600, 16.683559 3 | read_plain 8 Kb, 96, 338.509128, 32.956207 4 | read_plain 12 Kb, 96, 330.570392, 21.504915 5 | read_plain 16 Kb, 96, 330.341714, 20.126696 6 | read_plain 24 Kb, 96, 325.346538, 4.588515 7 | read_plain 32 Kb, 96, 350.825619, 36.494936 8 | read_plain 40 Kb, 96, 324.111925, 3.798092 9 | read_plain 48 Kb, 96, 326.707804, 6.081196 10 | read_plain 56 Kb, 96, 341.743481, 15.914900 11 | read_plain 64 Kb, 96, 379.311165, 85.695768 12 | read_plain 256 Kb, 96, 386.536144, 90.113832 13 | read_plain 1024 Kb, 96, 321.246479, 42.325960 14 | read_plain 4096 Kb, 96, 269.731318, 14.302892 15 | read_plain 16384 Kb, 96, 294.825800, 3.010292 16 | read_plain 65536 Kb, 96, 309.083166, 10.605813 17 | read_nocache 4 Kb, 96, 2990.636773, 56.948714 18 | read_nocache 8 Kb, 96, 1575.583196, 21.816595 19 | read_nocache 12 Kb, 96, 1139.050499, 23.684121 20 | read_nocache 16 Kb, 96, 914.319263, 18.156191 21 | read_nocache 24 Kb, 96, 710.645186, 17.702811 22 | read_nocache 32 Kb, 96, 610.252262, 40.308635 23 | read_nocache 40 Kb, 96, 545.453631, 36.379696 24 | read_nocache 48 Kb, 96, 551.882107, 86.456998 25 | read_nocache 56 Kb, 96, 458.208181, 14.139191 26 | read_nocache 64 Kb, 96, 433.969143, 24.011323 27 | read_nocache 256 Kb, 96, 538.268326, 24.340278 28 | read_nocache 1024 Kb, 96, 357.832961, 52.002265 29 | read_nocache 4096 Kb, 96, 364.843348, 66.073518 30 | read_nocache 16384 Kb, 96, 320.775839, 75.756449 31 | read_nocache 65536 Kb, 96, 337.171126, 78.754737 32 | read_readahead 4 Kb, 96, 357.658476, 44.703373 33 | read_readahead 8 Kb, 96, 321.644429, 3.108958 34 | read_readahead 12 Kb, 96, 382.417411, 67.816671 35 | read_readahead 16 Kb, 96, 328.173077, 18.169918 36 | read_readahead 24 Kb, 96, 364.771382, 39.586294 37 | read_readahead 32 Kb, 96, 336.060769, 13.174510 38 | read_readahead 40 Kb, 96, 336.242081, 44.121607 39 | read_readahead 48 Kb, 96, 345.482537, 39.646323 40 | read_readahead 56 Kb, 96, 347.664731, 41.567507 41 | read_readahead 64 Kb, 96, 372.209956, 52.171151 42 | read_readahead 256 Kb, 96, 358.227628, 53.408007 43 | read_readahead 1024 Kb, 96, 323.616984, 52.545862 44 | read_readahead 4096 Kb, 96, 274.955337, 29.027948 45 | read_readahead 16384 Kb, 96, 315.308531, 42.475132 46 | read_readahead 65536 Kb, 96, 310.510838, 29.938187 47 | read_rdadvise 4 Kb, 96, 254.939498, 15.126050 48 | read_rdadvise 8 Kb, 96, 296.993641, 72.508983 49 | read_rdadvise 12 Kb, 96, 277.118971, 71.107780 50 | read_rdadvise 16 Kb, 96, 249.857859, 43.887062 51 | read_rdadvise 24 Kb, 96, 267.810537, 55.052642 52 | read_rdadvise 32 Kb, 96, 255.128782, 41.799888 53 | read_rdadvise 40 Kb, 96, 273.863839, 47.546415 54 | read_rdadvise 48 Kb, 96, 250.183740, 46.465865 55 | read_rdadvise 56 Kb, 96, 257.275024, 73.210890 56 | read_rdadvise 64 Kb, 96, 263.173495, 56.130034 57 | read_rdadvise 256 Kb, 96, 269.372303, 65.647489 58 | read_rdadvise 1024 Kb, 96, 248.391470, 38.843318 59 | read_rdadvise 4096 Kb, 96, 272.131210, 32.680522 60 | read_rdadvise 16384 Kb, 96, 248.347193, 41.964938 61 | read_rdadvise 65536 Kb, 96, 287.793508, 63.677702 62 | read_async_nocache 4 Kb, 96, 2549.607948, 426.595677 63 | read_async_nocache 8 Kb, 96, 1232.470002, 45.671968 64 | read_async_nocache 12 Kb, 96, 920.152037, 18.431304 65 | read_async_nocache 16 Kb, 96, 715.640262, 38.551476 66 | read_async_nocache 24 Kb, 96, 561.586215, 31.279507 67 | read_async_nocache 32 Kb, 96, 506.113517, 83.845683 68 | read_async_nocache 40 Kb, 96, 446.786231, 64.875273 69 | read_async_nocache 48 Kb, 96, 440.670917, 59.161923 70 | read_async_nocache 56 Kb, 96, 373.552989, 89.338925 71 | read_async_nocache 64 Kb, 96, 355.428595, 56.925637 72 | read_async_nocache 256 Kb, 96, 432.134250, 42.720178 73 | read_async_nocache 1024 Kb, 96, 278.706487, 48.869130 74 | read_async_nocache 4096 Kb, 96, 278.905844, 75.776923 75 | read_async_nocache 16384 Kb, 96, 272.728383, 44.113749 76 | read_async_nocache 65536 Kb, 96, 400.072590, 75.405519 77 | read_async_rdahead 4 Kb, 96, 360.402611, 76.059602 78 | read_async_rdahead 8 Kb, 96, 356.362836, 57.170177 79 | read_async_rdahead 12 Kb, 96, 339.701080, 43.957330 80 | read_async_rdahead 16 Kb, 96, 316.298755, 34.142910 81 | read_async_rdahead 24 Kb, 96, 346.182461, 50.159715 82 | read_async_rdahead 32 Kb, 96, 319.847981, 22.068689 83 | read_async_rdahead 40 Kb, 96, 343.320229, 57.772445 84 | read_async_rdahead 48 Kb, 96, 315.279376, 34.738090 85 | read_async_rdahead 56 Kb, 96, 314.121741, 29.252620 86 | read_async_rdahead 64 Kb, 96, 322.813132, 40.076387 87 | read_async_rdahead 256 Kb, 96, 308.514794, 43.784017 88 | read_async_rdahead 1024 Kb, 96, 283.346467, 34.429136 89 | read_async_rdahead 4096 Kb, 96, 249.264325, 47.861729 90 | read_async_rdahead 16384 Kb, 96, 287.797479, 53.302156 91 | read_async_rdahead 65536 Kb, 96, 320.587707, 37.934253 92 | read_async_rdadvise 4 Kb, 96, 264.139513, 20.109283 93 | read_async_rdadvise 8 Kb, 96, 275.551221, 38.743833 94 | read_async_rdadvise 12 Kb, 96, 300.099236, 64.056203 95 | read_async_rdadvise 16 Kb, 96, 267.736667, 59.675362 96 | read_async_rdadvise 24 Kb, 96, 300.483941, 58.878568 97 | read_async_rdadvise 32 Kb, 96, 282.624160, 59.984407 98 | read_async_rdadvise 40 Kb, 96, 270.012340, 67.985616 99 | read_async_rdadvise 48 Kb, 96, 307.299388, 96.162873 100 | read_async_rdadvise 56 Kb, 96, 280.979027, 73.774429 101 | read_async_rdadvise 64 Kb, 96, 235.637747, 32.301127 102 | read_async_rdadvise 256 Kb, 96, 228.897419, 59.525248 103 | read_async_rdadvise 1024 Kb, 96, 233.540301, 54.848029 104 | read_async_rdadvise 4096 Kb, 96, 226.735865, 21.899205 105 | read_async_rdadvise 16384 Kb, 96, 269.624205, 81.526584 106 | read_async_rdadvise 65536 Kb, 96, 304.601950, 66.742606 107 | -------------------------------------------------------------------------------- /results/macbook_pro/write/write_112.csv: -------------------------------------------------------------------------------- 1 | Method, Mean (ms), Stddev (ms) 2 | write_preallocate_truncate_nocache 4 Kb, 1118.086608, 15.539096 3 | write_preallocate_truncate_nocache 8 Kb, 976.431732, 9.986047 4 | write_preallocate_truncate_nocache 12 Kb, 906.010051, 14.779587 5 | write_preallocate_truncate_nocache 16 Kb, 2045.469763, 24.061817 6 | write_preallocate_truncate_nocache 24 Kb, 2503.421969, 1299.551040 7 | write_preallocate_truncate_nocache 32 Kb, 1589.408381, 124.783315 8 | write_preallocate_truncate_nocache 40 Kb, 1902.024530, 1294.181388 9 | write_preallocate_truncate_nocache 48 Kb, 1649.423246, 199.567791 10 | write_preallocate_truncate_nocache 56 Kb, 1362.098683, 42.551223 11 | write_preallocate_truncate_nocache 64 Kb, 1325.438267, 17.292025 12 | write_preallocate_truncate_nocache 256 Kb, 1773.234448, 1281.984307 13 | write_preallocate_truncate_nocache 1024 Kb, 1365.660970, 252.432911 14 | write_preallocate_truncate_nocache 4096 Kb, 1087.210151, 16.452106 15 | write_preallocate_truncate_nocache 16384 Kb, 1561.748962, 1299.566838 16 | write_preallocate_truncate_nocache 65536 Kb, 1607.108631, 371.777523 17 | async_write_preallocate_truncate_nocache 4 Kb, 1372.758781, 6.608016 18 | async_write_preallocate_truncate_nocache 8 Kb, 1242.567459, 1.456844 19 | async_write_preallocate_truncate_nocache 12 Kb, 1394.007736, 1332.073533 20 | async_write_preallocate_truncate_nocache 16 Kb, 2324.677361, 970.257758 21 | async_write_preallocate_truncate_nocache 24 Kb, 1189.187450, 10.956072 22 | async_write_preallocate_truncate_nocache 32 Kb, 1400.652715, 1359.961062 23 | async_write_preallocate_truncate_nocache 40 Kb, 2140.777433, 1020.050012 24 | async_write_preallocate_truncate_nocache 48 Kb, 1143.610569, 42.110636 25 | async_write_preallocate_truncate_nocache 56 Kb, 1483.927887, 1273.234405 26 | async_write_preallocate_truncate_nocache 64 Kb, 1839.834604, 1274.704118 27 | async_write_preallocate_truncate_nocache 256 Kb, 1304.231460, 317.531369 28 | async_write_preallocate_truncate_nocache 1024 Kb, 1056.697613, 2.532929 29 | async_write_preallocate_truncate_nocache 4096 Kb, 1291.555078, 1332.293105 30 | async_write_preallocate_truncate_nocache 16384 Kb, 2095.853570, 988.436065 31 | async_write_preallocate_truncate_nocache 65536 Kb, 1098.372424, 82.465565 32 | -------------------------------------------------------------------------------- /results/macbook_pro/write/write_128.csv: -------------------------------------------------------------------------------- 1 | Method, Mean (ms), Stddev (ms) 2 | write_preallocate_truncate_nocache 4 Kb, 1862.037302, 1319.348118 3 | write_preallocate_truncate_nocache 8 Kb, 1744.143596, 350.450966 4 | write_preallocate_truncate_nocache 12 Kb, 1206.405996, 11.470296 5 | write_preallocate_truncate_nocache 16 Kb, 2971.962730, 1270.068555 6 | write_preallocate_truncate_nocache 24 Kb, 2096.062058, 142.545903 7 | write_preallocate_truncate_nocache 32 Kb, 2199.320867, 1314.915320 8 | write_preallocate_truncate_nocache 40 Kb, 1602.452738, 27.576064 9 | write_preallocate_truncate_nocache 48 Kb, 1599.960263, 10.281201 10 | write_preallocate_truncate_nocache 56 Kb, 1534.649234, 23.154444 11 | write_preallocate_truncate_nocache 64 Kb, 1499.584321, 6.440555 12 | write_preallocate_truncate_nocache 256 Kb, 1342.828001, 9.362589 13 | write_preallocate_truncate_nocache 1024 Kb, 1288.610532, 15.728171 14 | write_preallocate_truncate_nocache 4096 Kb, 1198.898571, 11.128251 15 | write_preallocate_truncate_nocache 16384 Kb, 1202.548936, 4.879934 16 | write_preallocate_truncate_nocache 65536 Kb, 1208.730064, 6.188139 17 | async_write_preallocate_truncate_nocache 4 Kb, 1104.749498, 10.147903 18 | async_write_preallocate_truncate_nocache 8 Kb, 1001.314744, 1.810247 19 | async_write_preallocate_truncate_nocache 12 Kb, 962.767860, 2.400778 20 | async_write_preallocate_truncate_nocache 16 Kb, 950.637824, 8.035650 21 | async_write_preallocate_truncate_nocache 24 Kb, 929.604923, 3.139681 22 | async_write_preallocate_truncate_nocache 32 Kb, 919.180137, 1.583810 23 | async_write_preallocate_truncate_nocache 40 Kb, 916.994589, 7.486021 24 | async_write_preallocate_truncate_nocache 48 Kb, 912.827460, 3.423880 25 | async_write_preallocate_truncate_nocache 56 Kb, 914.535903, 11.694467 26 | async_write_preallocate_truncate_nocache 64 Kb, 941.534843, 22.672565 27 | async_write_preallocate_truncate_nocache 256 Kb, 910.028837, 31.843580 28 | async_write_preallocate_truncate_nocache 1024 Kb, 883.845991, 4.834229 29 | async_write_preallocate_truncate_nocache 4096 Kb, 883.519655, 6.465484 30 | async_write_preallocate_truncate_nocache 16384 Kb, 934.698802, 9.458466 31 | async_write_preallocate_truncate_nocache 65536 Kb, 1084.214614, 14.075019 32 | -------------------------------------------------------------------------------- /results/macbook_pro/write/write_16.csv: -------------------------------------------------------------------------------- 1 | Method, Mean (ms), Stddev (ms) 2 | write_preallocate_truncate_nocache 4 Kb, 174.793633, 2.496267 3 | write_preallocate_truncate_nocache 8 Kb, 157.140637, 2.606118 4 | write_preallocate_truncate_nocache 12 Kb, 151.174284, 2.659723 5 | write_preallocate_truncate_nocache 16 Kb, 286.390070, 6.081349 6 | write_preallocate_truncate_nocache 24 Kb, 238.186443, 1.147610 7 | write_preallocate_truncate_nocache 32 Kb, 211.100468, 1.008726 8 | write_preallocate_truncate_nocache 40 Kb, 197.555354, 0.588366 9 | write_preallocate_truncate_nocache 48 Kb, 192.888578, 5.624728 10 | write_preallocate_truncate_nocache 56 Kb, 190.351009, 4.676005 11 | write_preallocate_truncate_nocache 64 Kb, 184.775862, 1.711376 12 | write_preallocate_truncate_nocache 256 Kb, 166.999512, 1.915703 13 | write_preallocate_truncate_nocache 1024 Kb, 158.491237, 3.649382 14 | write_preallocate_truncate_nocache 4096 Kb, 153.340631, 3.645382 15 | write_preallocate_truncate_nocache 16384 Kb, 159.163163, 6.637531 16 | async_write_preallocate_truncate_nocache 4 Kb, 156.082087, 6.757418 17 | async_write_preallocate_truncate_nocache 8 Kb, 145.420786, 1.507763 18 | async_write_preallocate_truncate_nocache 12 Kb, 139.710537, 1.208442 19 | async_write_preallocate_truncate_nocache 16 Kb, 121.462943, 7.522193 20 | async_write_preallocate_truncate_nocache 24 Kb, 116.478706, 0.624148 21 | async_write_preallocate_truncate_nocache 32 Kb, 115.277565, 0.151149 22 | async_write_preallocate_truncate_nocache 40 Kb, 114.621448, 0.235239 23 | async_write_preallocate_truncate_nocache 48 Kb, 114.344867, 0.143093 24 | async_write_preallocate_truncate_nocache 56 Kb, 114.486109, 0.780045 25 | async_write_preallocate_truncate_nocache 64 Kb, 114.136755, 0.655907 26 | async_write_preallocate_truncate_nocache 256 Kb, 112.912535, 0.833544 27 | async_write_preallocate_truncate_nocache 1024 Kb, 115.459868, 1.987164 28 | async_write_preallocate_truncate_nocache 4096 Kb, 123.848576, 2.430902 29 | async_write_preallocate_truncate_nocache 16384 Kb, 157.776729, 4.947720 30 | -------------------------------------------------------------------------------- /results/macbook_pro/write/write_24.csv: -------------------------------------------------------------------------------- 1 | Method, Mean (ms), Stddev (ms) 2 | write_preallocate_truncate_nocache 4 Kb, 262.443417, 4.034624 3 | write_preallocate_truncate_nocache 8 Kb, 228.831277, 5.910140 4 | write_preallocate_truncate_nocache 12 Kb, 215.291424, 4.241792 5 | write_preallocate_truncate_nocache 16 Kb, 444.290782, 22.092869 6 | write_preallocate_truncate_nocache 24 Kb, 357.059894, 1.410052 7 | write_preallocate_truncate_nocache 32 Kb, 317.076419, 0.625678 8 | write_preallocate_truncate_nocache 40 Kb, 297.162250, 1.028770 9 | write_preallocate_truncate_nocache 48 Kb, 295.734682, 2.774418 10 | write_preallocate_truncate_nocache 56 Kb, 286.825099, 2.965055 11 | write_preallocate_truncate_nocache 64 Kb, 276.497313, 2.319087 12 | write_preallocate_truncate_nocache 256 Kb, 250.731277, 1.915282 13 | write_preallocate_truncate_nocache 1024 Kb, 233.556674, 2.546366 14 | write_preallocate_truncate_nocache 4096 Kb, 225.875322, 3.263243 15 | write_preallocate_truncate_nocache 16384 Kb, 303.855874, 1.601528 16 | async_write_preallocate_truncate_nocache 4 Kb, 223.638442, 9.016582 17 | async_write_preallocate_truncate_nocache 8 Kb, 205.192905, 3.257371 18 | async_write_preallocate_truncate_nocache 12 Kb, 198.513571, 1.529335 19 | async_write_preallocate_truncate_nocache 16 Kb, 179.693965, 6.051394 20 | async_write_preallocate_truncate_nocache 24 Kb, 174.199137, 0.083756 21 | async_write_preallocate_truncate_nocache 32 Kb, 172.597565, 0.103729 22 | async_write_preallocate_truncate_nocache 40 Kb, 172.488418, 1.441847 23 | async_write_preallocate_truncate_nocache 48 Kb, 171.143024, 0.488116 24 | async_write_preallocate_truncate_nocache 56 Kb, 170.935367, 0.983660 25 | async_write_preallocate_truncate_nocache 64 Kb, 170.211823, 0.092009 26 | async_write_preallocate_truncate_nocache 256 Kb, 167.949527, 0.635190 27 | async_write_preallocate_truncate_nocache 1024 Kb, 168.120334, 1.480613 28 | async_write_preallocate_truncate_nocache 4096 Kb, 177.140195, 2.018461 29 | async_write_preallocate_truncate_nocache 16384 Kb, 190.063383, 3.091553 30 | -------------------------------------------------------------------------------- /results/macbook_pro/write/write_32.csv: -------------------------------------------------------------------------------- 1 | Method, Mean (ms), Stddev (ms) 2 | write_preallocate_truncate_nocache 4 Kb, 341.921401, 3.695709 3 | write_preallocate_truncate_nocache 8 Kb, 299.883511, 10.398804 4 | write_preallocate_truncate_nocache 12 Kb, 285.272865, 6.587092 5 | write_preallocate_truncate_nocache 16 Kb, 574.117310, 6.635322 6 | write_preallocate_truncate_nocache 24 Kb, 478.636047, 0.851755 7 | write_preallocate_truncate_nocache 32 Kb, 423.013881, 0.668463 8 | write_preallocate_truncate_nocache 40 Kb, 395.918998, 1.426582 9 | write_preallocate_truncate_nocache 48 Kb, 391.635067, 10.693292 10 | write_preallocate_truncate_nocache 56 Kb, 380.432428, 4.343005 11 | write_preallocate_truncate_nocache 64 Kb, 368.630030, 6.740139 12 | write_preallocate_truncate_nocache 256 Kb, 331.725773, 1.088680 13 | write_preallocate_truncate_nocache 1024 Kb, 316.858335, 5.478850 14 | write_preallocate_truncate_nocache 4096 Kb, 306.985166, 6.085789 15 | write_preallocate_truncate_nocache 16384 Kb, 303.404512, 1.815019 16 | async_write_preallocate_truncate_nocache 4 Kb, 289.923876, 5.203440 17 | async_write_preallocate_truncate_nocache 8 Kb, 266.948832, 0.968938 18 | async_write_preallocate_truncate_nocache 12 Kb, 258.605318, 1.464988 19 | async_write_preallocate_truncate_nocache 16 Kb, 240.977092, 8.818056 20 | async_write_preallocate_truncate_nocache 24 Kb, 233.104848, 1.510494 21 | async_write_preallocate_truncate_nocache 32 Kb, 232.480901, 5.973764 22 | async_write_preallocate_truncate_nocache 40 Kb, 229.101638, 0.310664 23 | async_write_preallocate_truncate_nocache 48 Kb, 227.918305, 0.063834 24 | async_write_preallocate_truncate_nocache 56 Kb, 227.665604, 0.210444 25 | async_write_preallocate_truncate_nocache 64 Kb, 227.011600, 0.120577 26 | async_write_preallocate_truncate_nocache 256 Kb, 223.241636, 0.457374 27 | async_write_preallocate_truncate_nocache 1024 Kb, 223.122623, 1.656379 28 | async_write_preallocate_truncate_nocache 4096 Kb, 232.363079, 2.101506 29 | async_write_preallocate_truncate_nocache 16384 Kb, 266.507444, 2.997001 30 | -------------------------------------------------------------------------------- /results/macbook_pro/write/write_40.csv: -------------------------------------------------------------------------------- 1 | Method, Mean (ms), Stddev (ms) 2 | write_preallocate_truncate_nocache 4 Kb, 425.964049, 4.560483 3 | write_preallocate_truncate_nocache 8 Kb, 369.913094, 5.064106 4 | write_preallocate_truncate_nocache 12 Kb, 352.600281, 7.446317 5 | write_preallocate_truncate_nocache 16 Kb, 741.160614, 14.320516 6 | write_preallocate_truncate_nocache 24 Kb, 621.361901, 1.069616 7 | write_preallocate_truncate_nocache 32 Kb, 557.601424, 1.310864 8 | write_preallocate_truncate_nocache 40 Kb, 516.379880, 16.957779 9 | write_preallocate_truncate_nocache 48 Kb, 500.652112, 12.003867 10 | write_preallocate_truncate_nocache 56 Kb, 491.919873, 10.802649 11 | write_preallocate_truncate_nocache 64 Kb, 481.205237, 5.023280 12 | write_preallocate_truncate_nocache 256 Kb, 425.959625, 2.110064 13 | write_preallocate_truncate_nocache 1024 Kb, 398.951204, 6.349253 14 | write_preallocate_truncate_nocache 4096 Kb, 381.477573, 5.982006 15 | write_preallocate_truncate_nocache 16384 Kb, 454.540061, 2.410303 16 | async_write_preallocate_truncate_nocache 4 Kb, 361.077678, 9.389510 17 | async_write_preallocate_truncate_nocache 8 Kb, 329.936731, 7.386197 18 | async_write_preallocate_truncate_nocache 12 Kb, 316.022339, 1.794455 19 | async_write_preallocate_truncate_nocache 16 Kb, 298.972486, 8.958120 20 | async_write_preallocate_truncate_nocache 24 Kb, 290.269669, 0.479350 21 | async_write_preallocate_truncate_nocache 32 Kb, 287.173443, 0.072451 22 | async_write_preallocate_truncate_nocache 40 Kb, 285.845632, 0.567826 23 | async_write_preallocate_truncate_nocache 48 Kb, 284.980617, 0.809921 24 | async_write_preallocate_truncate_nocache 56 Kb, 284.849933, 1.562634 25 | async_write_preallocate_truncate_nocache 64 Kb, 283.364064, 0.165096 26 | async_write_preallocate_truncate_nocache 256 Kb, 281.134259, 6.952229 27 | async_write_preallocate_truncate_nocache 1024 Kb, 277.640595, 1.945725 28 | async_write_preallocate_truncate_nocache 4096 Kb, 287.127859, 3.434449 29 | async_write_preallocate_truncate_nocache 16384 Kb, 304.495344, 2.089407 30 | -------------------------------------------------------------------------------- /results/macbook_pro/write/write_48.csv: -------------------------------------------------------------------------------- 1 | Method, Mean (ms), Stddev (ms) 2 | write_preallocate_truncate_nocache 4 Kb, 504.037885, 6.142424 3 | write_preallocate_truncate_nocache 8 Kb, 438.751133, 8.850988 4 | write_preallocate_truncate_nocache 12 Kb, 424.396988, 7.452338 5 | write_preallocate_truncate_nocache 16 Kb, 859.759901, 10.838560 6 | write_preallocate_truncate_nocache 24 Kb, 706.072436, 14.243933 7 | write_preallocate_truncate_nocache 32 Kb, 634.046952, 1.363958 8 | write_preallocate_truncate_nocache 40 Kb, 591.598438, 1.491561 9 | write_preallocate_truncate_nocache 48 Kb, 603.947398, 11.867159 10 | write_preallocate_truncate_nocache 56 Kb, 596.224859, 11.167634 11 | write_preallocate_truncate_nocache 64 Kb, 578.317583, 6.326309 12 | write_preallocate_truncate_nocache 256 Kb, 512.064320, 8.910784 13 | write_preallocate_truncate_nocache 1024 Kb, 487.806565, 12.411582 14 | write_preallocate_truncate_nocache 4096 Kb, 452.865465, 3.941092 15 | write_preallocate_truncate_nocache 16384 Kb, 452.189323, 2.466502 16 | async_write_preallocate_truncate_nocache 4 Kb, 427.460592, 9.570193 17 | async_write_preallocate_truncate_nocache 8 Kb, 387.293134, 0.657007 18 | async_write_preallocate_truncate_nocache 12 Kb, 375.173949, 1.610492 19 | async_write_preallocate_truncate_nocache 16 Kb, 358.796840, 9.638370 20 | async_write_preallocate_truncate_nocache 24 Kb, 348.593910, 1.570267 21 | async_write_preallocate_truncate_nocache 32 Kb, 345.280632, 1.451521 22 | async_write_preallocate_truncate_nocache 40 Kb, 343.183246, 1.176650 23 | async_write_preallocate_truncate_nocache 48 Kb, 341.534361, 0.105474 24 | async_write_preallocate_truncate_nocache 56 Kb, 344.524252, 10.052877 25 | async_write_preallocate_truncate_nocache 64 Kb, 340.535806, 1.253559 26 | async_write_preallocate_truncate_nocache 256 Kb, 333.906382, 0.298028 27 | async_write_preallocate_truncate_nocache 1024 Kb, 333.190106, 2.445816 28 | async_write_preallocate_truncate_nocache 4096 Kb, 340.985556, 2.059869 29 | async_write_preallocate_truncate_nocache 16384 Kb, 377.724651, 3.443727 30 | -------------------------------------------------------------------------------- /results/macbook_pro/write/write_56.csv: -------------------------------------------------------------------------------- 1 | Method, Mean (ms), Stddev (ms) 2 | write_preallocate_truncate_nocache 4 Kb, 584.307246, 9.008329 3 | write_preallocate_truncate_nocache 8 Kb, 502.509917, 6.195277 4 | write_preallocate_truncate_nocache 12 Kb, 493.481346, 33.269312 5 | write_preallocate_truncate_nocache 16 Kb, 993.169275, 19.690775 6 | write_preallocate_truncate_nocache 24 Kb, 837.030493, 2.791704 7 | write_preallocate_truncate_nocache 32 Kb, 738.609695, 1.643013 8 | write_preallocate_truncate_nocache 40 Kb, 694.292929, 5.634142 9 | write_preallocate_truncate_nocache 48 Kb, 694.289432, 5.327021 10 | write_preallocate_truncate_nocache 56 Kb, 660.044962, 4.299306 11 | write_preallocate_truncate_nocache 64 Kb, 640.756241, 6.915717 12 | write_preallocate_truncate_nocache 256 Kb, 580.068084, 8.304795 13 | write_preallocate_truncate_nocache 1024 Kb, 555.217006, 6.833728 14 | write_preallocate_truncate_nocache 4096 Kb, 524.752406, 11.259755 15 | write_preallocate_truncate_nocache 16384 Kb, 600.985395, 2.581046 16 | async_write_preallocate_truncate_nocache 4 Kb, 494.337044, 6.824425 17 | async_write_preallocate_truncate_nocache 8 Kb, 449.528435, 2.110498 18 | async_write_preallocate_truncate_nocache 12 Kb, 439.454182, 10.168679 19 | async_write_preallocate_truncate_nocache 16 Kb, 416.715717, 6.603218 20 | async_write_preallocate_truncate_nocache 24 Kb, 406.202409, 0.595141 21 | async_write_preallocate_truncate_nocache 32 Kb, 402.821216, 2.421465 22 | async_write_preallocate_truncate_nocache 40 Kb, 407.015172, 8.134853 23 | async_write_preallocate_truncate_nocache 48 Kb, 398.906892, 1.518926 24 | async_write_preallocate_truncate_nocache 56 Kb, 397.371035, 0.116932 25 | async_write_preallocate_truncate_nocache 64 Kb, 400.822180, 6.521237 26 | async_write_preallocate_truncate_nocache 256 Kb, 403.170528, 36.240974 27 | async_write_preallocate_truncate_nocache 1024 Kb, 386.716656, 1.892010 28 | async_write_preallocate_truncate_nocache 4096 Kb, 393.805547, 2.375372 29 | async_write_preallocate_truncate_nocache 16384 Kb, 411.699621, 3.210804 30 | -------------------------------------------------------------------------------- /results/macbook_pro/write/write_64.csv: -------------------------------------------------------------------------------- 1 | Method, Mean (ms), Stddev (ms) 2 | write_preallocate_truncate_nocache 4 Kb, 660.617446, 9.672770 3 | write_preallocate_truncate_nocache 8 Kb, 563.148157, 5.768520 4 | write_preallocate_truncate_nocache 12 Kb, 555.227992, 14.537683 5 | write_preallocate_truncate_nocache 16 Kb, 1094.033634, 28.234159 6 | write_preallocate_truncate_nocache 24 Kb, 944.010650, 28.640986 7 | write_preallocate_truncate_nocache 32 Kb, 848.403905, 14.849321 8 | write_preallocate_truncate_nocache 40 Kb, 787.504051, 0.688067 9 | write_preallocate_truncate_nocache 48 Kb, 778.341210, 15.613302 10 | write_preallocate_truncate_nocache 56 Kb, 758.812325, 7.391555 11 | write_preallocate_truncate_nocache 64 Kb, 742.055795, 9.498835 12 | write_preallocate_truncate_nocache 256 Kb, 667.704527, 3.961064 13 | write_preallocate_truncate_nocache 1024 Kb, 640.327319, 8.838637 14 | write_preallocate_truncate_nocache 4096 Kb, 606.596404, 6.963794 15 | write_preallocate_truncate_nocache 16384 Kb, 602.954184, 4.087673 16 | write_preallocate_truncate_nocache 65536 Kb, 622.673171, 2.775770 17 | async_write_preallocate_truncate_nocache 4 Kb, 560.302913, 5.623266 18 | async_write_preallocate_truncate_nocache 8 Kb, 512.867840, 0.938745 19 | async_write_preallocate_truncate_nocache 12 Kb, 496.863092, 1.631194 20 | async_write_preallocate_truncate_nocache 16 Kb, 479.396130, 10.112960 21 | async_write_preallocate_truncate_nocache 24 Kb, 470.620254, 7.733464 22 | async_write_preallocate_truncate_nocache 32 Kb, 459.768174, 0.241960 23 | async_write_preallocate_truncate_nocache 40 Kb, 457.504530, 1.017265 24 | async_write_preallocate_truncate_nocache 48 Kb, 455.487802, 0.207571 25 | async_write_preallocate_truncate_nocache 56 Kb, 454.677942, 0.978354 26 | async_write_preallocate_truncate_nocache 64 Kb, 453.335453, 0.190014 27 | async_write_preallocate_truncate_nocache 256 Kb, 445.482239, 0.706791 28 | async_write_preallocate_truncate_nocache 1024 Kb, 445.023304, 4.303174 29 | async_write_preallocate_truncate_nocache 4096 Kb, 450.641812, 1.649492 30 | async_write_preallocate_truncate_nocache 16384 Kb, 488.544285, 2.970563 31 | async_write_preallocate_truncate_nocache 65536 Kb, 621.426610, 7.994196 32 | -------------------------------------------------------------------------------- /results/macbook_pro/write/write_8.csv: -------------------------------------------------------------------------------- 1 | Method, Mean (ms), Stddev (ms) 2 | write_preallocate_truncate_nocache 4 Kb, 93.823059, 1.359771 3 | write_preallocate_truncate_nocache 8 Kb, 84.084878, 0.848642 4 | write_preallocate_truncate_nocache 12 Kb, 82.223397, 1.485923 5 | write_preallocate_truncate_nocache 16 Kb, 144.292700, 5.831697 6 | write_preallocate_truncate_nocache 24 Kb, 118.933598, 0.498292 7 | write_preallocate_truncate_nocache 32 Kb, 102.919460, 4.411258 8 | write_preallocate_truncate_nocache 40 Kb, 98.861551, 0.656082 9 | write_preallocate_truncate_nocache 48 Kb, 98.218937, 1.396520 10 | write_preallocate_truncate_nocache 56 Kb, 95.737262, 1.512251 11 | write_preallocate_truncate_nocache 64 Kb, 91.769925, 0.776277 12 | write_preallocate_truncate_nocache 256 Kb, 83.505023, 1.181614 13 | write_preallocate_truncate_nocache 1024 Kb, 80.526289, 2.991990 14 | write_preallocate_truncate_nocache 4096 Kb, 76.673247, 1.502820 15 | async_write_preallocate_truncate_nocache 4 Kb, 85.409573, 5.591485 16 | async_write_preallocate_truncate_nocache 8 Kb, 81.079614, 0.500680 17 | async_write_preallocate_truncate_nocache 12 Kb, 78.349937, 0.325345 18 | async_write_preallocate_truncate_nocache 16 Kb, 61.418503, 6.256107 19 | async_write_preallocate_truncate_nocache 24 Kb, 58.327761, 0.069630 20 | async_write_preallocate_truncate_nocache 32 Kb, 62.337245, 13.795177 21 | async_write_preallocate_truncate_nocache 40 Kb, 57.414036, 0.040730 22 | async_write_preallocate_truncate_nocache 48 Kb, 57.192380, 0.056156 23 | async_write_preallocate_truncate_nocache 56 Kb, 57.305453, 0.247203 24 | async_write_preallocate_truncate_nocache 64 Kb, 57.176329, 0.195934 25 | async_write_preallocate_truncate_nocache 256 Kb, 56.793827, 0.238813 26 | async_write_preallocate_truncate_nocache 1024 Kb, 59.172743, 1.415283 27 | async_write_preallocate_truncate_nocache 4096 Kb, 67.333293, 2.137809 28 | -------------------------------------------------------------------------------- /results/macbook_pro/write/write_80.csv: -------------------------------------------------------------------------------- 1 | Method, Mean (ms), Stddev (ms) 2 | write_preallocate_truncate_nocache 4 Kb, 826.893770, 14.200687 3 | write_preallocate_truncate_nocache 8 Kb, 710.370117, 15.556428 4 | write_preallocate_truncate_nocache 12 Kb, 675.332025, 5.736927 5 | write_preallocate_truncate_nocache 16 Kb, 1495.921546, 17.333863 6 | write_preallocate_truncate_nocache 24 Kb, 1223.882790, 27.578847 7 | write_preallocate_truncate_nocache 32 Kb, 1128.386948, 1.572273 8 | write_preallocate_truncate_nocache 40 Kb, 1035.883567, 30.429216 9 | write_preallocate_truncate_nocache 48 Kb, 1005.154527, 22.921500 10 | write_preallocate_truncate_nocache 56 Kb, 994.092441, 19.208800 11 | write_preallocate_truncate_nocache 64 Kb, 958.923397, 5.150475 12 | write_preallocate_truncate_nocache 256 Kb, 847.361907, 8.965912 13 | write_preallocate_truncate_nocache 1024 Kb, 784.467859, 6.736472 14 | write_preallocate_truncate_nocache 4096 Kb, 756.796892, 10.183782 15 | write_preallocate_truncate_nocache 16384 Kb, 754.848051, 2.450752 16 | write_preallocate_truncate_nocache 65536 Kb, 1218.594693, 7.447111 17 | async_write_preallocate_truncate_nocache 4 Kb, 700.163965, 8.031878 18 | async_write_preallocate_truncate_nocache 8 Kb, 633.787803, 2.614190 19 | async_write_preallocate_truncate_nocache 12 Kb, 613.869407, 7.619264 20 | async_write_preallocate_truncate_nocache 16 Kb, 595.961282, 8.248139 21 | async_write_preallocate_truncate_nocache 24 Kb, 582.333517, 7.242575 22 | async_write_preallocate_truncate_nocache 32 Kb, 574.687590, 1.329302 23 | async_write_preallocate_truncate_nocache 40 Kb, 573.323313, 4.965709 24 | async_write_preallocate_truncate_nocache 48 Kb, 571.885657, 7.591883 25 | async_write_preallocate_truncate_nocache 56 Kb, 568.370737, 2.745475 26 | async_write_preallocate_truncate_nocache 64 Kb, 566.620257, 0.903069 27 | async_write_preallocate_truncate_nocache 256 Kb, 556.610242, 1.279882 28 | async_write_preallocate_truncate_nocache 1024 Kb, 551.840989, 4.875205 29 | async_write_preallocate_truncate_nocache 4096 Kb, 559.221088, 2.389751 30 | async_write_preallocate_truncate_nocache 16384 Kb, 596.883731, 3.465840 31 | async_write_preallocate_truncate_nocache 65536 Kb, 660.543719, 21.913527 32 | -------------------------------------------------------------------------------- /results/macbook_pro/write/write_96.csv: -------------------------------------------------------------------------------- 1 | Method, Mean (ms), Stddev (ms) 2 | write_preallocate_truncate_nocache 4 Kb, 989.797097, 12.150213 3 | write_preallocate_truncate_nocache 8 Kb, 857.766125, 18.629856 4 | write_preallocate_truncate_nocache 12 Kb, 809.609053, 11.982706 5 | write_preallocate_truncate_nocache 16 Kb, 1806.351764, 41.543903 6 | write_preallocate_truncate_nocache 24 Kb, 1451.170231, 6.121902 7 | write_preallocate_truncate_nocache 32 Kb, 1278.971270, 2.659962 8 | write_preallocate_truncate_nocache 40 Kb, 1193.097458, 9.544601 9 | write_preallocate_truncate_nocache 48 Kb, 1198.373608, 13.287966 10 | write_preallocate_truncate_nocache 56 Kb, 1174.079536, 24.068779 11 | write_preallocate_truncate_nocache 64 Kb, 1104.118288, 8.184239 12 | write_preallocate_truncate_nocache 256 Kb, 1015.767745, 10.010424 13 | write_preallocate_truncate_nocache 1024 Kb, 923.523561, 5.493322 14 | write_preallocate_truncate_nocache 4096 Kb, 918.747832, 7.219010 15 | write_preallocate_truncate_nocache 16384 Kb, 907.590890, 4.918764 16 | write_preallocate_truncate_nocache 65536 Kb, 1218.673678, 6.063201 17 | async_write_preallocate_truncate_nocache 4 Kb, 832.496774, 4.133052 18 | async_write_preallocate_truncate_nocache 8 Kb, 755.963043, 1.204724 19 | async_write_preallocate_truncate_nocache 12 Kb, 732.225111, 3.829364 20 | async_write_preallocate_truncate_nocache 16 Kb, 718.538190, 8.277065 21 | async_write_preallocate_truncate_nocache 24 Kb, 695.851356, 0.255563 22 | async_write_preallocate_truncate_nocache 32 Kb, 689.478381, 0.668959 23 | async_write_preallocate_truncate_nocache 40 Kb, 686.459235, 1.314317 24 | async_write_preallocate_truncate_nocache 48 Kb, 685.848072, 7.066221 25 | async_write_preallocate_truncate_nocache 56 Kb, 685.429253, 8.353558 26 | async_write_preallocate_truncate_nocache 64 Kb, 680.479363, 1.510698 27 | async_write_preallocate_truncate_nocache 256 Kb, 672.223250, 10.565557 28 | async_write_preallocate_truncate_nocache 1024 Kb, 668.124333, 16.673974 29 | async_write_preallocate_truncate_nocache 4096 Kb, 668.946507, 2.635602 30 | async_write_preallocate_truncate_nocache 16384 Kb, 703.798556, 1.683463 31 | async_write_preallocate_truncate_nocache 65536 Kb, 751.087618, 6.890783 32 | -------------------------------------------------------------------------------- /src/linux/read_benchmark.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: read_benchmark.cpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 06/04/2014 5 | ** Contact: _@adityaramesh.com 6 | ** 7 | ** This is a simple benchmark that compares various methods for sequentially 8 | ** reading a file. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include 20 | #include 21 | 22 | static auto 23 | read_direct(const char* path, size_t buf_size) 24 | { 25 | auto fd = safe_open(path, O_RDONLY | O_DIRECT | O_NOATIME).get(); 26 | auto buf = allocate_aligned(4096, buf_size); 27 | auto count = read_loop(fd, buf.get(), buf_size); 28 | ::close(fd); 29 | return count; 30 | } 31 | 32 | static auto 33 | read_fadvise(const char* path, size_t buf_size) 34 | { 35 | auto fd = safe_open(path, O_RDONLY | O_NOATIME).get(); 36 | auto fs = file_size(fd).get(); 37 | auto buf = std::unique_ptr{new uint8_t[buf_size]}; 38 | fadvise_sequential_read(fd, fs); 39 | 40 | auto count = read_loop(fd, buf.get(), buf_size); 41 | ::close(fd); 42 | return count; 43 | } 44 | 45 | static auto 46 | aio_read_direct(const char* path, size_t buf_size) 47 | { 48 | auto fd = safe_open(path, O_RDONLY | O_DIRECT | O_NOATIME).get(); 49 | auto buf1 = allocate_aligned(4096, buf_size); 50 | auto buf2 = allocate_aligned(4096, buf_size); 51 | auto count = aio_read_loop(fd, buf1.get(), buf2.get(), buf_size); 52 | ::close(fd); 53 | return count; 54 | } 55 | 56 | static auto 57 | aio_read_fadvise(const char* path, size_t buf_size) 58 | { 59 | auto fd = safe_open(path, O_RDONLY | O_NOATIME).get(); 60 | auto fs = file_size(fd).get(); 61 | auto buf1 = std::unique_ptr{new uint8_t[buf_size]}; 62 | auto buf2 = std::unique_ptr{new uint8_t[buf_size]}; 63 | fadvise_sequential_read(fd, fs); 64 | 65 | auto count = aio_read_loop(fd, buf1.get(), buf2.get(), buf_size); 66 | ::close(fd); 67 | return count; 68 | } 69 | 70 | static auto 71 | read_async_plain(const char* path, size_t buf_size) 72 | { 73 | auto fd = safe_open(path, O_RDONLY | O_NOATIME).get(); 74 | auto buf1 = std::unique_ptr{new uint8_t[buf_size]}; 75 | auto buf2 = std::unique_ptr{new uint8_t[buf_size]}; 76 | auto count = async_read_loop(fd, buf1.get(), buf2.get(), buf_size); 77 | ::close(fd); 78 | return count; 79 | } 80 | 81 | static auto 82 | read_async_direct(const char* path, size_t buf_size) 83 | { 84 | auto fd = safe_open(path, O_RDONLY | O_DIRECT | O_NOATIME).get(); 85 | auto buf1 = allocate_aligned(4096, buf_size); 86 | auto buf2 = allocate_aligned(4096, buf_size); 87 | auto count = async_read_loop(fd, buf1.get(), buf2.get(), buf_size); 88 | ::close(fd); 89 | return count; 90 | } 91 | 92 | static auto 93 | read_async_fadvise(const char* path, size_t buf_size) 94 | { 95 | auto fd = safe_open(path, O_RDONLY | O_NOATIME).get(); 96 | auto fs = file_size(fd).get(); 97 | auto buf1 = std::unique_ptr{new uint8_t[buf_size]}; 98 | auto buf2 = std::unique_ptr{new uint8_t[buf_size]}; 99 | fadvise_sequential_read(fd, fs); 100 | 101 | auto count = async_read_loop(fd, buf1.get(), buf2.get(), buf_size); 102 | ::close(fd); 103 | return count; 104 | } 105 | 106 | static auto 107 | read_mmap_direct(const char* path) 108 | { 109 | auto fd = safe_open(path, O_RDONLY | O_NOATIME | O_DIRECT).get(); 110 | auto fs = file_size(fd).get(); 111 | auto p = (uint8_t*)::mmap(nullptr, fs, PROT_READ, MAP_SHARED, fd, 0); 112 | auto count = std::count_if(p, p + fs, [](auto x) { return x == needle; }); 113 | ::munmap(p, fs); 114 | return count; 115 | } 116 | 117 | static auto 118 | read_mmap_fadvise(const char* path) 119 | { 120 | auto fd = safe_open(path, O_RDONLY | O_NOATIME).get(); 121 | auto fs = file_size(fd).get(); 122 | fadvise_sequential_read(fd, fs); 123 | 124 | auto p = (uint8_t*)::mmap(nullptr, fs, PROT_READ, MAP_SHARED, fd, 0); 125 | auto count = std::count_if(p, p + fs, [](auto x) { return x == needle; }); 126 | ::munmap(p, fs); 127 | return count; 128 | } 129 | 130 | int main(int argc, char** argv) 131 | { 132 | if (argc < 2) { 133 | cc::errln("Error: too few arguments."); 134 | return EXIT_FAILURE; 135 | } 136 | else if (argc > 2) { 137 | cc::errln("Error: too many arguments."); 138 | return EXIT_FAILURE; 139 | } 140 | 141 | auto path = argv[1]; 142 | auto fd = safe_open(path, O_RDONLY).get(); 143 | auto fs = file_size(fd).get(); 144 | safe_close(fd).get(); 145 | 146 | auto count = check(path); 147 | auto sizes = {4, 8, 12, 16, 24, 32, 40, 48, 56, 64, 256, 1024, 4096, 16384, 65536, 262144}; 148 | purge_cache().get(); 149 | 150 | print_header(); 151 | test_read_range(read_plain, path, "read_plain", sizes, fs, count); 152 | test_read_range(read_direct, path, "read_direct", sizes, fs, count); 153 | test_read_range(read_fadvise, path, "read_fadvise", sizes, fs, count); 154 | test_read_range(aio_read_direct, path, "aio_read_direct", sizes, fs, count); 155 | test_read_range(aio_read_fadvise, path, "aio_read_fadvise", sizes, fs, count); 156 | test_read_range(read_async_plain, path, "read_async_plain", sizes, fs, count); 157 | test_read_range(read_async_direct, path, "read_async_direct", sizes, fs, count); 158 | test_read_range(read_async_fadvise, path, "read_async_fadvise", sizes, fs, count); 159 | test_read(std::bind(read_mmap_plain, path), "mmap_plain", count, fs); 160 | test_read(std::bind(read_mmap_direct, path), "mmap_direct", count, fs); 161 | test_read(std::bind(read_mmap_fadvise, path), "mmap_fadvise", count, fs); 162 | } 163 | -------------------------------------------------------------------------------- /src/os_x/copy_benchmark.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: copy_benchmark.cpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 06/03/2014 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | static auto 22 | copy_nocache(const char* src, const char* dst, size_t buf_size) 23 | { 24 | auto in = safe_open(src, O_RDONLY).get(); 25 | auto out = safe_open(dst, O_RDWR | O_CREAT | O_TRUNC).get(); 26 | auto buf = allocate_aligned(4096, buf_size); 27 | disable_cache(in); 28 | disable_cache(out); 29 | 30 | copy_loop(in, out, buf.get(), buf_size); 31 | ::close(in); 32 | ::close(out); 33 | } 34 | 35 | static auto 36 | copy_rdahead_preallocate(const char* src, const char* dst, size_t buf_size) 37 | { 38 | auto in = safe_open(src, O_RDONLY).get(); 39 | auto out = safe_open(dst, O_RDWR | O_CREAT | O_TRUNC).get(); 40 | auto buf = allocate_aligned(4096, buf_size); 41 | enable_rdahead(in); 42 | 43 | //preallocate(out, fs); 44 | //if (::fcntl(out, F_NOCACHE, 1) == -1) { 45 | // throw current_system_error(); 46 | //} 47 | //if (::ftruncate(out, fs) == -1) { 48 | // throw current_system_error(); 49 | //} 50 | 51 | copy_loop(in, out, buf.get(), buf_size); 52 | ::close(in); 53 | ::close(out); 54 | } 55 | 56 | static auto 57 | copy_rdadvise_preallocate(const char* src, const char* dst, size_t buf_size) 58 | { 59 | auto in = safe_open(src, O_RDONLY).get(); 60 | auto out = safe_open(dst, O_RDWR | O_CREAT | O_TRUNC).get(); 61 | auto fs = file_size(in).get(); 62 | auto buf = allocate_aligned(4096, buf_size); 63 | enable_rdadvise(in, fs); 64 | 65 | //preallocate(out, fs); 66 | //if (::fcntl(out, F_NOCACHE, 1) == -1) { 67 | // throw current_system_error(); 68 | //} 69 | //if (::ftruncate(out, fs) == -1) { 70 | // throw current_system_error(); 71 | //} 72 | 73 | copy_loop(in, out, buf.get(), buf_size); 74 | ::close(in); 75 | ::close(out); 76 | } 77 | 78 | static auto 79 | copy_mmap_nocache_plain(const char* src, const char* dst) 80 | { 81 | auto in = safe_open(src, O_RDONLY).get(); 82 | auto out = safe_open(dst, O_RDWR | O_CREAT | O_TRUNC).get(); 83 | auto fs = file_size(in).get(); 84 | 85 | /* 86 | ** Strangely, copying is fastest when we use `F_NOCACHE` for reading but 87 | ** not for writing. I do not know why. The `F_RDAHEAD` and `F_RDADVISE` 88 | ** flags do not help. 89 | */ 90 | disable_cache(in); 91 | preallocate(out, fs); 92 | truncate(out, fs); 93 | 94 | auto src_buf = (uint8_t*)::mmap(nullptr, fs, PROT_READ, MAP_SHARED, in, 0); 95 | auto dst_buf = (uint8_t*)::mmap(nullptr, fs, PROT_WRITE, MAP_SHARED, out, 0); 96 | std::copy(src_buf, src_buf + fs, dst_buf); 97 | } 98 | 99 | static auto 100 | copy_mmap_nocache_nocache(const char* src, const char* dst) 101 | { 102 | auto in = safe_open(src, O_RDONLY).get(); 103 | auto out = safe_open(dst, O_RDWR | O_CREAT | O_TRUNC).get(); 104 | auto fs = file_size(in).get(); 105 | 106 | disable_cache(in); 107 | disable_cache(out); 108 | preallocate(out, fs); 109 | truncate(out, fs); 110 | 111 | auto src_buf = (uint8_t*)::mmap(nullptr, fs, PROT_READ, MAP_SHARED, in, 0); 112 | auto dst_buf = (uint8_t*)::mmap(nullptr, fs, PROT_WRITE, MAP_SHARED, out, 0); 113 | std::copy(src_buf, src_buf + fs, dst_buf); 114 | } 115 | 116 | int main(int argc, char** argv) 117 | { 118 | if (argc < 3) { 119 | cc::errln("Error: too few arguments."); 120 | return EXIT_FAILURE; 121 | } 122 | else if (argc > 3) { 123 | cc::errln("Error: too many arguments."); 124 | return EXIT_FAILURE; 125 | } 126 | 127 | auto src = argv[1]; 128 | auto dst = argv[2]; 129 | auto sizes = {4, 8, 12, 16, 24, 32, 40, 48, 56, 64, 256, 1024, 4096, 16384, 65536, 262144}; 130 | 131 | auto fd = safe_open(src, O_RDONLY).get(); 132 | auto fs = file_size(fd).get(); 133 | safe_close(fd).get(); 134 | 135 | print_header(); 136 | test_copy_range(copy_plain, src, dst, "copy_plain", sizes, fs); 137 | test_copy_range(copy_nocache, src, dst, "copy_nocache", sizes, fs); 138 | test_copy_range(copy_rdahead_preallocate, src, dst, "copy_rdahead_preallocate", sizes, fs); 139 | test_copy_range(copy_rdadvise_preallocate, src, dst, "copy_rdadvise_preallocate", sizes, fs); 140 | test_write(std::bind(copy_mmap_nocache_plain, src, dst), "copy_mmap_nocache_plain", fs); 141 | test_write(std::bind(copy_mmap_nocache_nocache, src, dst), "copy_mmap_nocache_nocache", fs); 142 | } 143 | -------------------------------------------------------------------------------- /src/os_x/write_benchmark.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** File Name: write_benchmark.cpp 3 | ** Author: Aditya Ramesh 4 | ** Date: 06/04/2014 5 | ** Contact: _@adityaramesh.com 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | #include 19 | 20 | static void 21 | write_nocache(const char* path, size_t buf_size, size_t count) 22 | { 23 | auto fd = safe_open(path, O_WRONLY | O_CREAT | O_TRUNC).get(); 24 | auto buf = allocate_aligned(4096, buf_size); 25 | disable_cache(fd); 26 | 27 | write_loop(fd, buf.get(), buf_size, count); 28 | ::close(fd); 29 | } 30 | 31 | static void 32 | write_preallocate(const char* path, size_t buf_size, size_t count) 33 | { 34 | auto fd = safe_open(path, O_WRONLY | O_CREAT | O_TRUNC).get(); 35 | auto buf = std::unique_ptr{new uint8_t[buf_size]}; 36 | preallocate(fd, count); 37 | write_loop(fd, buf.get(), buf_size, count); 38 | ::close(fd); 39 | } 40 | 41 | static void 42 | write_preallocate_truncate(const char* path, size_t buf_size, size_t count) 43 | { 44 | auto fd = safe_open(path, O_WRONLY | O_CREAT | O_TRUNC).get(); 45 | auto buf = std::unique_ptr{new uint8_t[buf_size]}; 46 | preallocate(fd, count); 47 | truncate(fd, count); 48 | write_loop(fd, buf.get(), buf_size, count); 49 | ::close(fd); 50 | } 51 | 52 | static void 53 | write_preallocate_truncate_nocache(const char* path, size_t buf_size, size_t count) 54 | { 55 | auto fd = safe_open(path, O_WRONLY | O_CREAT | O_TRUNC).get(); 56 | auto buf = allocate_aligned(4096, buf_size); 57 | disable_cache(fd); 58 | preallocate(fd, count); 59 | truncate(fd, count); 60 | 61 | write_loop(fd, buf.get(), buf_size, count); 62 | ::close(fd); 63 | } 64 | 65 | static void 66 | async_write_preallocate_truncate_nocache(const char* path, size_t buf_size, size_t count) 67 | { 68 | auto fd = safe_open(path, O_WRONLY | O_CREAT | O_TRUNC).get(); 69 | auto buf1 = allocate_aligned(4096, buf_size); 70 | auto buf2 = allocate_aligned(4096, buf_size); 71 | disable_cache(fd); 72 | preallocate(fd, count); 73 | truncate(fd, count); 74 | 75 | async_write_loop(fd, buf1.get(), buf2.get(), buf_size, count); 76 | ::close(fd); 77 | } 78 | 79 | static void 80 | write_mmap(const char* path, size_t count) 81 | { 82 | auto fd = safe_open(path, O_RDWR | O_CREAT | O_TRUNC).get(); 83 | disable_cache(fd); 84 | preallocate(fd, count); 85 | truncate(fd, count); 86 | 87 | auto p = (uint8_t*)::mmap(nullptr, count, PROT_WRITE, MAP_SHARED, fd, 0); 88 | if (p == (void*)-1) { throw current_system_error(); } 89 | fill_buffer(p, count); 90 | ::close(fd); 91 | } 92 | 93 | int main(int argc, char** argv) 94 | { 95 | using namespace std::placeholders; 96 | 97 | if (argc < 2) { 98 | cc::errln("Error: too few arguments."); 99 | return EXIT_FAILURE; 100 | } 101 | else if (argc > 2) { 102 | cc::errln("Error: too many arguments."); 103 | return EXIT_FAILURE; 104 | } 105 | 106 | auto count = std::atoi(argv[1]); 107 | if (count <= 0) { 108 | cc::errln("Error: count must be positive."); 109 | return EXIT_FAILURE; 110 | } 111 | 112 | auto path = "data/test.bin"; 113 | auto kb = 1024; 114 | auto sizes = {4, 8, 12, 16, 24, 32, 40, 48, 56, 64, 256, 1024, 4096, 16384, 65536, 262144}; 115 | 116 | // Dummy write to create file. 117 | write_plain(path, 4 * kb, count); 118 | 119 | print_header(); 120 | test_write_range(std::bind(write_plain, _1, _2, count), path, "write_plain", sizes, count); 121 | test_write_range(std::bind(write_nocache, _1, _2, count), path, "write_nocache", sizes, count); 122 | test_write_range(std::bind(write_preallocate, _1, _2, count), path, "write_preallocate", sizes, count); 123 | test_write_range(std::bind(write_preallocate_truncate, _1, _2, count), path, "write_preallocate_truncate", sizes, count); 124 | test_write_range(std::bind(write_preallocate_truncate_nocache, _1, _2, count), path, "write_preallocate_truncate_nocache", sizes, count); 125 | test_write_range(std::bind(async_write_preallocate_truncate_nocache, _1, _2, count), path, "async_write_preallocate_truncate_nocache", sizes, count); 126 | test_write(std::bind(write_mmap, path, count), "write_mmap", count); 127 | } 128 | -------------------------------------------------------------------------------- /tools/make_data.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | 3 | def make_test_files() 4 | block_size = 64 * 2**10 5 | [8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 6 | 320, 384, 448, 512, 640, 768, 896, 1024].each do |i| 7 | file_size = i * 2**20 8 | count = file_size / block_size 9 | puts "Creating #{i} MB test file." 10 | `dd if=/dev/urandom of=data/test_#{i}.bin bs=#{block_size} count=#{count}` 11 | end 12 | end 13 | 14 | make_test_files() 15 | -------------------------------------------------------------------------------- /tools/test_read.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | #sizes=(8 16 24 32 40 48 56 64 80 96 112 128 160 192 224 256 320 384 448 512 640 768 896 1024) 4 | sizes=(8 16 32 64 80 96 112 256) #512 1024) 5 | 6 | set -x 7 | for s in ${sizes[@]}; do 8 | ./out/read_benchmark.run data/test_$s.bin | tee results/read_$s.csv 9 | done 10 | cat results/read_*.csv > results/read_results.csv 11 | -------------------------------------------------------------------------------- /tools/test_write.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | #sizes=(8 16 24 32 40 48 56 64 80 96 112 128 160 192 224 256 320 384 448 512 640 768 896 1024) 4 | sizes=(8 16 32 64 80 96 112 256) #512 1024) 5 | 6 | set -x 7 | for s in ${sizes[@]}; do 8 | ./out/write_benchmark.run $[s * 2**20] | tee results/write_$s.csv 9 | done 10 | cat results/write_*.csv > results/write_results.csv 11 | --------------------------------------------------------------------------------