#copyonwrite — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #copyonwrite, aggregated by home.social.
-
Почему одна вставка в PHP‑массив может стоить 100 мс
На примере PHP хорошо видно, как внутренние оптимизации динамически типизированного языка развиваются и усложняются. PHP‑массив выглядит универсальным, но внутри него скрыто множество оптимизаций и ветвлений, в их числе оптимизации для хранения и работы с массивами: Packed List & HashTable. Взаимодействие между ними и copy‑on‑write дают иногда неожиданное и непрозрачное поведение с точки зрения PHP программиста. Копнуть глубже
https://habr.com/ru/articles/1058576/
#php #массивы #производительность_PHP #оптимизация_памяти #HashTable #packed_array #copyonwrite #array_merge #внутренности_PHP #хештаблица
-
Swift 6.2 против вашего оптимизатора: разбираемся с InlineArray, Span и strict memory safety на замерах
Про ARC, weak / unowned и retain cycle на русском написано столько, что добавить нечего. Про borrowing / consuming и ~Copyable (это, к слову, Swift 5.9 , а не 6 - частая путаница) на английском тоже десятки разборов. И почти все они устроены одинаково: объясняют, что фича делает, на игрушечном примере с файловым дескриптором, и заканчивают выводом «так безопаснее и быстрее». Мне захотелось зайти иначе. Я взял три «памятных» нововведения Swift 6.2, написал на них бенчмарки, прогнал на релизном тулчейне и полез в сгенерированный ассемблер. Вопрос меня занимал не «что это делает», а куда более практичный: дают ли эти фичи реальный выигрыш в цифрах - и в каких случаях оптимизатор Swift давно делает то же самое за вас, бесплатно и молча. Ответ оказался менее очевидным, чем их маркетинг. Статью я старался написать так, чтобы её читал не только стафф. Поэтому по ходу я коротко объясняю базовые вещи - стек и кучу, ARC, copy-on-write. Если вы это и так знаете, просто пролистывайте врезки «на полях».
https://habr.com/ru/articles/1056552/
#Swift_62 #InlineArray #Span #ARC #copyonwrite #оптимизация #бенчмарки
-
Ah, the age-old conundrum of database branching finally solved by... *drumroll*... copy-on-write! 🎉 Because apparently, we all love turning our databases into a never-ending episode of "What If?" scenarios. 🤔 Meanwhile, the real dilemma remains: convincing the IT department to care. 😂
https://xata.io/blog/what-if-database-branching-was-easy #databasebranching #copyonwrite #ITchallenges #techhumor #WhatIf #HackerNews #ngated -
Ah, the age-old conundrum of database branching finally solved by... *drumroll*... copy-on-write! 🎉 Because apparently, we all love turning our databases into a never-ending episode of "What If?" scenarios. 🤔 Meanwhile, the real dilemma remains: convincing the IT department to care. 😂
https://xata.io/blog/what-if-database-branching-was-easy #databasebranching #copyonwrite #ITchallenges #techhumor #WhatIf #HackerNews #ngated -
Copy‑on‑write (COW) là kỹ thuật quan trọng giúp Swift thực hiện semantics giá trị một cách hiệu quả, giảm sao chép dữ liệu không cần thiết và tối ưu bộ nhớ. Bài viết phân tích sâu cách COW được áp dụng trong Swift internals, từ cấu trúc dữ liệu tới quản lý bộ nhớ, hữu ích cho lập trình viên muốn hiểu cơ chế hoạt động bên trong ngôn ngữ. #Swift #Programming #CopyOnWrite #LậpTrình #SwiftInternals #iOS
https://www.reddit.com/r/programming/comments/1qh97lb/copyonwrite_teaches_you_everything_about_s
-
Что такое снапшоты в СХД и как мы их реализовали в TATLIN.BACKUP
Еще год назад мы считали, что снапшоты без репликации не являются приоритетом для нашей команды. Но практика показала обратное: вирусы-шифровальщики, сбои и ошибки могут повредить резервные копии и нарушить их целостность. Чтобы защитить данные и дать возможность быстро восстановить их в неизменном виде, мы реализовали поддержку снапшотов в TATLIN.BACKUP. Новый функционал уже доказал свою эффективность и получил положительные отзывы клиентов. Меня зовут Ростислав, я эксперт по разработке ПО отдела систем обработки данных в YADRO. Сегодня разберемся, как устроены наши снапшоты и какие у них особенности. Для этого совершим экскурс в мир систем хранения данных (СХД) и рассмотрим их устройство.
https://habr.com/ru/companies/yadro/articles/941358/
#снапшоты #TATLINBACKUP #TBoost_SDK #RedirectonWrite #CopyonWrite #MarkandSweep #reference_counting #СХД
-
#Swift uses something like this:
“Simple Fast Value Semantics”, Tibor ‘zupa’ Halter, #Boomla (https://boomla.com/docs/simple-fast-value-semantics).
“isKnownUniquelyReferenced(_:)” (https://developer.apple.com/documentation/swift/isknownuniquelyreferenced(_:)-5kvtu).
Via Lobsters: https://lobste.rs/s/xo7a4v/simple_fast_value_semantics
-
#Swift uses something like this:
“Simple Fast Value Semantics”, Tibor ‘zupa’ Halter, #Boomla (https://boomla.com/docs/simple-fast-value-semantics).
“isKnownUniquelyReferenced(_:)” (https://developer.apple.com/documentation/swift/isknownuniquelyreferenced(_:)-5kvtu).
Via Lobsters: https://lobste.rs/s/xo7a4v/simple_fast_value_semantics
-
Copy-on-write on APFS
APFS (like many modern file systems but unlike its predecessor HFS+) supports copy-on-write. This means you can logically copy a file - it looks and behaves like a distinct file - but it doesn't immediately copy the file's contents on disk - it merely shares them with the original. Only if and as you modify either version do they start to diverge on disk, with APFS dynamically allocating new storage for the modified parts1.
This is kind of a sister function to hard links, which similarly [...]
-
Utilities for Copy-On-Write filesystems, call that cowtools.
#cowtools #CopyOnWrite #filesystems #QCOW2 #Btrfs (both are COW so I figure it would be relevant to anyone using them)
-
Should #coreutils #dd support CoW / reflink / FICLONE / copy_file_range optimizations?
Currently, cp has support for this, but can only copy whole files.
If I want to combine sections of files into an output file, there is no simple userspace tool to do so with #CopyOnWrite semantics.
#linux #filesystem -
[Перевод] Xv6: учебная Unix-подобная ОС. Глава 4: Прерывания и системные вызовы
Глава расскажет, как xv6 обрабатывает прерывания на RISC-V и о хитростях виртуальной памяти: как использовать ошибки доступа к страницам, чтобы оптимизировать работу ОС. Глава расскажет о копировании страниц при записи, ленивой выдаче страниц, выдаче страниц по необходимости и сбросе страниц на диск.
https://habr.com/ru/articles/794326/
#xv6 #операционная_система #прерывания #исключения #системные_вызовы #ядро #таблицы_страниц #виртуальная_память #copyonwrite #riscv
-
#CentOS #Hyperscale #SIG Caps Off Busy #2022
#CentOSHyperscale has been going strong for 2yr optimizing #CentOSStream for large scale infrastructure with more up-to-date packages, backing RPM #CopyOnWrite functionality with #Btrfs & various other changes
https://bit.ly/3GU2dZo -
#CentOS #Hyperscale #SIG Caps Off Busy #2022
#CentOSHyperscale has been going strong for 2yr optimizing #CentOSStream for large scale infrastructure with more up-to-date packages, backing RPM #CopyOnWrite functionality with #Btrfs & various other changes
https://bit.ly/3GU2dZo -
CW: linux, filesystems, copy-on-write snapshots, btrfs, snapper
I asked about this a while back, and didn't get much in the way of responses, so let me rephrase/elaborate (and please boost if you're so inclined & have followers who are likely to know the answer(s)) —
I was recently reading about
btrfs(a linux filesystem built around maximizing the efficiency of creating copy-on-write snapshots) andsnapper(a tool built on top ofbtrfsto automate snapshot creation & deletion), and I liked what I saw.In light of that, I have a couple of questions:
Is there a fundamental problem/deficit with these tools, which I'm missing, and which explains why they don't get any "press"? (Please note, I'm aware that backups-residing-on-the-very-system-being-backed-up is not a viable backup strategy if not supplemented by off-system backup. That's not the kind of deficit I'm talking about.)
Are there simply better versions of the same thing, i.e., these have been superseded and that's why nobody talks about them? (Note that part of what I find charming about the
btrfs/snappercombo is that it's very easy to manage. So, for example,ZFSdoes not "supersede"btrfs/snapperin that particular sense.)
Anyone have answers / thoughts / comments / corrections / follow-up questions?
Thanks in advance!
#linux #filesystem #filesystems #btrfs #snapper #CopyOnWrite #snapshots
-
CW: linux, filesystems, copy-on-write snapshots, btrfs, snapper
I asked about this a while back, and didn't get much in the way of responses, so let me rephrase/elaborate (and please boost if you're so inclined & have followers who are likely to know the answer(s)) —
I was recently reading about
btrfs(a linux filesystem built around maximizing the efficiency of creating copy-on-write snapshots) andsnapper(a tool built on top ofbtrfsto automate snapshot creation & deletion), and I liked what I saw.In light of that, I have a couple of questions:
Is there a fundamental problem/deficit with these tools, which I'm missing, and which explains why they don't get any "press"? (Please note, I'm aware that backups-residing-on-the-very-system-being-backed-up is not a viable backup strategy if not supplemented by off-system backup. That's not the kind of deficit I'm talking about.)
Are there simply better versions of the same thing, i.e., these have been superseded and that's why nobody talks about them? (Note that part of what I find charming about the
btrfs/snappercombo is that it's very easy to manage. So, for example,ZFSdoes not "supersede"btrfs/snapperin that particular sense.)
Anyone have answers / thoughts / comments / corrections / follow-up questions?
Thanks in advance!
#linux #filesystem #filesystems #btrfs #snapper #CopyOnWrite #snapshots
-
How To Adjust The Size Of The Root Partition On Live Arch Linux #ArchLinux #Linux #Linuxtips #Linuxhowto #RootPartition #CopyOnWrite
https://ostechnix.com/adjust-size-root-partition-live-arch-linux/