R
R
Rushan4eg2018-01-09 23:06:04
Solid State Drives
Rushan4eg, 2018-01-09 23:06:04

Which is faster writing to disk/Unix socket/RAM?

Good afternoon!
I'm looking for a way to improve the performance of a parsing program by optimizing io operations.
Now I look in the direction of unix socket and ram. What will be the fastest?
UPD. Isn't a socket write a RAM write? As far as I know unix socket performs io operations in RAM memory (for example in /tmp)

Answer the question

In order to leave comments, you need to log in

4 answer(s)
B
Boris Korobkov, 2018-01-09
@BorisKorobkov

Which is faster: write it down on paper / tell the secretary / memorize it yourself?

A
Alexey Cheremisin, 2018-01-09
@leahch

Writing to ram, but writing to tmpfs, or working with a file through mmap will also be fast.
Well, if we talk about sockets, then I would focus on something like redis.io in order to avoid unnecessary gestures with sockets. And yes, writing to ssd is also not bad.
The whole question here is how much memory you have, how you work with it, and oddly enough, by what algorithms. All of these methods have their pros and cons.

A
Artem @Jump, 2018-01-10
Tag curated by

Which is faster writing to disk/Unix socket/RAM?
Depends on the situation.
As a rule, writing to RAM is always faster by thousands of times, unless, of course, this memory is available.
If it is not present, then perhaps it will be even slower than on disk.

B
bro-dev, 2018-01-10
@bro-dev

Most likely, when parsing, the bottleneck is not io. So it's better to save ram for the time being.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question