В 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
🪐 Some of the most unusual stars in the universe are "blue stragglers," like those found in the globular cluster M30. Blue stragglers appear younger and hotter than neighboring stars in their ancient cluster, likely because they formed when two stars merged or stole material from a companion—making them stand out as apparent "youngsters" among a population of stellar elders. ✨
#stars⚡#mergers⚡#clusters⚡#nasa⚡#galaxy⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The galaxy cluster Abell 2142, located over 1 billion light-years away, is home to one of the largest shock waves ever spotted in the universe—a cosmic "sound wave" stretching millions of light-years through intergalactic gas. This shock wave, observed in X-ray light, is created as entire clusters of galaxies collide and merge, causing hot gas to ripple and heat up on truly enormous scales. ✨
#phenomena⚡#galaxies⚡#clusters⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The James Webb Space Telescope has detected the earliest-known galaxy cluster, named "El Gordo," not as it appears today but as it looked over 10 billion years ago, still forming in the young universe. Webb’s powerful infrared vision allowed astronomers to spot dozens of galaxies caught in the act of merging, giving us a rare glimpse into how the first massive clusters assembled from smaller groups billions of years before our Milky Way even existed. ✨
#galaxies⚡#clusters⚡#webb⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In the southern constellation Norma, the galaxy cluster Abell 3627 glows with "radio relics"—giant arcs of radio emission stretching millions of light-years across space. These relics are formed by shock waves traveling through the cluster’s hot gas, energizing particles to near-light speeds, and producing mysterious, ghostly signals that light up the cosmic web between galaxies. ✨
#phenomena⚡#clusters⚡#radio⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 In 2011, researchers using the Chandra X-ray Observatory observed the galaxy cluster Abell 2029, where the massive central galaxy produces a ripple in the hot gas around it—a direct result of gravitational space-time distortion. The giant mass of the galaxy and its dark matter bends and stretches space, allowing astronomers to map how real, invisible warps affect the X-rays we detect, turning clusters like Abell 2029 into natural laboratories for exploring the true shape of space itself. ✨
#wormholes⚡#spacetime⚡#clusters⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In the galaxy cluster Abell 1689, astronomers have observed light from distant galaxies being bent and stretched in strange ways—a real effect called "gravitational lensing." This phenomenon is caused when a huge mass, like the dense collection of galaxies in Abell 1689, distorts space-time itself—warping the paths of light and creating the illusion of arcs, rings, or even multiple images of the same object in the sky. ✨
#spacetime⚡#lensing⚡#clusters⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 Located in the constellation Centaurus, the galaxy NGC 4696 is surrounded by ghostly, thread-like filaments of cool gas that twist and loop for tens of thousands of light-years. These strange structures glow softly as they snake through the much hotter, X-ray-bright plasma of the galaxy cluster core, and scientists believe they are shaped by magnetic fields and slow, turbulent flows—creating some of the most fantastical patterns seen in the cosmos. ✨
#phenomena⚡#filaments⚡#clusters⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In the galaxy cluster Abell 2142, astronomers have observed gigantic, invisible boundaries called "cold fronts"—enormous walls of gas as hot as tens of millions of degrees, yet sharply separated from even hotter regions. These fronts, stretching over hundreds of thousands of light-years, form as entire clusters of galaxies collide, creating strange, ripple-like patterns in the vast cosmic gas and revealing the hidden weather of the universe on unimaginable scales. ✨
#phenomena⚡#clusters⚡#gas⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries