В 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
Audi has officially unveiled the new generation A6!
Now, this index belongs to electric vehicles — a liftback and an estate version.
🚘 The exterior of the new models is almost entirely copied from the namesake concepts, while the interior is inspired by the Q6 e-tron crossover.
🚢 The base version will be the rear-wheel drive A6 e-tron performance with a single motor producing 367 hp. For the S6, there will be two motors delivering 550 hp and accelerating from 0 to 100 km/h in just 3.9 seconds, with a top speed of 240 km/h.
🔋 In both cases, a 100 kWh battery is provided, allowing the single-motor versions to travel up to 756 km, while the all-wheel drive versions can reach up to 675 km.
ℹ️ Pre-orders will start in September, with prices starting at €75,600 for the standard version and €99,500 for the S6.
#Audi#A6#ElectricVehicles#ETRON#CarLaunch#LuxuryCars#Innovation#S6#Auto
🚗✨Introducing the Audi Q6 e-tron Sportback!✨🚗
The sleek new Sportback version features a more aerodynamic design, reducing the drag coefficient from 0.28 to 0.26! 🌬️ This enhancement boosts the range to an impressive 656 km on a single charge! 🔋💨
🔧Powertrain Options:
• Rear-wheel drive versions come with a single electric motor delivering 252 or 306 hp paired with 83 or 100 kWh batteries. ⚡️
• The all-wheel drive variant boasts 387 hp, accelerating from 0 to 100 km/h in just 5.9 seconds! 🚀
• The top-tier SQ6 Sportback e-tron unleashes an incredible 489 hp, hitting 100 km/h in only 4.3 seconds! 🏁🔥
🏭 Production is set at the Ingolstadt plant, with prices starting at €65,900 and going up to €96,200. 💰
#AudiQ6#eTron#Sportback#ElectricVehicle#EV#SustainableDriving#LuxuryCars#Innovation#AudiFamily#Auto🚘🌍