В 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
💨 Nothing on the road will scare you after this
🇸🇪 In Sweden, driving schools teach students how to handle a car in all kinds of tricky conditions.
🚗 And yes — passing a skid-control test is mandatory before they can even get their license.
#driving@Car_News
🚗🇺🇸1 IN 3 US PARENTS FEAR TEEN DRIVERS WILL CAUSE DEADLY CRASH
🔹 University of Michigan poll: 33% worry their young driver could cause accident — but 96% think their kid drives "average or better" 🤔📊
🔹 Half (51%) witnessed unsafe behavior: 44% saw aggressive driving, 25% caught texting while driving, 17% saw impaired/sleepy driving 😱🚨
🔹 Only 24% imposed consequences — most just take keys (6%), refuse car (8%), or threaten insurance cuts (6%) 🔑💳
🔹 Parents who saw road rage LESS likely to rate teen as bad driver — massive blind spot putting lives at risk 🙈💀
American teens NOT ready for the road. Where are the parents? 😬🛣️
#USNews#teensafety#driving
@america
J-j家j谱p- 家谱 The Family Tree (2011)
直达链接:https://pan.quark.cn/s/32c4d8126f28
#家谱#The Family Tree #Driving Lessons
链接:https://link3.cc/sf_com
#电影#喜剧#美国#10年代
🔥🏁Koenigsegg Regera Breaks Rimac Nevera's Record in 0-400-0 Challenge 🏁🔥
🏆 The music didn't play for long: Rimac Nevera's record in the 0-400-0 km/h acceleration-braking challenge lasted only a month. The Croatian hypercar surpassed the previous record holder, Koenigsegg Regera, clocking in at 29.94 seconds.
🇸🇪 The Swedish brand shrugged and sent the Regera back onto the track. Guess what? 28.81 seconds. How do you like that, Mate Rimac?
🥇 The margin of victory was 1.13 seconds, which in such a discipline, it must be said, is quite impressive. Surely, Rimac will have to respond. Competing is possible, but it will definitely require some effort.
🏎️Interestingly enough, the Regera has already been discontinued, with the last unit delivered to its owner in 2022. So why set a record with a car that is no longer in production? Koenigsegg answers bluntly: "Because it can!" The Regera remains superior to any newcomer. And it has proven it once again.
💥To outperform a significant rival - an electric car that has just set 23 records - is both impressive and beautiful. 💥
#Koenigsegg#Regera#driving#car