9148c358d0
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
4.8 KiB
4.8 KiB
id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
| id | title | category | status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | verification_status | tags | raw_sources | last_reinforced | github_commit | tech_stack | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| wiki-2026-0508-snapshots | Snapshots | 10_Wiki/Topics | verified | self |
|
none | A | 0.9 | applied |
|
2026-05-10 | pending |
|
Snapshots
매 한 줄
"매 point-in-time 의 state freeze — 매 startup 의 accelerate, 매 leak 의 hunt, 매 recovery 의 enable.". 매 V8 startup snapshot, heap snapshot, filesystem snapshot (ZFS/Btrfs), DB snapshot, state snapshot (Redux time-travel) — 매 same primitive 의 different domain. 매 modern runtime 의 cold-start optimization 의 default tool.
매 핵심
매 종류
- V8 startup snapshot: serialize heap → fast Node.js cold start.
- Heap snapshot (
.heapsnapshot): debug memory leak, retainer graph. - GC snapshot: generational scan checkpoint.
- Filesystem snapshot: ZFS/Btrfs/LVM copy-on-write point-in-time.
- DB snapshot: PITR base, transactional checkpoint.
- State snapshot: Redux DevTools time-travel, game save.
매 properties
- Copy-on-write (efficient diff storage).
- Atomic (consistent point-in-time).
- Restorable (full state reconstruction).
- Immutable (snapshot itself never mutated).
매 응용
- Node.js bootup
--snapshot-blob(200ms → 30ms startup). - Chrome DevTools heap profiler — leak hunt.
- ZFS rollback before risky deploy.
- Postgres PITR base + WAL replay.
- Redux DevTools — time-travel debug.
- AWS EBS snapshot — disaster recovery.
- Container checkpoint/restore (CRIU).
💻 패턴
Node.js startup snapshot
node --snapshot-blob snapshot.blob --build-snapshot snapshot-init.js
node --snapshot-blob snapshot.blob app.js
# Cold start: 200ms → ~30ms
Chrome heap snapshot programmatic
const v8 = require('v8');
const fs = require('fs');
const stream = v8.getHeapSnapshot();
stream.pipe(fs.createWriteStream('heap.heapsnapshot'));
// Open in Chrome DevTools → Memory tab
ZFS snapshot + rollback
zfs snapshot tank/data@before-deploy
# ... risky operation ...
zfs rollback tank/data@before-deploy # if failure
zfs destroy tank/data@before-deploy # if success
Postgres base backup + PITR
pg_basebackup -D /backup/base -F tar -X stream -P
# Recover to point-in-time
restore_command = 'cp /archive/%f %p'
recovery_target_time = '2026-05-10 14:30:00'
Redux state snapshot
import { createStore } from 'redux';
const store = createStore(reducer);
const snapshot = store.getState(); // freeze
// ... actions ...
store.replaceReducer((state = snapshot) => state); // restore
CRIU container checkpoint
criu dump --tree $PID --images-dir /checkpoints/svc-1 --leave-running
# Later, possibly on different host:
criu restore --images-dir /checkpoints/svc-1
EBS snapshot via AWS SDK
import { EC2Client, CreateSnapshotCommand } from '@aws-sdk/client-ec2';
await client.send(new CreateSnapshotCommand({
VolumeId: 'vol-0abc',
Description: 'pre-migration-2026-05-10',
TagSpecifications: [{ ResourceType: 'snapshot', Tags: [{ Key: 'env', Value: 'prod' }] }],
}));
Heap diff analysis
// Take 2 snapshots, diff in DevTools to find leak
v8.writeHeapSnapshot('/tmp/before.heapsnapshot');
runSuspectCode();
v8.writeHeapSnapshot('/tmp/after.heapsnapshot');
// Load both → "Comparison" view → growing retainer chains
매 결정 기준
| 상황 | Approach |
|---|---|
| Node.js cold start slow | startup snapshot |
| Memory leak hunt | heap snapshot diff |
| Pre-deploy rollback safety | ZFS/EBS snapshot |
| DB recovery to time T | PITR base + WAL |
| Container live migration | CRIU checkpoint |
| Frontend bug repro | Redux time-travel |
기본값: heap snapshot for leaks, ZFS/EBS for storage, PITR for DB, CRIU for container.
🔗 Graph
- 부모: State Management
- 변형: Heap Snapshot · V8-Snapshot
- 응용: Disaster-Recovery
- Adjacent: Event Sourcing
🤖 LLM 활용
언제: cold-start optim, leak diag, DR planning, time-travel debug strategy. 언제 X: write-heavy hot path — snapshot overhead 의 measure 필요.
❌ 안티패턴
- Snapshot as backup: 매 same disk 의 snapshot 의 disk failure 의 protect X.
- No retention policy: 매 snapshot accumulate → storage explode.
- Heap snapshot in prod under load: 매 GC pause spike — staging 에서.
🧪 검증 / 중복
- Verified (V8 docs, Chrome DevTools docs, ZFS handbook, Postgres PITR docs).
- 신뢰도 A.
🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — snapshot taxonomy, V8/heap/ZFS/PITR/CRIU patterns |