Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
d972be0f
Commit
d972be0f
authored
Mar 18, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X math notest on buffer vs direct access
parent
f3fbbcac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
1 deletion
+38
-1
t/neo/storage/fs1/notes_io.txt
t/neo/storage/fs1/notes_io.txt
+38
-1
No files found.
t/neo/storage/fs1/notes_io.txt
View file @
d972be0f
...
...
@@ -34,7 +34,44 @@ pread + user-buffer
It is possible to mitigate high α and buffer data from bigger reads in
user-space and for smaller client reads copy data from that buffer.
Performance depends on buffer hit/miss ration and will be evaluated for simple
math to get optimal parameters:
( note here S is what α is above - syscall time, and C is what β is above - 1
byte copy time )
- we are reading N bytes sequentially
- consider 2 variants:
a) 1 syscall + 1 big copy + use the copy for smaller reads
cost: S + C⋅N + C⋅N
b) direct acces in x-byte chunks
N
cost: S⋅─ + C⋅N
x
Q: when direct access is chaper?
N⋅S
-> x ≥ ─────── , or
C⋅N + S
α⋅N S
x ≥ ───── , α = ─
α + N C
Q: when reading direct in x-byte chunks: what is N so direct becomes cheaper?
α⋅x
-> N ≥ ─────
α - x
----
Performance depends on buffer hit/miss ratio and will be evaluated for simple
1-page buffer.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment