В 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
🌎 An ancient mystery lingers at the center of our galaxy—a supermassive black hole called Sagittarius A*. Its powerful gravity bends space and time, hiding beyond a swirling cloud of stars and gas. This invisible giant shapes the Milky Way, anchoring everything around it with immense, unseen force. ✨
#space⚡#blackhole⚡#universe
👉subscribe Interesting Planet
🌎 In 2020, astronomers detected a mysterious object named “The Cow,” a fast and extremely bright stellar explosion. Unlike normal supernovas, “The Cow” rapidly peaked in brightness, confounding scientists. Follow-up observations revealed it was likely the birth of a black hole or neutron star—providing a rare view of a star’s collapse in real time. ✨
#astronomy⚡#supernova⚡#blackhole
👉subscribe Interesting Planet
👉more Channels
BlackHole
Music Player made with Flutter
Features
Best Streaming Quality (320kbps)
Music Search
Trending Songs
Support 15+ music languages
Local and Global Top Spotify songs
Add Songs to Favorite
Playlists support
Import Playlists from Spotify
Sleep timer
Lyrics Support
Listening history record
Dark mode / accent color
Download for offline play (320kbps with ID3 tags)
Play Online as well as Offline Songs
Queue Management
Auto Update Check
Cache support
No Subscription
No Ads
More to come...
Download https://github.com/Sangwan5688/BlackHole/releases
Channel @blackhole_channel
Group https://t.me/joinchat/fHDC1AWnOhw0ZmI9
#BlackHole#Music#Player
🌎 At the center of our Milky Way galaxy lies Sagittarius A*, a supermassive black hole around 4 million times the mass of the Sun. It exerts a powerful gravitational pull, causing nearby stars to orbit at incredible speeds—some over 5,000 kilometers per second. ✨
#astronomy⚡#blackhole⚡#galaxy
👉subscribe Interesting Planet
👉more Channels
🪐 The galaxy NGC 1277 in the Perseus constellation harbors an ultramassive black hole that makes up a staggering 14% of its entire mass—a proportion far greater than in any typical galaxy. This enigmatic black hole has puzzled scientists, as such a gigantic ratio defies cosmic norms and hints at a forgotten chapter in the history of galactic evolution. ✨
#galaxies⚡#blackhole⚡#mystery
👉subscribe Universe Mysteries
🪐 The dusty core of the elliptical galaxy Centaurus A (NGC 5128) hides a colossal jet of high-energy particles, launched from a supermassive black hole and stretching over 1 million light-years into intergalactic space. X-ray and radio images reveal this jet carving through the surrounding gas, shaping the galaxy’s strange appearance and fueling vast lobes that glow in the cosmic void. ✨
#CentaurusA⚡#blackhole⚡#galaxy
👉subscribe Universe Mysteries
🪐 In the galaxy SDSS J135154.46+132719.1, astronomers have observed a striking phenomenon: a supermassive black hole that was caught being "kicked" out of its galaxy at nearly 7.5 million kilometers per hour. This cosmic eviction is thought to be caused by the merged black holes’ gravitational waves pushing the giant object away—an extreme event where the very heart of a galaxy is flung into intergalactic space. ✨
#phenomena⚡#galaxy⚡#blackhole⚡#nasa⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🌎 Deep within the constellation Cygnus, the black hole V404 Cygni occasionally unleashes powerful outbursts, ejecting matter at near light-speed in opposing jets. These rare events are so energetic that the black hole briefly outshines its entire host galaxy, offering a fleeting glimpse into the turbulent ballet around stellar remnants. ✨
#blackhole⚡#cygnus⚡#jets
👉subscribe Universe Mysteries
🪐 In the Perseus Cluster, a supermassive black hole at the center of the galaxy NGC 1275 sends out powerful sound waves that ripple through the surrounding gas. These cosmic vibrations have wavelengths so vast—spanning around 30,000 light-years—that they produce the deepest note ever detected, 57 octaves below middle C, making it a real, albeit inaudible, “song” of the universe. ✨
#PerseusCluster⚡#blackhole⚡#astronomy⚡#nasa⚡#galaxy⚡#stars⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries