В 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
🌟🚗Introducing the Pininfarina B95 Gotham!🦇✨
Inspired by the legendary hero Bruce Wayne, this hypercar is designed for those who dare to push the limits! 💪🔥
Featuring the iconic Wayne Enterprises logos, the B95 Gotham showcases a stunning design that embodies the spirit of Gotham City. 🏙️🖤 On the driver's door, you’ll find the powerful quote: "All men have limits... I ignore mine." — a true testament to the Dark Knight’s relentless pursuit of excellence. 🗣️💬
The car's displays come alive with custom graphics, and even the virtual assistant speaks in the voice of Alfred Pennyworth, bringing a touch of elegance and sophistication to your driving experience. 🎩🤖
And this isn’t just a show car! A limited number of these masterpieces will be produced by order. Don’t miss your chance to own a piece of superhero history! 🌌🚀
#Pininfarina#B95Gotham#BruceWayne#Hypercar#Auto🖤🔧
🚗✨ Introducing the Unique Pininfarina Battista Targamerica! 🌟
Pininfarina has unveiled a stunning roadster, the Battista Targamerica, crafted for a special client who already owns the Battista coupe. This exclusive model features a sleek convertible design with a refined rear end. 🌈🛠️
One of the standout elements of the interior is a bespoke cigar holder and humidor, specially made for this one-of-a-kind vehicle. The custom aluminum and glass case can hold up to three cigars, adding a touch of luxury to every drive. 💨💼💨
Under the hood, the Battista Targamerica boasts the same incredible four-motor powertrain as the Rimac Nevera, delivering a jaw-dropping 1900 horsepower!⚡️💥 It accelerates from 0 to 60 mph in under 2 seconds!🚀🔥
This masterpiece is not just a car; it's an experience!
#Pininfarina#BattistaTargamerica#LuxuryCars#Roadster#CustomDesign#CigarLovers#ElectricSupercar#Performance#Auto🚗💖