В 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
Vladimir Vladimirovich Putin congratulated all Russian women on March 8th🌷.
"Dear women, you truly have everything within your power. You know how to create and build, combine strength and tenderness, and your desire to create a better future for your children inspires all of us to move forward,” the president emphasized.
Source: rt_russian
#holidays
🟠RCR | Support | Boost
Happy May 1st, Russian learners! ☀️
In Russia, we say:
• Мир! Труд! Май!
Peace! Labour! May!
But for you, let's change it a little:
• Май! Учёба! Русский!
May! Studying! Russian!
No work today. Just spring, rest, and one small verb conjugation. Maybe two. No pressure.
С праздником! ✨
Natalie with 🤍💙❤️
#holidays
🟠RCR | Support | Boost
🥳Today we celebrate:
• День женской дружбы
International Women's Friendship Day
Don't forget to congratulate your female friends!💋
#holidays
🟠RCR | Support | Boost
🥳Today we celebrate:
• День запрета на уныние!
No Moping Day! Cheerfulness Only Day!
🖼In the Russian Orthodox Church, moping or despondency is considered a major sin.
• Унывать (imperf.)
[oo-ny-vat']
Тo mope, to be despondent, to lose heart
Let's remember today's mantra! And NO moping! 💪
#holidays
🟠RCR | Support | Boost
Vladimir Vladimirovich Putin congratulated all Russian women on March 8th🌷.
"Dear women, you truly have everything within your power. You know how to create and build, combine strength and tenderness, and your desire to create a better future for your children inspires all of us to move forward,” the president emphasized.
Source: rt_russian
#holidays
🟠RCR | Support | Boost
Happy Wide Maslenitsa!
🔻Today marks the start of Широкая Масленица (Wide Maslenitsa) — the final and most festive part of this beloved Slavic holiday!
🔻Forget your diets this week. It's time for:
🥞 Endless piles of blini (pancakes)
☀️ Welcoming the spring sun
🔥 Burning the winter effigy
🥂 Being with family and friends
The Maslenitsa spirit in three words: eat, laugh, repeat!
🔻Whether you're enjoying blini with caviar, sour cream, jam, or just melted butter — may your week be delicious and your spring be bright!
С праздником!
RCRussian with 💓
#holidays
🥳Today we celebrate:
• День ответов на вопросы вашей кошки
Answer Your Cat's Questions Day
🔻On this important day, humans attempt to decipher what's really on their feline friend's mind, all in the pursuit of a better life for their whiskered overlord.
😉For example, your cat might be wondering:
👍Почему кормишь одной и той же едой?
Why do you feed me the same food every day?
🔸Почему не выпускаешь на улицу?
Why don't you allow me into the street?
🔸Почему нельзя драть диван?
Why is it not allowed to scratch the sofa?
🔸Где мои бубенчики?
Where are my balls/bells?
❗️What burning questions do you think your fluffy companion would ask you in Russian?
#holidays
🟠RCR | Support | Boost
🥳Today we celebrate:
• Международный День 'Спасибо'
International Thank You Day!
A simple word can mean everything.❤️
🔻Спасибо!
#holidays
🟠RCR | Support | Boost
Это всё мандарины!
It's all because of the tangerines!
🥳Today we celebrate:
• Международный Разгрузочный День
International Fasting Day
Ну вы поняли:)
🖼It's common for Russian to use 'e' instead of 'ё', as it often is clear for us what is meant.
#holidays
🟠RCR | Support | Boost