В 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
🪐 Scientists studying the future of interstellar travel are exploring how hydrogen harvested from interstellar space—called "ramjet" propulsion—could one day fuel journeys to stars like Alpha Centauri, located over 4 light-years from Earth. A concept known as the Bussard Ramjet proposes using a huge electromagnetic field to collect hydrogen atoms as a spaceship speeds through space, fusing them for energy in the same way stars do, potentially enabling continuous acceleration across vast cosmic distances. ✨
#spaceships⚡#technology⚡#AlphaCentauri⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In the double star system Alpha Centauri, light from one star to the other takes over 20 hours to cross the distance—showing that even within a “nearby” solar system, the speed of light sets a hard limit for communication and travel. This demonstrates how vast even the smallest cosmic neighborhoods really are, as light’s top speed of 299,792 kilometers per second still can't make interstellar distances feel quick. ✨
#speedoflight⚡#alphacentauri⚡#spacedistances⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 Traveling to other stars is one of humanity’s greatest challenges, as even the nearest star system, Alpha Centauri, is over 4 light-years away—about 40 trillion kilometers! Current spacecraft, like Voyager 1, are only just leaving our solar system after more than 45 years, showing that interstellar travel will require new technologies, possibly using powerful methods such as nuclear propulsion or solar sails—giant, ultra-thin mirrors that ride the pressure of sunlight across space. ✨
#interstellar⚡#travel⚡#technology⚡#AlphaCentauri⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 The Breakthrough Starshot project is testing how ultra-light spacecraft powered by laser-driven lightsails could one day reach Alpha Centauri, our nearest star system, in just a few decades. These tiny probes, traveling at a fraction of the speed of light (over 100 million kilometers per hour), would gather data from planets like Proxima Centauri b, showing how future interstellar journeys might become possible using cutting-edge technology and real astronomical targets. ✨
#interstellar⚡#travel⚡#AlphaCentauri⚡#lightsail⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 Scientists testing the future of interstellar travel are examining how giant particle accelerators in space could launch tiny probes to neighboring star systems like Alpha Centauri. By using electromagnetic fields to give miniature spacecraft a massive boost, this method could send probes racing out of the solar system much faster than traditional rockets, all powered by technologies already proven in facilities like CERN's Large Hadron Collider on Earth. ✨
#interstellar⚡#travel⚡#AlphaCentauri⚡#particleaccelerators⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels