Tema: memory
-
Agent memory design: what to persist, what to summarise and what to forget
An agent's memory has three tiers: the context window, a task scratchpad and a durable store across sessions; decide per item which tier it belongs to, keep durable memory small and reviewable, and delete what is no longer true.
-
Sizing a JVM inside a container: heap percentage, non-heap memory and CPU count
The JVM reads cgroup limits by default (UseContainerSupport) and sizes the heap as a percentage of the container's memory, not the host's; heap is only part of the footprint, so set MaxRAMPercentage to leave room for metaspace, thread stacks, direct buffers and code cache, check the CPU count the JVM sees, and verify with -Xlog:os+container and native memory tracking before trusting a limit.
-
A small swap area with low swappiness reduces OOM kills of the primary service on memory-tight servers
Hypothesis: on single-purpose servers whose working set nearly fills RAM, a modest swap area combined with a low vm.swappiness lets the kernel page out cold anonymous memory during short spikes, so the primary service is OOM-killed less often than on the same host without swap, at the cost of occasional latency.
-
Rust ownership and borrowing in outline
Every Rust value has exactly one owner and is dropped when the owner goes out of scope; passing a value moves it unless the type is Copy, and references borrow it under the rule of one mutable or any number of shared references at a time. The borrow checker enforces this at compile time, which is where memory safety without a garbage collector comes from.
-
Retrieval practice as a study protocol: close the source, produce the answer, then check
A protocol for studying by recall instead of rereading: after each unit, close the source, write what you can reproduce, compare against the source, mark the gaps and schedule the gaps for a later recall attempt; classroom and laboratory research summarised in a 2021 systematic review reports benefits across levels and formats.
-
Reading the load average and understanding the OOM killer
Linux load average counts runnable and uninterruptible-sleep tasks over 1, 5 and 15 minutes, so a high number with idle CPUs points at I/O or a hung filesystem. When memory cannot be reclaimed, the OOM killer picks a task by badness score, which oom_score_adj shifts from -1000 (never) to +1000 (first).
-
Spaced repetition as a scheduling method: the SM-2 algorithm in outline
Spaced repetition gives every item its own next review date: the interval grows after a successful recall and resets after a failure. Wozniak's SM-2 (1987) fixes the first two intervals at 1 and 6 days, multiplies later ones by a per-item easiness factor that starts at 2.5 and is never allowed below 1.3, and adjusts that factor from a 0–5 recall grade; the arithmetic fits in one line of a spreadsheet.
-
Which memory metric should alerts and autoscalers use for a containerised service: RSS, PSS, working set or cgroup memory.current?
Open question: process RSS counts shared pages per process, cgroup memory.current includes page cache and kernel memory, and Kubernetes reports a heuristic working set; which of these has been used as the alerting and scaling signal for a long-running service without either paging on reclaimable cache or missing an approach to the OOM limit?
-
Vocabulary entries with a self-written example sentence survive longer review intervals than bare word pairs
Hypothesis: in a language-learning vocabulary log reviewed on a spaced schedule, entries that carry an example sentence written by the learner at entry time reach long intervals with fewer lapses than entries that store only the word and its translation; a proposed comparison within one learner's log.
-
Measuring a process's memory on Linux: virtual size, RSS, PSS and what each answers
VmSize counts reserved address space and says little about cost; VmRSS is what is resident now, including pages shared with other processes; PSS divides shared pages among their users so that a sum over processes is honest. Pick the number that matches the question: will it fit, is it leaking, or what does it add.
Legible por máquina: JSON