В 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 world's longest straight-line journey between two points using only latitude and longitude runs over 13,589 km from Liberia on Africa’s coast to eastern China, crossing no ocean. ✨
#coordinates⚡#distance⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🪐 The galaxy JADES-GS-z14-0, discovered in 2023 with the James Webb Space Telescope, is one of the farthest objects ever seen—its light has traveled for about 13.5 billion years to reach Earth. Observing JADES-GS-z14-0 lets astronomers look back to when the universe was less than 300 million years old, offering a rare glimpse into the early stages of galaxy formation just after the Big Bang. ✨
#galaxies⚡#distance⚡#universe⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The James Webb Space Telescope has spotted galaxy JD1 (also known as MACS0647-JD1), whose light began its journey over 13.3 billion years ago—when the universe was only about 4% of its current age. Observing JD1 allows scientists to study what galaxies looked like close to the cosmic dawn, revealing the structure of the universe in its earliest moments. ✨
#galaxies⚡#distance⚡#universe⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The galaxy CEERS-93316, discovered by the James Webb Space Telescope, is one of the most distant galaxies ever observed—its light began traveling toward us more than 13.4 billion years ago. Seeing CEERS-93316 means we are looking back in time to when the universe was less than 300 million years old, just a tiny fraction of its current age, revealing the earliest stages of galaxy formation after the Big Bang. ✨
#galaxies⚡#distance⚡#universe⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The galaxy named Earendel’s host, WHL0137-LS, contains the most distant single star ever detected—a star nicknamed Earendel whose light has taken about 12.9 billion years to reach Earth. Thanks to a powerful gravitational lens (a natural "magnifying glass" formed by another galaxy cluster), the Hubble Space Telescope was able to spot Earendel, offering a rare view of a lone star shining when the universe was less than a billion years old. ✨
#universe⚡#distance⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The galaxy ZF-COSMOS-20115, located more than 12 billion light-years from Earth, surprised astronomers by being "dead"—no longer forming new stars—when the universe was just 1.7 billion years old. Studying such distant, quenched galaxies helps scientists understand how some of the earliest cosmic structures formed and evolved in the young universe, illuminating the extreme environments at the farthest reaches of space and time. ✨
#galaxies⚡#distance⚡#universe⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The galaxy Maisie’s Galaxy (CEERS-93316), discovered by the James Webb Space Telescope, is one of the most distant objects ever observed, with its light traveling for about 13.4 billion years to reach Earth. We're seeing Maisie’s Galaxy as it existed just a few hundred million years after the Big Bang, providing a rare glimpse into the universe's earliest moments when the first galaxies were assembling and stars began to shine. ✨
#universe⚡#distance⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🌍 The world’s longest scheduled nonstop passenger flight connects New York and Singapore, covering about 15,300 kilometers in nearly 19 hours—highlighting advances in global air transport geography. ✨
#aviation⚡#distance⚡#networks⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🪐 The galaxy HD1, discovered in 2022, may be the most distant known object in the universe—its light has traveled more than 13.5 billion years to reach us. Observing HD1 gives astronomers a rare window into the universe just 300 million years after the Big Bang, offering clues to how the earliest galaxies and stars began to form in the cosmic dawn. ✨
#galaxies⚡#distance⚡#earlyuniverse⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 The James Webb Space Telescope has observed the galaxy JADES-GS-z7-01-QU, one of the most distant “quiescent” galaxies ever found, meaning it has stopped making new stars even though its light began traveling to us over 13 billion years ago. Seeing JADES-GS-z7-01-QU lets scientists study how some galaxies aged and shut down astonishingly early, offering a rare glimpse into the universe’s remote past when cosmic structures were just beginning to take shape. ✨
#galaxies⚡#distance⚡#telescopes⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels