В 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
Making Singapore a liveable, inclusive and endearing home for all takes a collective effort. Learn how you can contribute to the Draft Master Plan 2025 and shape your future Singapore here: go.gov.sg/URADraftMasterPlan
#DMP2025
Infographics: @urasingapore
[JUST LAUNCHED] Join us in shaping our city in the Draft Master Plan 2025 Public Engagement!
Long-term planning has shaped the city that we live in today. Now, you too can play a part in making Singapore a more liveable, inclusive and endearing home.
We will be engaging Singaporeans over the next two years on various plans and the public engagement exercise will culminate in the Draft Master Plan 2025, which will guide Singapore’s development over the next 10 to 15 years.
Find out more at: https://go.gov.sg/DMP2025videotg
#DMP2025
Who says uncles can’t keep up? 🏙💪
Meet Team Strong Silvers, your friendly neighbourhood uncles who aren't just staying active; they inspire an entire community to move! Watch how this group of friends show us what ageing-in-place looks like - turning everyday spaces into pockets of connection.
Want more neighbourhoods like this? The URA Draft Master Plan 2025 is shaping spaces where we can all age strong and live well. Learn more: go.gov.sg/ExtraordinaryStoriesTG✨
#DMP2025#SpaceForOurDreams
Will Singapore ever run out of land? 👀
We get this question a lot—so we got Navin, our Urban Planner, to break it down for you. From sky gardens to underground links, see how we’re planning ahead to make room for all the things that matter—homes, recreation, green spaces, your dreams and aspirations. 🌇🌿
Share with us your ideal Singapore in the next 10 to 15 years here: go.gov.sg/URAPlannerExplainsTG and keep an eye out for our upcoming exhibition in June!
#DMP2025#SpaceForOurDreams
This is our type of ASMR. 😌
👣 Active Living: Move freely and with ease on walkable pathways.
🌻 Social Well-Being: Bond with your community in shared spaces.
🌳 Mental Wellness: Discover peaceful parks near home to relax and unwind.
☁️ Routine: Everyday wellness, wherever you are.
Check out our newest Urban Lab exhibition at: go.gov.sg/HealthyCitiesTG
Well-Being in the City: Innovating Healthy Living
📅: 1 Apr - 31 May 2025
📍: The URA Centre, Level 1 Atrium
#DMP2025#SpaceforOurDreams
Ever wondered who decides what gets built in Singapore? 🤔
It's not just professionals and government agencies—you can contribute too! Join Davina, our Urban Planner, as she unveils how the land planning process works in Singapore.
Got ideas to shape your neighbourhoods or workspaces? 💡 Visit go.gov.sg/URAPlannerExplainsTG to see what’s planned for the Draft Master Plan 2025 and share your thoughts!
#DMP2025#SpaceForOurDreams
Big things are happening at the Rail Corridor with new community nodes coming your way!
Think chill spots, and heritage gems getting a fresh spin. 🌿✨
Watch to see what’s shaping up, and swing by the 'From Rail to Trail' Rail Corridor Exhibition to check out more.
📅: Now till 28 Feb 2025
📍: URA Centre
👉 Share your ideas at: go.gov.sg/RCexhibitionTG
#SpaceForOurDreams#DMP2025
Take a stroll down the Rail Corridor with URA's Senior Director of Planning, See Nin, and wildlife documentary camerawoman, Evangelista, as they reveal how this 24km stretch of passageway was transformed from tracks 🛤 to trails 👣 – while preserving its distinctive character! This isn't just another makeover; we're talking about over 50 access points connecting neighbourhoods across our sunny island!
💭 The journey continues, and we want to hear from you! Join us at the Rail Corridor Exhibition happening from 17 Jan at the URA Centre! Find out more on go.gov.sg/RailCorridorTG
#DMP2025#SpaceForOurDreams
Swipe to see how Punggol Digital District is transforming into Singapore’s first smart district. With community spaces, green paths and integrated work-live-play environments, it’s taking urban living to the next level!
Read more at go.gov.sg/PDDarticleTG.
Keep a lookout for the Draft Master Plan 2025 exhibition happening in June, where we will be seeking your ideas on more business and job nodes across Singapore!
Image credits: JTC Corporation
#DMP2025#SpaceForOurDreams
Creating a more liveable, inclusive, and endearing Singapore — that’s the goal of the Draft Master Plan 2025, and we’ve made great strides this year. Here’s our 2024, wrapped!
For more info, visit go.gov.sg/URADraftMasterPlanTG
#DMP2025#SpaceforOurDreams
Imagine your future, supercharged ⚡🔋
Check out how plans for our Northern and Central areas' business nodes will mean even shorter trips to work, more innovative spaces to learn and collaborate, and lively, green neighbourhoods to live your best life!
Last chance to explore these transformations and more at our ‘Enabling Sustainable Growth: Shaping the Future of Work’ exhibition!
📅: Now till 3 Jan 2025
📍: URA Centre
👉 More info: go.gov.sg/FutureofWorkTG
#DMP2025#SpaceForOurDreams
Smarter. Faster. Greener.
Discover innovations that are shaping the future of last-mile deliveries. 💡
Singapore is shaping the future of last-mile deliveries with AI, robots and innovative designs. Don’t miss out on seeing it all in one place!
📅: Now till 25 Jan 2025
📍: URA Centre
👉 Free guided tours and more at:
go.gov.sg/DeliveringtheFutureTG
#DMP2025#SpaceForOurDreams