В 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
Drowsy driving causes 1 million crashes, 500,000 injuries, and 8,000 deaths each year in the U.S.
Just one sleepless night can impair performance as much as a blood-alcohol level of 0.10 percent, beyond the legal limit to drive.
Like alcohol, sleep deprivation also affects judgment, making it harder to assess how impaired you are when you're tired.
[Source]
@googlefactss
#sleep#zzzz#health
🚀 Overview of SBTI's 28 Personality Types
PANews posted on X (formerly Twitter) about the 28 distinct personality types identified by SBTI. These include the 'Controller' who excels in task management and situation handling, and the 'ATM-er' who invests time and emotional value. The 'Dior-s' represents a self-deprecating narrative under pressure, while the 'BOSS' is goal-oriented with strong organizational skills. The 'Thanker' leans towards positive feedback and gratitude, whereas the 'Oh-No' personality anticipates risks and negative outcomes. The 'GoGo' is action-driven, and the 'Sexy' emphasizes style and attraction. The 'Lover' is emotionally invested, and the 'Mum' is nurturing and concerned. The 'Fake' wears a social mask, and the 'OJBK' is conflict-averse. The 'Malo' resonates with the working class, while the 'Joker' uses humor to mask vulnerability. The 'WOC!' is highly reactive, and the 'Thinker' is analytical. The 'Shit' is cynical but often cleans up messes, while the 'ZZZZ' strategically disconnects. The 'Poor' is resource-conscious, and the 'Monk' is restrained and detached. The 'IMSB' is self-deprecating, and the 'Solo' is independent. The 'FUCK' is direct and rebellious, while the 'Dead' feels drained. The 'IMFW' has a low self-assessment, and the 'HHHH' finds humor first. The 'Drunk' is a hidden personality, and the 'Kanye' remains mysterious.
#SBTI#PersonalityTypes#Controller#ATM#Dior#BOSS#Thanker#OhNo#GoGo#Sexy#Lover#Mum#Fake#OJBK#Malo#Joker#WOC#Thinker#Shit#ZZZZ#Poor#Monk#IMSB#Solo#FUCK#Dead#IMFW#HHHH#Drunk#Kanye