{"id":14579327,"url":"https://github.com/adityaramesh/io_benchmark","last_synced_at":"2026-01-16T13:30:59.333Z","repository":{"id":17667367,"uuid":"20472075","full_name":"adityaramesh/io_benchmark","owner":"adityaramesh","description":"Comparison of IO methods for OS X and Linux.","archived":false,"fork":false,"pushed_at":"2014-07-12T16:10:17.000Z","size":717,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-13T03:46:37.307Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adityaramesh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-04T06:04:13.000Z","updated_at":"2024-07-17T07:58:19.000Z","dependencies_parsed_at":"2022-09-10T17:51:23.294Z","dependency_job_id":null,"html_url":"https://github.com/adityaramesh/io_benchmark","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityaramesh%2Fio_benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityaramesh%2Fio_benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityaramesh%2Fio_benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adityaramesh%2Fio_benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adityaramesh","download_url":"https://codeload.github.com/adityaramesh/io_benchmark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231975442,"owners_count":18454714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-07T20:01:21.062Z","updated_at":"2026-01-16T13:30:59.326Z","avatar_url":"https://github.com/adityaramesh.png","language":"C++","funding_links":[],"categories":["Benchmarks"],"sub_categories":[],"readme":"\u003c!--\n  ** File Name:\tREADME.md\n  ** Author:\tAditya Ramesh\n  ** Date:\t06/04/2014\n  ** Contact:\t_@adityaramesh.com\n--\u003e\n\n# Introduction\n\nThis repository contains a comprehensive set of IO benchmarks for Linux and OS\nX. These benchmarks are intended to determine the fastest ways to perform the\nfollowing IO operations on each target platform:\n\n  - Sequentially reading a file.\n  - Sequentially overwriting a preallocated file.\n  - Replacing the contents of an existing file with those of another file.\n\n# Prerequisites\n\n- Linux (version 2.6.33 or newer) or OS X.\n- A C++11-conformant compiler that accepts flags in GCC's format (e.g. `g++` or\n`clang++`).\n- Boost.\n- Ruby.\n- Rake.\n\n# Compilation\n\nBefore compiling the benchmarks, you will need to set two environment variables.\n\n  - Set `CXX` to your desired C++11-conformant compiler.\n  - Set `BOOST_INCLUDE_PATH` to the path containing the Boost header files.\n\nAfterwards, you can compile the benchmarks by running `rake`.\n\n# Usage\n\nThe `tools` directory contains a set of scripts that you will need to run the\nbenchmarks. In order to run these scripts, you will need to type `chmod +x\ntools/*`.\n\n  - The `tools/make_data.rb` script uses `dd` to create a set of files in the\n  `data` directory. These files are used to perform the benchmarks.\n  - The `tools/test_read.sh` and `tools/test_write.sh` scripts perform the\n  reading and writing benchmarks, respectively.\n  - The read benchmark **must** be run as root! This is because the benchmark\n  repeatedly drops the page cache to obtain accurate results. Do **not** run\n  this benchmark on a server that is doing anything important!\n  - I did not create a script to run the copy benchmark. Based on existing\n  results, it is clear that the fastest way to copy a file on OS X is\n  `copy_mmap`, and `splice_preallocate_fadvise` or\n  `sendfile_preallocate_fadvise` on Linux.\n\nIn both `test_read.sh` and `test_write.sh`, you will see the following lines:\n\n\t#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)\n\tsizes=(8 16 32 64 80 96 112 256) #512 1024)\n\nThese lines declare the sizes of the files (in megabytes) that are used for the\nbenchmarks. By default, only a small set of files ranging in size from 8 MB to\n256 MB are used. The first line in the pair refers to the full set of files\nproduced by `tools/make_data.rb`. Even on a machine with a fast PCIe SSD, the\nread benchmark did not finish overnight. So only uncomment this line if you know\nthat you will be able to leave the benchmark running for a long time (half a day\nto several days, depending on the speed of your hard drive).\n\nThe results of the benchmarks are saved in the `results` directory. This\ndirectory already contains results generated from a couple of systems.\n\n# License\n\n[![Creative Commons Attribution 4.0 International\nLicense][license_image]][license_page]\n\nThis project is released under the [Creative Commons Attribution 4.0\nInternational License][license_page].\n\n[license_page]:\nhttp://creativecommons.org/licenses/by/4.0/\n\n[license_image]:\nhttp://i.creativecommons.org/l/by/4.0/88x31.png\n\n# References\n\n- The manual pages for [OS X][darwin_man] and [Linux][linux_man].\n- A very useful [benchmark][write_patterns] on write patterns.\n- The [blog post][plenz_blog_post] by the same author.\n- A Mozilla [blog post][moz_blog_post] about `F_PREALLOCATE` on OS X.\n\n[darwin_man]:\nhttps://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/\n\"Mac OS X Manual Pages\"\n\n[linux_man]:\nhttp://linux.die.net/man/\n\"Linux Manual Pages\"\n\n[write_patterns]:\nhttps://github.com/Feh/write-patterns\n\"Write Patterns\"\n\n[plenz_blog_post]:\nhttp://blog.plenz.com/2014-04/so-you-want-to-write-to-a-file-real-fast.html\n\"Write Patterns Blog Post\"\n\n[moz_blog_post]:\nhttps://blog.mozilla.org/tglek/2010/09/09/help-wanted-does-fcntlf_preallocate-work-as-advertised-on-osx/\n\"F_PREALLOCATE Blog Post\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadityaramesh%2Fio_benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadityaramesh%2Fio_benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadityaramesh%2Fio_benchmark/lists"}