В 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
🪐 The faint spiral galaxy NGC 6946, also called the "Fireworks Galaxy," has hosted ten recorded supernovae in the past century—more than any other galaxy of its size. Its dazzling history of stellar explosions illuminates clouds of gas and dust, revealing fresh bursts of star formation and the ongoing cycle of cosmic destruction and rebirth. ✨
#supernovae⚡#galaxies⚡#NGC6946
👉subscribe Universe Mysteries
🪐 In 1604, astronomers across Europe and Asia witnessed a bright new "star" in the night sky—later known as Kepler’s Supernova (SN 1604)—which marked the last supernova recorded in our own Milky Way. This stellar explosion outshone every other star for weeks and left behind a glowing cloud of gas, offering an early glimpse into how supernovae produce and scatter the elements that help create planets and life throughout the galaxy. ✨
#supernovae⚡#MilkyWay⚡#astronomy⚡#nasa⚡#galaxy⚡#stars⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In the galaxy ESO 184-G82, astronomers observed GRB 980425—a gamma-ray burst that was directly linked to a supernova explosion called SN 1998bw. Gamma-ray bursts are intense flashes of the highest-energy light in the universe, and the connection in ESO 184-G82 revealed that some of these powerful bursts are caused when massive stars end their lives in energetic supernovae, giving scientists a rare glimpse into how the most violent stellar deaths can unleash extraordinary cosmic fireworks. ✨
#gamma-ray-bursts ⚡#supernovae⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In the spiral galaxy NGC 4013, astronomers have observed enormous "vertical structures" of dust and gas rising thousands of light-years above the galaxy's thin disk. These strange, tower-like wisps are thought to result from powerful supernova explosions and intense star formation activity, shaping the galaxy's appearance in a way rarely seen elsewhere in the cosmos. ✨
#galaxies⚡#supernovae⚡#phenomena⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In 2012, astronomers using the Hubble Space Telescope discovered a supernova named SN Primo in the distant galaxy SXDS-1069, whose light traveled over 9 billion years to reach Earth. This explosion offers a view into the universe’s youth, revealing that supernovae have been enriching galaxies with heavy elements like iron and oxygen since the cosmos was less than half its current age—a process crucial for forming new stars and planets. ✨
#supernovae⚡#hubble⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In the spiral galaxy NGC 2525, a supernova explosion imaged by the Hubble Space Telescope in 2018 briefly outshone all the other stars in its galaxy combined. Supernovae are the final, colossal explosions of massive stars, releasing enough energy in just weeks to equal the total output of our Sun over billions of years, and leaving behind exotic remnants like neutron stars or black holes. ✨
#supernovae⚡#galaxies⚡#hubble⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 In the galaxy ARP 299, astronomers have witnessed a truly strange cosmic phenomenon: two galaxies colliding and triggering a burst of more than a hundred supernova explosions in a single region. This dramatic event releases vast amounts of energy and creates a glowing cloud of hot gas, showing how cosmic crashes can transform entire regions of space in a dazzling display of stellar death and rebirth. ✨
#supernovae⚡#collisions⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 Supernova SN 2016gkg, discovered in the galaxy NGC 613, gave astronomers their first direct images of a star just hours before it exploded. By comparing "before and after" photos, scientists identified the doomed star—a yellow supergiant about 20 times the mass of our Sun—providing crucial evidence for how massive stars end their lives and offering a rare look at the final moments before a cosmic blast. ✨
#supernovae⚡#ngc613⚡#astronomy⚡#nasa⚡#galaxy⚡#stars⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In 2017, astronomers observed supernova SN 2016aps in the galaxy PGC 067159, a record-breaker for being one of the most energetic stellar explosions ever seen. This supernova, likely the result of two massive stars merging before detonating, released more than twice the energy of a typical supernova, offering clues to how giant stars live and die in the universe’s most powerful blasts. ✨
#supernovae⚡#galaxies⚡#explosions⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The star LP 40-365, located about 2,000 light-years away in the constellation Ursa Major, is one of the fastest moving stars ever discovered, racing through the Milky Way at nearly 850 kilometers per second. Scientists believe it's a "partly burnt" remnant of a white dwarf that survived a supernova explosion—making it a cosmic refugee, ejected at high speed with a strange chemical makeup unlike any normal star. ✨
#unusualstars⚡#supernovae⚡#milkyway⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 In 2022, astronomers observed the star SN 2022ann in the galaxy NGC 4647 undergoing a rare "Type IIb" supernova explosion—a dramatic event where a massive star loses most of its outer hydrogen before collapsing. This type of supernova helps scientists trace how different stellar deaths enrich galaxies with new elements and can even lead to the birth of neutron stars or black holes. ✨
#supernovae⚡#galaxies⚡#nucleosynthesis⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In 2023, astronomers observed a rare type of supernova explosion in the galaxy NGC 4995, located about 59 million light-years away. Classified as a Type Iax supernova, this unusual blast is thought to be a "partial" explosion where the white dwarf star survives the event—unlike normal supernovae, which completely destroy their stars—offering new insight into the variety of stellar deaths in the cosmos. ✨
#supernovae⚡#ngc4995⚡#stardeath⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels