D
D
Dima_kras2018-10-17 11:09:08
Python
Dima_kras, 2018-10-17 11:09:08

Ram disk in Debian (Raspberry) is slow, what could be wrong?

Good afternoon, I created a Ram disk, mounted a folder in tmpfs.
I check the speed, write and read the picture using opencv and Python.
The write / read time on the sd card and ram disk is the same. What could be wrong?
I expected that writing to a ramdisk would be faster. Reading and writing from a ram disk of a 1 mb image takes about 0.5105 s, to an sd card 0.63 s, the difference is small, I expected a difference of 10 times, not 20%
Is this normal?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
ky0, 2018-10-17
@ky0

Most likely the bottleneck is not memory, but something else. Is copying from tmpfs to tmpfs slow too?

B
Boris Syomov, 2018-10-17
@kotomyava

No, it's not normal if you correctly calculate the time of recording, and not processing and recording, for example.
1. Do you have enough free RAM at the time of recording? Isn't it all written in swap on the same card?
2. Is your folder actually mounted to which you write?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question