В Linux стандартными средствами можно использовать часть оперативной памяти как диск. Для этого требуется указать тип монтирования tmpfs в команде mount
mount -t tmpfs -o size=5G tmpfs /mnt/ram
Теперь путь /mnt/ram можно использовать как обычный каталог. Для чего это может быть нужно?
▫️ Скорость работы с таким каталогом выше чем многие SSD и тем более HDD.
▫️ Если у вас очень быстрый SSD на NVMe M.2 то такой способ особо не прибавит вам скорости, но поможет сохранить ресурс SSD когда требуется обрабатывать очень много мелких файлов и оперативка позволяет выделить нужный объем.
▫️ Оперативка это энергозависимая память, поэтому выключении питания все файлы безвозвратно теряются. Такой "non persistent" каталог гарантирует удаление временных файлов.
Я написал небольшой скрипт для условного теста и сравнения скорости копирования файлов между SSD и RAM.
Вот мои результаты:
Single File Size: 30.0Gb
ssd > ssd: 0:00:12.850 / 2.3Gb/s
sdd > ram: 0:00:06.453 / 4.6Gb/s
ram > ram: 0:00:06.995 / 4.3Gb/s
ram > sdd: 0:00:06.217 / 4.8Gb/s
Dir size: 32.7Gb, File count: 11127
ssd > ssd: 0:00:15.063 / 2.2Gb/s
sdd > ram: 0:00:08.486 / 3.9Gb/s
ram > ram: 0:00:08.032 / 4.1Gb/s
ram > sdd: 0:00:07.026 / 4.7Gb/s
Скрипт для теста ↗️
На моём железе прирост скорости ~2x. Плюс экономия ресурса SSD.
В Windows такой фишки по умолчанию нет, но обязательно найдутся аналогичные решения
#linux#triks
#Iceland🇮🇸
A special place in Iceland is considered to be the black beach. It was here that such cult movies as "The Lord of the Rings", "Game of Thrones" and "Star Wars" were filmed. The black beach was formed as a result of volcanic activity. This event happened many years ago
#Iceland, Gudlfoss 🇮🇸
Gyudlfoss is a waterfall in Iceland, in the Syudurland region.
The depth of the waterfall to the place of water falling in the valley is about 70 meters. The Güdlfoss itself consists of two steps - 21 meters and 11 meters high, dumped to each other at an angle of 90 °.
It is considered one of the most beautiful places in Iceland and is the most visited tourists.
🌟Breathtaking Views of Iceland!
🟠A mesmerizing landscape where a powerful waterfall meets silent green hills and dramatic clouds on the horizon.
🟠Nature here stuns with its beauty and scale, offering perfect spots for adventure seekers and photography enthusiasts. Feel the grandeur and tranquility of these magnificent landscapes!
#Iceland | @voyage
🗺 Iceland 🇮🇸
Following a recent volcanic eruption, the main highway to the Icelandic town of Grindavík is now impassable, and the surrounding area is covered in lava for several kilometers.
#Iceland | @voyage
Iceland🇮🇸
🟠A canyon located in the Jokuldalur Valley, Iceland.
🟠It is famous for its columnar basalt formations and blue-green water.
#Iceland | @voyage
Iceland🇮🇸
🟠A canyon located in the Jokuldalur Valley, Iceland.
🟠It is famous for its columnar basalt formations and blue-green water.
#Iceland | @voyage
Iceland 🇮🇸
🟠After the eruption of Eldfell volcano on Heimaey Island, a stunning natural wonder emerged — a rock formation shaped like an elephant drinking from the Atlantic.
📏
📏
📏
📏
📏
📏
📏
📏
#Iceland | @voyage
⚡️Hallgrímskirkja – a majestic church in the heart of Reykjavík! ✨🏔️
🟠Inside, it houses a massive pipe organ with 5,275 pipes, standing 15 meters tall and weighing 25 tons – a true musical masterpiece!
📏
📏
📏
📏
📏
📏
📏
📏
#Iceland | @voyage
✨ Hallgrímskirkja — the highest point in Reykjavik.
🟠Imagine a majestic church rising above the city like a guardian of time. Its unique architecture and panoramic views of Reykjavik make it a must-visit place.
📏
📏
📏
📏
📏
📏
📏
📏
#Iceland🇮🇸@voyage