В 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 all-new Honda Ye S7 electric crossover! 🌿
🔋 Two-motor powertrain: 476 hp total power. Front wheels driven by a 204-hp electric motor, while the rear wheels by a 272-hp motor.
🏞️ Built on the e:N Architecture W platform with independent suspension, this 4.7-meter crossover promises a smooth ride.
🔌 Co-developed with Dongfeng, the Ye S7 is set to redefine the electric SUV experience.⚡️
#HondaYeS7#ElectricCrossover#Innovation#Auto
🌟🚗 Introducing the Genesis GV90! 🚗🌟
Get ready for the flagship electric crossover from Genesis, set to debut this October! 🎉✨ Built on the innovative eM platform, an evolution of the E-GMP architecture, the GV90 promises an impressive 113 kWh battery that offers a remarkable range of up to 800 km!🔋🌍
With its luxurious design and advanced features, the GV90 will compete with premium full-size SUVs like the Range Rover. 🏞️👑🚀
#GenesisGV90#ElectricCrossover#LuxurySUV#eMPlatform#Auto🌐🔋✨
🚘✨Introducing the Skoda Elroq Electric Crossover!✨🚘
The new Skoda Elroq is slightly larger than the Karoq, measuring 4488x1884x1625 mm with a wheelbase of 2765 mm. With a ground clearance of 186 mm, it’s ready for any adventure! 🌍💪
⚡️Performance Features:
- Available with electric motors producing 170, 204, or 286 hp.
- The top all-wheel-drive version boasts an impressive 299 hp! 🚀
- Range: From 375 to 560 km on a single charge! 🔋🌿
✅Simply Clever Innovations:
- Tire tread depth gauge integrated into the ice scraper! ❄️
- Elastic net under the luggage shelf for convenient charging cable storage! 📦🔌
ℹ️ The petrol Karoq starts at €33,100 in Germany, while the Elroq will be just €760 more! 💰🇩🇪
#SkodaElroq#ElectricCrossover#SimplyClever#SustainableDriving#CarLaunch#Auto#Innovation#Skoda