В 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
Mientras el mundo se moviliza por Palestina y tratar de desbloquear Gaza, EE.UU. aprovecha de atacar a Irán con impunidad.
Así negocia EE.UU.
Qué alivio saber que Donald Trump sigue comprometido con "la diplomacia"... a su manera. No hay mejor Acuerdo de Paz que advertirle a un país entero que será reducido a cenizas.
#iran
#gaza
#gazaunderattack
#breakthesiege
#usdiplomacy
#diplomacy
🚀 U.S. Vice President Vance Heads to Islamabad for U.S.-Iran Talks
U.S. Vice President Vance has departed for Islamabad, Pakistan, aboard Air Force Two to participate in negotiations between the United States and Iran. According to BlockBeats, accompanying him are U.S. Special Envoy for Middle East Affairs, Whitaker, and U.S. President Donald Trump's son-in-law, Kushner.
Before boarding, Vance expressed optimism about the upcoming talks with Iran, stating that he anticipates positive discussions in Islamabad. He emphasized that if Iran approaches the negotiations with sincerity, the United States will remain open-minded. However, he cautioned Iran against attempting to 'play games with the United States.' Vance noted that U.S. President Donald Trump has provided 'quite clear guidelines' for the negotiations.
#USVicePresident#Vance#Islamabad#USIranTalks#MiddleEastAffairs#Kushner#DonaldTrump#USDiplomacy#IranNegotiations
🚀 Israel-Hezbollah Conflict Complicates U.S.-Iran Relations
The ongoing conflict between Israel and the Iran-backed Lebanese militia Hezbollah is adding complexity to the United States' efforts to resolve its longstanding tensions with Iran. Bloomberg posted on X, highlighting the intricate geopolitical dynamics at play.
The hostilities between Israel and Hezbollah have intensified, with both sides engaging in military actions that threaten to escalate further. This situation is complicating U.S. diplomatic strategies aimed at de-escalating tensions with Iran, as Hezbollah's actions are closely linked to Iranian interests in the region.
The U.S. has been attempting to negotiate with Iran to address various issues, including nuclear capabilities and regional influence. However, the involvement of Hezbollah, a significant player in the Middle East conflict, poses challenges to these diplomatic efforts.
As the situation unfolds, the international community is closely monitoring developments, with concerns about potential broader implications for regional stability. The U.S. continues to navigate these complex relationships, seeking a resolution that addresses both its strategic interests and the security concerns of its allies in the region.
#Israel#Hezbollah#USIranRelations#MiddleEastConflict#Geopolitics#USDiplomacy#Iran#Lebanon#RegionalStability#NuclearNegotiations#MilitaryEscalation#InternationalRelations