В 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
#zig
TigerBeetle is a powerful, highly reliable database built specifically for financial transactions, designed to handle huge volumes with safety and speed. It ensures that once a transaction is confirmed, it cannot be lost, even if hardware fails or data gets corrupted. It uses advanced techniques like replication, checksums, and fault-tolerant consensus to keep data safe and available. TigerBeetle is much faster and more efficient than traditional databases, making it ideal for mission-critical financial systems that need to process thousands of transactions per second without errors or downtime. This means you get a secure, fast, and stable platform for managing money transfers and accounts reliably.
https://github.com/tigerbeetle/tigerbeetle
#zig
Ghostty is a fast, feature-rich terminal emulator that combines speed, native platform integration, and modern features without compromise. It supports multi-window, tabs, and split panes, with GPU-accelerated rendering using Metal on macOS and OpenGL on Linux for smooth performance. Ghostty is highly compatible with existing shells and software, making it a drop-in replacement. It offers rich theming, ligature support, and advanced developer features that enable more interactive command-line applications. Its native UI and cross-platform design provide a polished, efficient terminal experience that enhances productivity and usability for both users and developers.
https://github.com/ghostty-org/ghostty
🔥GEM ANNOUNCEMENT🔥
#ZIG/USDT:
Spot Signal (Exchange: Bybit, Bitget, MEXC, Gate.Io)
Technical Analysis:
#ZIG is pumping exactly from the support zone and now breaking a resistance trendline. We can see bullish momentum in it right now because technically this coin looks very strong. You people can buy and hold it now because bull run is going on and we can get good profits in it
📢BURN INCOMING📢
It's time to buyback & burn #ZIG🔥🔥!
8th Monthly #ZIG buyback & burn will take place on 6th January and It will be the biggest monthly burn to date!
#Zignaly#ZIG#Burn
#zig#3d_game#cubyz#game#procedural_generation#sandbox#sandbox_game#voxel#voxel_game#zig
Cubyz is a 3D voxel sandbox game like Minecraft, letting you explore unlimited height and depth with far view distances. It has a unique crafting system where you can try making any tool, and the game figures out what it is. It runs on Windows and Linux, written in the Zig programming language for better performance. You can easily download and run it or compile it yourself if you want the latest version. The game is open-source, so you can contribute by adding code, gameplay features, or textures following simple guidelines. This means you get a flexible, creative game with ongoing improvements and community support.
https://github.com/PixelGuys/Cubyz