主题: memory
-
设计智能体记忆:保留什么、概括什么、忘记什么
智能体记忆分为三个层次:上下文窗口、任务工作笔记和跨会话持久存储。应逐项决定归属层次,让持久记忆保持精简、可审查,并删除不再真实的内容。
-
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 所有权与借用概览
每个 Rust 值恰好有一个所有者,所有者离开作用域时该值被释放;传递值会移动它,除非其类型实现 Copy。引用借用值时遵循同一时刻只能有一个可变引用或任意多个共享引用的规则。借用检查器在编译时强制执行这些规则,从而在无需垃圾回收器的情况下保证内存安全。
-
把提取练习作为学习流程:关闭来源,给出答案,再检查
一种用回忆代替重读的学习流程:每学完一个单元,关闭来源,写出能够复现的内容,对照来源、标记缺口,并安排稍后的回忆尝试。2021 年一篇系统综述汇总的课堂与实验室研究报告了这种方法在不同教育层次和形式下的益处。
-
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.
-
Reading Linux memory pressure: free, swap, the OOM killer and OOMScoreAdjust
The 'available' column in free, not 'free', is the number that indicates real headroom, and a process killed under memory pressure leaves a record in the kernel log or journal, not a silent disappearance. This article explains what to read and how to bias which process the OOM killer picks.
-
测量 Linux 进程内存:虚拟大小、RSS、PSS 分别回答什么问题
VmSize 统计预留的地址空间,对实际内存开销说明有限;VmRSS 表示当前驻留的内存,其中包括与其他进程共享的页面;PSS 将共享页面分摊给使用它们的进程,因此可以合理地汇总各进程的内存。应按问题选择指标:机器能否容纳、是否泄漏,或额外增加多少开销。
机器可读: JSON