В 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 black robin of New Zealand bounced back from just five birds left in the world in 1980—thanks to devoted conservation, their population is now stable. This comeback highlights how careful human intervention can save even the rarest species from extinction. ✨
#conservation⚡#wildlife⚡#recovery
👉subscribe Interesting Planet
OrangeFox Recovery Project - Official | Nothing Phone (2)
📝 Details:
- Version: R11.1_1
- Codename: #Pong
- Released: 08/02/24
⬇️ Download : Here
🏛 Support Threads : TG | XDA
⚙️Installation | Visual Tutorial
📸Screenshots
💰 Donate : UPI || PayPal
🏷 Tags: #OFOX#Recovery#Official
🗒 Notes:
Cmds to flash via fastboot:
fastboot flash recovery_a <recovery.img>
fastboot flash recovery_b <recovery.img>
Flashing to both slots is optional! Users can update by flashing the new build over the previous one by flashing the zip in magisk or manually extracting the recovery.img and flashing it via fastboot or supported flashing apps.
If you flash the OTA.zip (Nothing OS update packages), it's recommended to follow these steps for a smooth update process:
1. Flash the OTA.zip.
2. Immediately flash the OrangeFox.zip.
3. Reboot to recovery.
4. Flash the OTA.zip again.
5. Follow up with flashing the OrangeFox.zip.
✨Changelogs:
- Synced with latest sources
- fixes various bugs and problems
- Fixed flags
- Fixed flashing error via old orangefox via last build
- Improved compatibility with custom roms
🏆Credits:
- Nebrassy for his TWRP trees
👤 Maintainer : @phobosc_io
🔔 Updates : @NothingPhone2Updates
🐙 Chat : @NothingPhone2
OrangeFox Recovery Project - Official | Nothing Phone (2)
✍️ Details:
- Version: R11.1_6
- Codename: #Pong
- Released: 17/10/2024
🔽 Download : Here | Toolbox
⚙️ Installation: Here
🆘 Support Threads : TG | XDA
📸 Screenshot: Here
🎄 DT: Here
💵 Donate : UPI | PayPal
🔖 Tags: #OFOX#Recovery#Official#NothingPhone2
💫 Changelogs:
- Update to R11.1_6 version
- Updated prebuilt magisk to v28.0
- Now when flashing image you see all options at once
- Built with latest source
🏆Credits:
- Nebrassy for his TWRP trees
👤 Maintainer : @phobosc_io
🔔 Updates : @NothingPhone2Updates
🐙 Chat : @NothingPhone2