Skip to content
Snippets Groups Projects
Commit 73df62e7 authored by Florian Ziemen's avatar Florian Ziemen
Browse files

Added timer hands-on

parent bff66d85
No related branches found
No related tags found
1 merge request!11File and Data Systems
Pipeline #71203 passed
...@@ -97,6 +97,16 @@ author: "Florian Ziemen and Karl-Hermann Wieners" ...@@ -97,6 +97,16 @@ author: "Florian Ziemen and Karl-Hermann Wieners"
* Serialized access only * Serialized access only
* Backup / long-term storage * Backup / long-term storage
## Hands-on {.handson}
::: {.smaller}
{{< embed timer.ipynb echo=true >}}
:::
Take this set of calls, improve the code, and measure the write speed for different file sizes on your `/scratch/`
## Hands-on {.handson}
Add a similar function for reading, and read the data you just produced. What's your throughput?
# Storage Architectures # Storage Architectures
> These aren't books in which events of the past are pinned like so many butterflies to a cork. These are the books from which history is derived. There are more than twenty thousand of them; each one is ten feet high, bound in lead, and the letters are so small that they have to be read with a magnifying glass. > These aren't books in which events of the past are pinned like so many butterflies to a cork. These are the books from which history is derived. There are more than twenty thousand of them; each one is ten feet high, bound in lead, and the letters are so small that they have to be read with a magnifying glass.
...@@ -186,6 +196,7 @@ The file system becomes an independent system. ...@@ -186,6 +196,7 @@ The file system becomes an independent system.
* All nodes see the same set of files. * All nodes see the same set of files.
* A set of central servers manages the file system. * A set of central servers manages the file system.
* All nodes accessing the lustre file system run local *clients*. * All nodes accessing the lustre file system run local *clients*.
* Optimized for high traffic volumes in large files.
## Metadata and storage servers ## Metadata and storage servers
* The index is spread over a group of Metadata servers (MDS, 8 for work on levante). * The index is spread over a group of Metadata servers (MDS, 8 for work on levante).
......
%% Cell type:code id:bc0cdf17-1d21-4ade-a090-45101abf8ab5 tags:
``` python
import timeit
```
%% Cell type:code id:bcf39570-a5bc-4af4-9354-06a801222826 tags:
``` python
def write (path, length, blocksize=1024**2):
with open(path, "wb") as of:
data = bytearray(blocksize)
times = length // (blocksize)
remainder = length % blocksize
for i in range (times):
of.write(data)
if remainder:
of.write(bytearray(remainder))
of.close()
```
%% Cell type:code id:34a59ea9-52c9-4c3f-8664-a5a97882e5e0 tags:
``` python
duration = {}
duration['1GB'] = timeit.timeit(lambda : write("/scratch/k/k202134/test.1GB", (1024**3)), number =1)
print (duration)
```
%% Output
{'1GB': 0.5966405299986945}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment