В 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
— A historic place without which Russia is impossible to imagine. In the frame: the Solovetsky Islands at sunset. 🌅
In 1429, the monks Savvatiy and German founded the first settlement here, and later St. Zosima established the monastery. The cloister grew into the largest spiritual, cultural, and economic center of the Russian North.
The monastery also served as a powerful fortress, repelling attacks by the Swedes and the English. At the same time, Solovki became a place of exile for state and church opponents — Decembrists and other prisoners were held here.
After the monastery was closed in 1920, the Solovetsky Special Purpose Camp (SLON) was established on the islands — the first and largest forced-labor camp in the USSR.
Monastic life returned in 1990. In 1992, the historical and cultural ensemble of the Solovetsky Islands was added to the UNESCO World Heritage List. Today, it is both an active men’s monastery and Russia’s largest museum-reserve. 🏛️
Photo: Elena Guseva
📍Coordinates: Yandex Maps
#ArkhangelskRegion
🏙️Beyond Moscow🏔️
— Small, ancient, and incredibly cozy — Oshevensk. Fading old Russia amid breathtaking northern nature!
Oshevensk isn’t just a single point on the map — it’s a cluster of villages: Bolshoy Khaluy,Shiryayikha, and Niz.
Every log house here is gigantic, more like a fortress than a home.
They were built so that an entire ecosystem could live under one roof — including livestock. These massive houses are believed to be the result of the absence of serfdom in the North. When peasants earned money, they didn’t have to be modest.
Lately, Oshevensk has been attracting artists, architects, and designers who are restoring the old houses. This is a wonderful trend — and one we wholeheartedly support!
Photo: @remote_russia
📍Coordinates: Yandex Maps
#ArkhangelskRegion
🏙️Beyond Moscow🏔️
Дело в том, что территория парка - это единственный путь с автобусных остановок к жилым домам, рядом расположена 95 школа, меньше чем через неделю начнется новый учебный год, отсутствие освещения небезопасно для жителей. Люди вынуждены ходить с фонариками, и это в 21 веке в новом благоустроенном парке в центре субъекта!🔦
Направила соответствующие обращения в Администрацию Архангельска для решения вопроса с подключением освещения в парке как можно скорее!
#архангельскаяобласть#ldpr_arkhangelsk#лдпр#arkhangelsk#arkhangelskregion#arkhangelsk_ldpr_29#лдпр29#архангельск#АрхангельскаяГорДума#депутатыЛДПР#депутатАЦС_лдпр_9#МарияХарченко#МайскаяГорка