В 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
🪐 One of the most extreme magnetic environments in the universe exists around the magnetar SGR 1806-20, whose magnetic field is over a quadrillion times stronger than Earth's. Such powerful magnetism can twist the surface of the magnetar, trigger bursts of energy that outshine entire galaxies for a moment, and bend the very fabric of space nearby—making magnetars like SGR 1806-20 true cosmic powerhouses. ✨
#magnetars⚡#neutronstars⚡#extremes⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The magnetar XTE J1810–197, located about 10,000 light-years from Earth, possesses a magnetic field more than 100 trillion times stronger than Earth's, making it one of the most powerful magnets in the universe. Such extreme magnetic forces can dramatically twist the star's crust, unleashing bursts of X-rays and radio waves that briefly transform XTE J1810–197 into a cosmic beacon visible across our galaxy. ✨
#magnetars⚡#neutronstars⚡#xray⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 The magnetar CXOU J164710.2–455216, found in the star cluster Westerlund 1, possesses an extreme magnetic field estimated at nearly 3 quadrillion times stronger than Earth's. Such powerful magnetism can not only fracture the star's crust but also alter physical laws around it, making magnetars like CXOU J164710.2–455216 some of the most intense and unpredictable objects known in the cosmos. ✨
#magnetars⚡#neutronstars⚡#magnetism⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In 2020, astronomers traced a fast radio burst called FRB 200428 to our own Milky Way and found it came from a magnetar named SGR 1935+2154. This was the first time a fast radio burst—a super-short flash of radio energy from space—was directly linked to a known type of object, showing that magnetars, which are neutron stars with extremely strong magnetic fields, can produce these intense cosmic signals. ✨
#fastbursts⚡#magnetars⚡#milkyway⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 The magnetar Swift J1818.0−1607, discovered in 2020, has one of the fastest spins ever seen—rotating once every 1.36 seconds—and its magnetic field is up to a thousand trillion times stronger than a regular fridge magnet. Magnetars like Swift J1818.0−1607 are rare neutron stars with magnetic forces so intense they can reshape atoms and trigger sudden bursts of high-energy X-rays and gamma rays, making them some of the most extreme objects in the Milky Way. ✨
#magnetars⚡#neutronstars⚡#extrememagnetism⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 Near the center of the Small Magellanic Cloud, scientists have discovered a magnetar called SXP 1062 with a magnetic field so strong it can reshape atoms and trigger intense X-ray outbursts. Magnetars are a rare kind of neutron star—ultra-dense remnants of exploded massive stars—whose magnetic fields are trillions of times stronger than Earth's and can even change the properties of empty space around them, making these cosmic magnets among the universe's most extreme phenomena. ✨
#magnetars⚡#neutronstars⚡#spacefacts⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The magnetar SGR 1900+14, located about 20,000 light-years away in the constellation Aquila, holds one of the strongest magnetic fields ever measured—over 100 trillion times stronger than Earth's. When its magnetic field twists and snaps, SGR 1900+14 unleashes enormous flares of X-rays and gamma rays that can briefly outshine every other X-ray source in our galaxy. ✨
#magnetars⚡#neutronstars⚡#extrememagnetism⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 At the heart of the supernova remnant Kes 73 lies the magnetar 1E 1841-045, which boasts a magnetic field over a thousand trillion times stronger than Earth's. These extreme fields can twist and shatter the crust of the neutron star—an object so dense that a sugar-cube-sized piece would outweigh Mount Everest—releasing bursts of powerful X-rays and gamma rays that briefly light up its cosmic neighborhood. ✨
#magnetars⚡#neutronstars⚡#xraybursts⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The magnetar SGR 1935+2154, found in the constellation Vulpecula, is famous for combining an ultra-strong magnetic field—over a quadrillion times stronger than Earth's—with sudden bursts of energy known as fast radio bursts. Magnetars like SGR 1935+2154 pack so much magnetic power that their fields can twist and snap the star’s surface, unleashing flares that can light up the galaxy for a brief moment. ✨
#magnetars⚡#neutronstars⚡#extremestars⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The magnetar SGR 0501+4516, discovered in the constellation Perseus, has a magnetic field estimated to be more than 10 trillion times stronger than Earth's. This incredible power makes the area around it so extreme that atoms themselves can be stretched into unusual shapes, showing how magnetars are some of the most intense and mysterious objects in our universe. ✨
#magnetars⚡#neutronstars⚡#extremestars⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In the heart of the Milky Way, the magnetar Swift J1818.0−1607 was discovered in 2020 and boasts a magnetic field over a quadrillion (1,000,000,000,000,000) times stronger than Earth's. This incredible power can twist and crack the surface of the magnetar, triggering sudden explosions of X-rays and gamma rays that ripple through space—making magnetars some of the most extreme and mysterious stars known. ✨
#magnetars⚡#neutronstars⚡#extremespace⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 The magnetar 1E 1048.1–5937 is famous for its mind-bending magnetic field—over 100 trillion times stronger than Earth's. These extreme magnetars can twist and snap their crusts, releasing bursts of X-rays and gamma rays so powerful they briefly outshine every other X-ray source in the galaxy when they erupt. ✨
#magnetars⚡#neutronstars⚡#xraybursts⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries