В 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 word mortgage comes from Old French. What do the roots “mort” and “gage” literally mean?
Options:
A) ⚰️🤝 Death pledge
B) 🏡💸 Life loan
C) ⚰️📜 Death contract
D) 🔄💰 Endless debt
@languagetrivia#etymology
🥖Which word for a “friend” comes from Latin, where it literally meant “with bread”?
A) Acquaintance
B) Associate
C) Companion
D) Comrade
@languagetrivia#etymology
Which animal’s name means “river horse” in Greek?
🦏 Rhinoceros
🦒 Giraffe
🐬 Dolphin
🦛 Hippopotamus
🐘 Elephant
Did you get it right? Yes 😎 | No 🌚
@languagetrivia#etymology
🚢 In the 14th century, ships arriving from plague-affected areas had to wait offshore for 40 days before docking. This practice helped prevent the spread of disease.
👉 Can you guess what word comes from this 40-day period?
💡 Hint:Think of how you’d say “40” in Italian.
Press the button below to check if you got it right.
Did you think of the correct word? Yes 🤓 | No 👀
@languagetrivia#etymology
😳🇯🇵What does the word ‘emoji’ literally mean in Japanese?
A) Emotion icon 😃
B) Picture character 🖼
C) Smiley face 😊
D) Digital letter✉️
@languagetrivia#etymology
A Quick Update 📣
Hi everyone! I wanted to share something with you. To support the growth of this channel and help me keep bringing you fun and educational content, I’ll be placing some ads here from time to time.
I hope you understand—it’s a way for me to keep things running smoothly without asking for direct donations from you. Your support makes this community what it is, and I really appreciate it! 🙏
Thanks for sticking around and being part of this language-loving corner of the internet. Let’s keep learning together! ✨If you’d like to show your support, please tap the ❤️ reaction!
And while we’re talking about ads, here’s a question for you:
Which language does the word 'slogan' come from?
A) French 🇫🇷
B) Scottish Gaelic 🏴
C) Welsh 🏴
D) Latin🏛
Take the quiz below to find out
@languagetrivia#etymology
🧱The name “LEGO” comes from the Danish words “leg godt”. What does “leg godt” mean in English?
A) Build Strong
B) Play Well
C) Stack High
D) Create Together
Take the quiz below to find out
@languagetrivia#etymology
Which word is derived from the Latin term for ‘cow’?
a) Vaccine
b) Pasture
c) Dairy
d) Serum
Take the quiz below to see the explanation
@languagetrivia#etymology
What language does the word “amok,” as in “to run amok,” originate from?
A) Malay
B) Sanskrit
C) Swahili
D) Tagalog
Take the quiz below to find out
@languagetrivia#etymology
💴 What do the names of the currencies yen (Japan), won (South Korea), and yuan (China) mean?
A) Wealth or abundance
B) Circle or round
C) Gold or silver
D) Value or worth
Take the quiz below to find out
@languagetrivia#etymology
Which English word for a celestial body comes from the ancient Greek word meaning ‘wanderer’?
A) Planet
B) Star
C) Comet
D) Moon
Take the quiz below to find out
@languagetrivia#etymology