В 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
🚀 Iran's Ten-Point Plan Gains Consensus as Negotiation Framework
On April 10, Iran's Deputy Foreign Minister Ravanchi announced during a meeting with foreign diplomats and international organization representatives in Iran that a consensus has been reached to use Iran's ten-point plan as the basis for negotiations. According to BlockBeats, Ravanchi emphasized Iran's openness to diplomacy and dialogue but firmly rejected any discussions based on false information intended to deceive or pave the way for renewed military aggression against Iran.
#Iran#Diplomacy#Negotiation#InternationalRelations#ForeignPolicy
🚀 Dollar Faces Pressure Amid US-Iran Negotiation Reports
The dollar-and-oil buying trade is experiencing challenges as reports of negotiations between the United States and Iran surface. According to NS3.AI, the US Dollar Spot Index has decreased by approximately 1.4% this week, marking its largest weekly drop since January. This decline is attributed to shifts in foreign exchange trading, influenced by headlines surrounding the negotiations and a fragile ceasefire.
#Dollar#US#Iran#Negotiation#Forex#Oil#Ceasefire#CurrencyMarket
🚀 Trump Denounces Reports on Iran Negotiation Plan as False
U.S. President Donald Trump has criticized reports from The New York Times and CNN regarding a ten-point plan on Iran negotiations. According to Odaily, Trump labeled these reports as entirely fabricated and aimed at discrediting those involved in the peace process. He dismissed the points as fraudulent schemes and called the media outlets 'evil losers.' Trump concluded his statement with a call to 'Make America Great Again.'
#Trump#Iran#Negotiation#USPolitics#Media#FakeNews#PeaceProcess#MAGA
🚀 Trump Criticizes Iran's Media Tactics on Truth Social
U.S. President Donald Trump expressed his views on Iran's media strategies on April 11 via Truth Social. According to BlockBeats, Trump stated that Iranians are more adept at handling fake news media and public relations than engaging in warfare. He remarked that Iran seems unaware of its lack of leverage, aside from short-term 'extortion' through international waterways. Trump concluded that Iran's current existence is solely for negotiation purposes.
#Trump#Iran#MediaTactics#FakeNews#PublicRelations#Negotiation#TruthSocial#Extortion#InternationalWaterways