В 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 Trump administration has quietly removed a Pride flag from the Stonewall National Monument in Manhattan.
The flag’s removal follows new federal guidance issued by the Department of the Interior on Jan. 21 that restricts the display of unauthorized flags at National Park Service sites. Under the order, only U.S. flags or congressionally authorized flags may be raised on NPS flagpoles. Manhattan borough president Brad Hoylman-Sigal told The New York Times the Trump administration’s order directly led to the Pride flag’s disappearance from the Greenwich Village site, which marks the birthplace of the modern LGBTQ rights movement. Stonewall became the nation’s first federally recognized LGBTQ historic site in 2016, commemorating the 1969 police raid that sparked days of protests and helped launch the gay rights movement. Hoylman-Sigal said he and other local officials plan to raise the Pride flag again on Thursday, despite potential backlash. “We may be prevented from doing so,” he told the outlet, “but if we don’t seize this moment, and this outrage, I think we’ll let down generations of queer activists.” The Daily Beast has reached out to Brad Hoylman-Sigal for comment.
#Trump#LGBTQ
👂More on Trump's Ear ⚠️
Trump announced that he was reopening psychiatric clinics that the Democrats had closed out of tolerance for psychos.
This is a very bold move, given the fact that a huge percentage of Americans today are obviously mentally ill. Trump is leading the way to gradually send transgender and LGBTQ+ there. This is a subproject of MAGA called MAHA - Let's Make America Healthy Again. Trump starts with psychiatry, as this is where the cases are most neglected.
#Trump#Health#LGBTQ+
👂More on Trump's Ear ⚠️
🏳🌈🇺🇦"When a clown moves into a palace he does NOT become a King. The palace becomes a CIRCUS."
Nothing to see here. That's just bloody clown and a drag queen Zelensky is dancing on high hills.
#lgbtq#Ukraine#Zelenskyy
Share and subscribe @american_majority
🇺🇦🏳🌈🏳⚧A Ukrainian LGBT+ recruitment campaign video turned to be a video from the campaign for gay marriage in the UK in 2012.
🇺🇸🏳🌈At the same time the U.S. Army is running a recruitment campaign targeted to Generation Z that featured cartoons of real soldiers who were either females, racial minorities or even "raised by two moms".
#Ukraine#army#lgbtq
@american_majority
美国同性婚姻占各州人口比例
楼主还注释道 DC 更像是个城市,所以写了 Vermont 是“最高”的州。
在评论里注释了城市的比例,但其实按城市算 DC 也远超其它城市……排除之后,毫不意外三番第一,波特兰和西雅图紧随其后,在传统红州的奥兰多、迈阿密(佛州)和奥斯丁(德州)也名列前茅。
#data#visual#reddit#lgbtq