AFIO  v2.00 late alpha
afio_v2_xxx::storage_profile::storage_profile Struct Reference

A (possibly incomplet) profile of storage. More...

#include "storage_profile.hpp"

Public Types

using size_type = size_t
 The size type.
 
using value_type = item_erased &
 Value type.
 
using reference = item_erased &
 Reference type.
 
using const_reference = const item_erased &
 Const reference type.
 
using iterator = item_erased *
 Iterator type.
 
using const_iterator = const item_erased *
 Const iterator type.
 
using handle_type = item_base::handle_type
 The type of handle used for testing.
 

Public Member Functions

bool empty () const noexcept
 True if this storage profile is empty.
 
size_type size () const noexcept
 Items in this storage profile.
 
size_type max_size () const noexcept
 Potential items in this storage profile.
 
iterator begin () noexcept
 Returns an iterator to the first item.
 
iterator end () noexcept
 Returns an iterator to the last item.
 
const_iterator begin () const noexcept
 Returns an iterator to the first item.
 
const_iterator end () const noexcept
 Returns an iterator to the last item.
 
void read (std::istream &in, std::regex which=std::regex(".*"))
 Read the matching items in the storage profile from in as YAML.
 
void write (std::ostream &out, const std::regex &which=std::regex(".*"), size_t _indent=0, bool invert_match=false) const
 Write the matching items from storage profile as YAML to out with the given indentation.
 

Public Attributes

item< std::string > os_name = {"system:os:name", &system::os}
 
item< std::string > os_ver = {"system:os:ver", &system::os}
 
item< std::string > cpu_name = {"system:cpu:name", &system::cpu}
 
item< std::string > cpu_architecture = {"system:cpu:architecture", &system::cpu}
 
item< unsigned > cpu_physical_cores = {"system:cpu:physical_cores", &system::cpu}
 
item< unsigned long long > mem_max_bandwidth = {"system:mem:max_bandwidth", system::mem, "Main memory bandwidth when accessed sequentially (1 CPU core)"}
 
item< unsigned long long > mem_min_bandwidth = {"system:mem:min_bandwidth", system::mem, "Main memory bandwidth when 4Kb pages are accessed randomly (1 CPU core)"}
 
item< unsigned long long > mem_quantity = {"system:mem:quantity", &system::mem}
 
item< float > mem_in_use = {"system:mem:in_use", &system::mem}
 
item< unsigned > clock_granularity = {"system:timer:ns_per_tick", &system::clock_granularity}
 
item< unsigned > clock_overhead = {"system:timer:ns_overhead", &system::clock_granularity}
 
item< unsigned > yield_overhead = {"system:scheduler:ns_yield", &system::yield_overhead, "Nanoseconds to context switch a thread"}
 
item< unsigned > sleep_wake_overhead = {"system:scheduler:ns_sleep_wake", &system::sleep_wake_overhead, "Nanoseconds to sleep and wake a thread"}
 
item< unsigned > drop_filesystem_cache_support = {"system:drop_filesystem_cache_support", &system::drop_filesystem_cache_support}
 
item< std::string > controller_type = {"storage:controller:kind", &storage::device}
 
item< unsigned > controller_max_transfer = {"storage:controller:max_transfer", storage::device, "The maximum number of bytes the disk controller can transfer at once"}
 
item< unsigned > controller_max_buffers = {"storage:controller:max_buffers", storage::device, "The maximum number of scatter-gather buffers the disk controller can handle"}
 
item< std::string > device_name = {"storage:device:name", &storage::device}
 
item< unsigned > device_min_io_size = {"storage:device:min_io_size", &storage::device}
 
item< io_service::extent_typedevice_size = {"storage:device:size", &storage::device}
 
item< std::string > fs_name = {"storage:fs:name", &storage::fs}
 
item< std::string > fs_config = {"storage:fs:config", &storage::fs}
 
item< io_service::extent_typefs_size = {"storage:fs:size", &storage::fs}
 
item< float > fs_in_use = {"storage:fs:in_use", &storage::fs}
 
item< io_service::extent_typeatomic_rewrite_quantum = {"concurrency:atomic_rewrite_quantum", concurrency::atomic_rewrite_quantum, "The i/o modify quantum guaranteed to be atomically visible to readers irrespective of rewrite quantity"}
 
item< io_service::extent_typemax_aligned_atomic_rewrite
 
item< io_service::extent_typeatomic_rewrite_offset_boundary
 
item< unsigned > read_nothing = {"latency:read:nothing", latency::read_nothing, "The nanoseconds to read zero bytes"}
 
item< unsigned long long > read_qd1_min = {"latency:read:qd1:min", latency::read_qd1, "The nanoseconds to read 4Kb at a queue depth of 1 (min)"}
 
item< unsigned long long > read_qd1_mean = {"latency:read:qd1:mean", latency::read_qd1, "The nanoseconds to read 4Kb at a queue depth of 1 (arithmetic mean)"}
 
item< unsigned long long > read_qd1_max = {"latency:read:qd1:max", latency::read_qd1, "The nanoseconds to read 4Kb at a queue depth of 1 (max)"}
 
item< unsigned long long > read_qd1_50 = {"latency:read:qd1:50%", latency::read_qd1, "The nanoseconds to read 4Kb at a queue depth of 1 (50% of the time)"}
 
item< unsigned long long > read_qd1_95 = {"latency:read:qd1:95%", latency::read_qd1, "The nanoseconds to read 4Kb at a queue depth of 1 (95% of the time)"}
 
item< unsigned long long > read_qd1_99 = {"latency:read:qd1:99%", latency::read_qd1, "The nanoseconds to read 4Kb at a queue depth of 1 (99% of the time)"}
 
item< unsigned long long > read_qd1_99999 = {"latency:read:qd1:99.999%", latency::read_qd1, "The nanoseconds to read 4Kb at a queue depth of 1 (99.999% of the time)"}
 
item< unsigned long long > read_qd16_min = {"latency:read:qd16:min", latency::read_qd16, "The nanoseconds to read 4Kb at a queue depth of 16 (min)"}
 
item< unsigned long long > read_qd16_mean = {"latency:read:qd16:mean", latency::read_qd16, "The nanoseconds to read 4Kb at a queue depth of 16 (arithmetic mean)"}
 
item< unsigned long long > read_qd16_max = {"latency:read:qd16:max", latency::read_qd16, "The nanoseconds to read 4Kb at a queue depth of 16 (max)"}
 
item< unsigned long long > read_qd16_50 = {"latency:read:qd16:50%", latency::read_qd16, "The nanoseconds to read 4Kb at a queue depth of 16 (50% of the time)"}
 
item< unsigned long long > read_qd16_95 = {"latency:read:qd16:95%", latency::read_qd16, "The nanoseconds to read 4Kb at a queue depth of 16 (95% of the time)"}
 
item< unsigned long long > read_qd16_99 = {"latency:read:qd16:99%", latency::read_qd16, "The nanoseconds to read 4Kb at a queue depth of 16 (99% of the time)"}
 
item< unsigned long long > read_qd16_99999 = {"latency:read:qd16:99.999%", latency::read_qd16, "The nanoseconds to read 4Kb at a queue depth of 16 (99.999% of the time)"}
 
item< unsigned > write_nothing = {"latency:write:nothing", latency::write_nothing, "The nanoseconds to write zero bytes"}
 
item< unsigned long long > write_qd1_min = {"latency:write:qd1:min", latency::write_qd1, "The nanoseconds to write 4Kb at a queue depth of 1 (min)"}
 
item< unsigned long long > write_qd1_mean = {"latency:write:qd1:mean", latency::write_qd1, "The nanoseconds to write 4Kb at a queue depth of 1 (arithmetic mean)"}
 
item< unsigned long long > write_qd1_max = {"latency:write:qd1:max", latency::write_qd1, "The nanoseconds to write 4Kb at a queue depth of 1 (max)"}
 
item< unsigned long long > write_qd1_50 = {"latency:write:qd1:50%", latency::write_qd1, "The nanoseconds to write 4Kb at a queue depth of 1 (50% of the time)"}
 
item< unsigned long long > write_qd1_95 = {"latency:write:qd1:95%", latency::write_qd1, "The nanoseconds to write 4Kb at a queue depth of 1 (95% of the time)"}
 
item< unsigned long long > write_qd1_99 = {"latency:write:qd1:99%", latency::write_qd1, "The nanoseconds to write 4Kb at a queue depth of 1 (99% of the time)"}
 
item< unsigned long long > write_qd1_99999 = {"latency:write:qd1:99.999%", latency::write_qd1, "The nanoseconds to write 4Kb at a queue depth of 1 (99.999% of the time)"}
 
item< unsigned long long > write_qd16_min = {"latency:write:qd16:min", latency::write_qd16, "The nanoseconds to write 4Kb at a queue depth of 16 (min)"}
 
item< unsigned long long > write_qd16_mean = {"latency:write:qd16:mean", latency::write_qd16, "The nanoseconds to write 4Kb at a queue depth of 16 (arithmetic mean)"}
 
item< unsigned long long > write_qd16_max = {"latency:write:qd16:max", latency::write_qd16, "The nanoseconds to write 4Kb at a queue depth of 16 (max)"}
 
item< unsigned long long > write_qd16_50 = {"latency:write:qd16:50%", latency::write_qd16, "The nanoseconds to write 4Kb at a queue depth of 16 (50% of the time)"}
 
item< unsigned long long > write_qd16_95 = {"latency:write:qd16:95%", latency::write_qd16, "The nanoseconds to write 4Kb at a queue depth of 16 (95% of the time)"}
 
item< unsigned long long > write_qd16_99 = {"latency:write:qd16:99%", latency::write_qd16, "The nanoseconds to write 4Kb at a queue depth of 16 (99% of the time)"}
 
item< unsigned long long > write_qd16_99999 = {"latency:write:qd16:99.999%", latency::write_qd16, "The nanoseconds to write 4Kb at a queue depth of 16 (99.999% of the time)"}
 
item< unsigned long long > readwrite_qd4_min = {"latency:readwrite:qd4:min", latency::readwrite_qd4, "The nanoseconds to 75% read 25% write 4Kb at a total queue depth of 4 (min)"}
 
item< unsigned long long > readwrite_qd4_mean = {"latency:readwrite:qd4:mean", latency::readwrite_qd4, "The nanoseconds to 75% read 25% write 4Kb at a total queue depth of 4 (arithmetic mean)"}
 
item< unsigned long long > readwrite_qd4_max = {"latency:readwrite:qd4:max", latency::readwrite_qd4, "The nanoseconds to 75% read 25% write 4Kb at a total queue depth of 4 (max)"}
 
item< unsigned long long > readwrite_qd4_50 = {"latency:readwrite:qd4:50%", latency::readwrite_qd4, "The nanoseconds to 75% read 25% write 4Kb at a total queue depth of 4 (50% of the time)"}
 
item< unsigned long long > readwrite_qd4_95 = {"latency:readwrite:qd4:95%", latency::readwrite_qd4, "The nanoseconds to 75% read 25% write 4Kb at a total queue depth of 4 (95% of the time)"}
 
item< unsigned long long > readwrite_qd4_99 = {"latency:readwrite:qd4:99%", latency::readwrite_qd4, "The nanoseconds to 75% read 25% write 4Kb at a total queue depth of 4 (99% of the time)"}
 
item< unsigned long long > readwrite_qd4_99999 = {"latency:readwrite:qd4:99.999%", latency::readwrite_qd4, "The nanoseconds to 75% read 25% write 4Kb at a total queue depth of 4 (99.999% of the time)"}
 
item< unsigned long long > create_file_warm_racefree_0b = {"response_time:race_free:warm_cache:create_file:0b", response_time::traversal_warm_racefree_0b, "The average nanoseconds to create a 0 byte file (warm cache, race free)"}
 
item< unsigned long long > enumerate_file_warm_racefree_0b = {"response_time:race_free:warm_cache:enumerate_file:0b", response_time::traversal_warm_racefree_0b, "The average nanoseconds to enumerate a 0 byte file (warm cache, race free)"}
 
item< unsigned long long > open_file_read_warm_racefree_0b = {"response_time:race_free:warm_cache:open_file_read:0b", response_time::traversal_warm_racefree_0b, "The average nanoseconds to open a 0 byte file for reading (warm cache, race free)"}
 
item< unsigned long long > open_file_write_warm_racefree_0b = {"response_time:race_free:warm_cache:open_file_write:0b", response_time::traversal_warm_racefree_0b, "The average nanoseconds to open a 0 byte file for writing (warm cache, race free)"}
 
item< unsigned long long > delete_file_warm_racefree_0b = {"response_time:race_free:warm_cache:delete_file:0b", response_time::traversal_warm_racefree_0b, "The average nanoseconds to delete a 0 byte file (warm cache, race free)"}
 
item< unsigned long long > create_file_warm_nonracefree_0b = {"response_time:non_race_free:warm_cache:create_file:0b", response_time::traversal_warm_nonracefree_0b, "The average nanoseconds to create a 0 byte file (warm cache, non race free)"}
 
item< unsigned long long > enumerate_file_warm_nonracefree_0b = {"response_time:non_race_free:warm_cache:enumerate_file:0b", response_time::traversal_warm_nonracefree_0b, "The average nanoseconds to enumerate a 0 byte file (warm cache, non race free)"}
 
item< unsigned long long > open_file_read_warm_nonracefree_0b = {"response_time:non_race_free:warm_cache:open_file_read:0b", response_time::traversal_warm_nonracefree_0b, "The average nanoseconds to open a 0 byte file for reading (warm cache, non race free)"}
 
item< unsigned long long > open_file_write_warm_nonracefree_0b = {"response_time:non_race_free:warm_cache:open_file_write:0b", response_time::traversal_warm_nonracefree_0b, "The average nanoseconds to open a 0 byte file for writing (warm cache, non race free)"}
 
item< unsigned long long > delete_file_warm_nonracefree_0b = {"response_time:non_race_free:warm_cache:delete_file:0b", response_time::traversal_warm_nonracefree_0b, "The average nanoseconds to delete a 0 byte file (warm cache, non race free)"}
 
item< unsigned long long > create_file_cold_racefree_0b = {"response_time:race_free:cold_cache:create_file:0b", response_time::traversal_cold_racefree_0b, "The average nanoseconds to create a 0 byte file (cold cache, race free)"}
 
item< unsigned long long > enumerate_file_cold_racefree_0b = {"response_time:race_free:cold_cache:enumerate_file:0b", response_time::traversal_cold_racefree_0b, "The average nanoseconds to enumerate a 0 byte file (cold cache, race free)"}
 
item< unsigned long long > open_file_read_cold_racefree_0b = {"response_time:race_free:cold_cache:open_file_read:0b", response_time::traversal_cold_racefree_0b, "The average nanoseconds to open a 0 byte file for reading (cold cache, race free)"}
 
item< unsigned long long > open_file_write_cold_racefree_0b = {"response_time:race_free:cold_cache:open_file_write:0b", response_time::traversal_cold_racefree_0b, "The average nanoseconds to open a 0 byte file for writing (cold cache, race free)"}
 
item< unsigned long long > delete_file_cold_racefree_0b = {"response_time:race_free:cold_cache:delete_file:0b", response_time::traversal_cold_racefree_0b, "The average nanoseconds to delete a 0 byte file (cold cache, race free)"}
 

Detailed Description

A (possibly incomplet) profile of storage.

Member Data Documentation

◆ atomic_rewrite_offset_boundary

item<io_service::extent_type> afio_v2_xxx::storage_profile::storage_profile::atomic_rewrite_offset_boundary
Initial value:
= {"concurrency:atomic_rewrite_offset_boundary", concurrency::atomic_rewrite_offset_boundary, "The multiple of offset in a file where update atomicity breaks, so if you wrote 4096 bytes at a 512 offset and "
"this value was 4096, your write would tear at 3584 because all writes would tear on a 4096 offset multiple. "
"Linux has a famously broken kernel i/o design which causes this value to be a page multiple, except on "
"filing systems which take special measures to work around it. Windows NT appears to lose all atomicity as soon as "
"an i/o straddles a 4096 file offset multiple and DMA suddenly goes into many 64 byte cache lines :(, so if "
"this value is less than max_aligned_atomic_rewrite and some multiple of the CPU cache line size then this is "
"what has happened."}

◆ max_aligned_atomic_rewrite

item<io_service::extent_type> afio_v2_xxx::storage_profile::storage_profile::max_aligned_atomic_rewrite
Initial value:
= {"concurrency:max_aligned_atomic_rewrite", concurrency::atomic_rewrite_quantum,
"The maximum single aligned i/o modify quantity atomically visible to readers (can be [potentially unreliably] much larger than atomic_rewrite_quantum). "
"A very common value on modern hardware with direct i/o thanks to PCIe DMA is 4096, don't trust values higher than this because of potentially discontiguous memory page mapping."}

The documentation for this struct was generated from the following file: