This article explains how PHP generator functions can create infinite iterable objects, demonstrating with a Fibonacci sequence example to efficiently handle large data sets while reducing memory usage and improving performance in backend development.
The article explains the scaling challenges of ever‑larger LLMs, introduces the MFU performance metric, surveys industry parallelism and memory‑saving techniques, and details Baidu’s AIAK‑LLM suite—including resource, component and acceleration layers—as well as concrete training and inference optimizations that raise MFU by 30‑60% and cut deployment costs.
This article explores Java String internals across JDK versions, explaining its memory representation, immutability, substring behavior, and how techniques like StringBuilder, intern(), and shared objects can dramatically reduce memory usage from gigabytes to megabytes in high‑scale applications.
By replacing ZooKeeper’s default WatchManager hash‑set tables with concurrent maps and bitmap‑based structures, the authors cut watch‑related heap usage from several gigabytes to under 12 MB, lowered lock contention, and achieved 5‑6× latency gains, delivering up to 91 % memory reduction and ten‑fold SLA improvement in production clusters.
This article provides a comprehensive technical guide on Retrieval‑Augmented Generation (RAG), open‑source large language models such as LLaMA, fine‑tuning methods, evaluation metrics, memory‑optimization tricks, and attention‑related optimizations for modern AI systems.
This article explains practical Python memory‑saving methods—including inspecting memory usage, using __slots__, generators, memory‑mapped files, choosing efficient data structures, and string interning—providing code examples and performance comparisons to help developers write more memory‑efficient programs.
This guide explains why Spring Boot applications consume memory, shows how to configure the JVM and Tomcat settings, and demonstrates using Docker‑compose to apply these tweaks, enabling developers to reduce local memory usage by more than 40% and speed up development cycles.
This article explains how 1980s game developers squeezed full‑screen scrolling, rich music, and extensive gameplay into just 128 KB by using tile‑based graphics, specialized audio chips, and ultra‑compact code, revealing the technical tricks behind classic titles like Contra.
The article explains the Flyweight design pattern, shows how a surge of 30 KB country objects caused memory pressure in a marketing service, and demonstrates a Java implementation with Flyweight, FlyweightFactory, and related code, while comparing it to Singleton and caching approaches.
This article examines memory usage on a Junzheng T31ZC embedded Linux board, breaks down physical and kernel allocations, and presents practical techniques—such as trimming kernel symbols, stripping ELF files, optimizing rootfs, and manually dropping caches—to reclaim valuable RAM without adding hardware.
Grafana Labs engineer Bryan Boreham explained at KubeCon how a series of code changes, label optimizations, and Go runtime tuning reduced Prometheus memory consumption by roughly 50%, detailing the technical challenges, solutions, and measurable impact on modern monitoring deployments.
This article walks through a real‑world Python big‑data deduplication challenge, compares several memory‑efficient strategies—including tuple‑set, merge‑union, and concat‑drop_duplicates approaches—and offers practical tips for asking technical questions about large datasets.
This article explains how to use a bitmap to store 6 billion URLs within 1 GB of memory and introduces Bloom filters as a space‑efficient probabilistic structure for deduplication, providing memory calculations, usage scenarios, and Java code examples.
At the 18th China Linux Kernel Developer Conference, OPPO unveiled memory and scheduler optimizations—including a dynamic 64 KB huge‑page scheme, LRU reclamation improvements, and a latency‑aware scheduler balance—that collectively raise memory access performance by over 10 %, reduce lock contention, and lower frame‑drop and audio‑stutter rates, demonstrating the impact of programmable kernel technologies on Android smoothness.
This article explains PHP 7 generators, describing their concept, memory‑saving benefits, and how to implement them with a practical example that reads a large file and yields squared numbers, demonstrating efficient data processing and lazy loading in backend development.
This article explains Java memory concepts, demonstrates how to set JVM memory parameters for Spring Boot via startup scripts and configuration files, lists common memory flags, and provides practical tips for reducing memory consumption and improving application performance.
At the 2023 CCF ESTC conference, OPPO showcased its 64 KB dynamic large‑page technology that can increase memory‑access bandwidth up to sixteenfold and improve app startup and frame rates, while also co‑hosting a Linux‑kernel forum on scheduler, lock contention, memory defragmentation and hot‑cold page optimization, underscoring the company’s push for industry‑academic collaboration and future OS research.
This article details the systematic memory‑usage analysis and multi‑stage optimization performed on the desktop QQ Electron client, covering background challenges, target metrics, tooling, code and resource slimming, rendering layer tuning, Lottie handling, online monitoring, and the resulting stable sub‑300 MB memory footprint.
To curb Desktop QQ’s excessive Electron memory consumption, the team applied comprehensive profiling, code and resource slimming, thumbnail image generation, visible‑only DOM rendering, layer merging, Lottie animation tuning, API caching, and leak removal, achieving average usage around 228 MB and keeping all six processes below 300 MB with ongoing monitoring.
The iOS live‑stream app was crashing from out‑of‑memory due to high‑resolution images and CPU‑based Gaussian blur, so the solution reduced download size, skipped downloads during fast scrolling, limited cached blurred images, and switched to GPUImage‑accelerated blur with a custom composite shader, cutting memory use and processing time.
This article explains how Java caches Integer objects in the range -128 to 127, why the == operator behaves differently for small and large integers, and demonstrates how to inspect and manipulate the cache using reflection.
This article details the identification, analysis, and resolution of JVM memory problems in a core music metadata service, covering GC tuning, large‑object handling, fault‑tolerance strategies, custom Dubbo codec monitoring, and non‑intrusive memory object tracking to improve performance and stability.
This article explains what Redis bigkeys are, their impact on performance and memory, how they are generated, methods to detect and analyze them—including built‑in commands, SCAN, memory usage, and RDB file inspection—and practical steps to mitigate their effects.
The article examines a 7‑node Elasticsearch cluster with 500 million documents, uncovering excessive heap usage, high OS memory pressure, numerous deleted documents, large translog, low query‑cache hit rate, and an over‑sharded design, then offers concrete tuning and redesign recommendations to restore performance.
A 7‑node Elasticsearch cluster handling 500 million documents shows excessive heap usage, many deleted documents, high translog size, saturated OS memory, and inefficient sharding, prompting a detailed analysis of stats, root‑cause identification, and concrete recommendations for mapping, shard design, and JVM tuning.
During a livestream titled “Solving the ‘Development Difficulty’ of Large Models with MindSpore Auto Parallel”, Huawei’s MindSpore experts explained how the framework’s distributed training techniques—including data, model, and pipeline parallelism as well as memory‑saving strategies—enable efficient pre‑training of trillion‑parameter models across diverse AI domains.
This article analyzes a 7‑node Elasticsearch cluster with 500 million documents, revealing excessive shard count, high heap and OS memory usage, large translog, low query‑cache hit rate, and heavy I/O, and offers concrete recommendations on mapping, sharding, JVM tuning, and resource management to restore performance.
This guide explains why IntelliJ IDEA can become sluggish due to low default JVM memory limits, shows how to view current usage, edit the custom VM options to raise -Xmx and related parameters, clear caches, and restart the IDE for a smoother development experience.
This article presents a collection of lesser‑known Python tricks—including string normalization, iterator slicing, keyword‑only functions, custom context managers, memory‑saving __slots__, CPU/memory limits, import control with __all__, and simplified ordering with total_ordering—to help developers write cleaner and more efficient code.
The article explains why using the '+' operator for string concatenation in Java creates many temporary objects, how the StringBuilder class and compile‑time optimizations can avoid this overhead, and demonstrates object‑creation counts for two typical interview questions using javap bytecode inspection.
The article explains that Swift’s nil differs from Objective‑C’s null pointer by representing ‘no value’ for any type through optionals, details how various optionals (Bool?, String?, class?, enum?) are encoded in memory, shows the extra byte cost for Int?, and advises minimizing optional Int fields in structs, using 0 when appropriate.
This article explains the inner workings of Redis Hashes, covering the dict and listpack storage mechanisms, memory‑optimizing conditions, rehashing strategies, and the underlying C structures that enable fast O(1) field lookups and efficient memory usage.
TencentOS “Wujing” provides a server‑memory multi‑level offloading framework that uses kernel‑side reclamation, heat‑aware page classification, SWAP balancing, and CXL promotion to shift cold pages to cheaper storage, cutting data‑center memory use by up to 50 % while preserving performance.
This article explains how using a bitmap reduces the memory needed to store billions of integers, introduces the concept and limitations of bitmaps, describes bloom filters, their false‑positive behavior, common use cases, and provides Java code examples using Guava, Apache Commons, Redis and Jedis.
This article introduces OneFlow Coop, a memory‑optimization technique that jointly optimizes dynamic‑graph recomputation strategies and GPU memory allocation by analyzing existing DTR limitations, proposing recomputable in‑place, op‑guided tensor allocation, and layout‑aware eviction modules, and demonstrating superior experimental results.
This article introduces a collection of lesser‑known Python tricks—including string cleaning with translate, iterator slicing via itertools, skipping header lines, keyword‑only functions, custom context managers, memory‑saving __slots__, resource limits, import control with __all__, and total_ordering—to help developers write cleaner, more efficient code.
This article presents six practical Go performance optimizations—including GOMAXPROCS tuning for Kubernetes, struct field ordering, garbage‑collection limits, zero‑copy unsafe conversions, jsoniter usage, and sync.Pool pooling—that together can dramatically lower CPU, memory, and latency in production services.
This article analyzes Tencent's AngelPTM framework, detailing its ZeRO-Cache strategy, unified storage management, multi‑stream async execution, SSD tiered storage, and performance benchmarks that show up to 95% larger model capacity and over 44% speedup compared to community solutions.
This article presents Tencent's latest advancements in large‑scale model training, detailing the AngelPTM framework and its ZeRO‑Cache optimization techniques that reduce memory and storage costs, improve hardware utilization, and achieve high‑performance training for trillion‑parameter AI models across various applications.
This article details the systematic reduction of memory consumption for Ctrip's hotel query service by halving container memory, evaluating and tuning modern garbage collectors, diagnosing off‑heap leaks, and ultimately replacing the default ptmalloc allocator with jemalloc to achieve stable performance and lower resource costs.
This article explains Redis's compressed list structures—ZIPLIST and its successor LISTPACK—detailing their layouts, encoding schemes, query and update complexities, and how LISTPACK resolves ZIPLIST's chain‑update performance issues to provide a more memory‑efficient list implementation.
This article examines typical MySQL out‑of‑memory (OOM) situations in production, explains how to diagnose memory usage with Performance Schema and other tools, and presents a series of TDSQL‑C‑specific optimization techniques—including server‑parameter tuning, process‑list monitoring, cold‑page detection, buffer‑pool limits, and dynamic resizing—to mitigate OOM risks.
This article explains Redis String data type usage, the Simple Dynamic String (SDS) implementation details, memory‑saving techniques, encoding options, and demonstrates a practical distributed ID generator built with Redis commands and persistence strategies.
This article, based on ByteDance STE’s 2022 Linux Kernel Developer Conference talk, explains the HVO (HugeTLB vmemmap Optimization) feature that dramatically reduces struct page memory for huge pages, details its latest enhancements, cross‑architecture support, usage steps, performance trade‑offs, and future plans.
The article details how Meituan’s Turing machine‑learning platform cut offline resource use by 80% and task time by 63% through memory‑level techniques such as column pruning, adaptive caching, and a deep dive into Spark’s mapPartitions operator, including source‑code analysis, GC behavior, and a low‑memory batch‑iterator best practice.
This article explains how to handle Redis scenarios with oversized keys, massive collections, billions of keys, and large bitmaps or Bloom filters by partitioning data into multiple keys or hashes, using bucketization, multi‑get, and careful bitmap splitting to improve performance and lower memory consumption.
This article walks through generating a 10 GB file of age values, reading it line‑by‑line on a 4 GB RAM, 2‑core machine, measuring single‑thread performance, then redesigning the pipeline with a producer‑consumer model, blocking queues and multithreaded string splitting to dramatically boost CPU utilization and cut processing time while managing memory consumption.
This article examines Ctrip's hotel query service cache, detailing the selection of in‑memory data structures, analyzing Java object and HashMap memory overhead, and demonstrating how bitmap, run‑length, dictionary, and delta encodings dramatically reduce memory usage in real‑world scenarios.
This article provides a detailed, data‑driven guide to evaluating and tuning AMD Milan‑based servers, covering SPEC CPU benchmarking, BIOS options such as SMT and Boost, memory channel and NUMA configurations, interleaving, IOMMU, and power‑state settings to achieve up to 30% performance gains.
This article explains mobile game memory optimization, covering RAM vs ROM, resource memory reduction for textures, models, animations, streaming load, unused resource unloading, and detecting memory leaks, while providing practical QA testing methods to ensure performance without compromising visual quality.
This article explains how Redis stores key‑value pairs, details the internal data structures such as dict, dictEntry and redisObject, and provides practical memory‑saving tricks—including key shortening, encoding choices, object sharing, bitmap usage, hash consolidation, fragmentation handling, and 32‑bit deployment—to dramatically reduce RAM consumption while maintaining performance.
The article outlines how a modest cluster of 20 virtual machines with 16 GB RAM each can handle 1 billion user records and 20 million hourly queries by using simple in‑memory arrays, basic indexing, modest bandwidth, and straightforward failover mechanisms, without requiring advanced technologies.
The article explains why Redis has traditionally been single‑threaded, details the new IO‑thread multithreading model introduced in Redis 6.0, walks through its four processing stages, lists essential INFO monitoring commands, examines memory overhead of strings versus hashes, compares List and Sorted Set ordering, and identifies five key performance‑blocking points.
This article explains Redis's low‑level data structures—including ziplist, skiplist, intset, quicklist, zipmap and stream—detailing their memory layouts, implementation code, use‑case selection criteria, performance trade‑offs, and configurable parameters that balance speed and space.
The article explains Redis’s internal low‑level structures—ziplist, skiplist, intset, quicklist, zipmap, and stream—detailing their memory‑efficient layouts, operations, use cases, and how they combine (e.g., quicklist merging linked lists with ziplists) to deliver high performance in the in‑memory database.
Microsoft’s Windows 11 22H2 preview introduces File Explorer tabs that not only improve navigation but also consume significantly less memory—adding only a few megabytes per new tab—making the OS more efficient for power users.
This article explains the Java constant pool concept, details how the String constant pool works in different JDK versions, demonstrates the effects of String.intern() with code examples, and discusses practical applications and pitfalls of using intern for memory optimization and synchronization.
This article outlines six typical errors beginners make with Pandas—slow CSV reads, lack of vectorization, improper dtypes, ignoring styling, inefficient CSV saving, and not consulting documentation—and provides faster alternatives, memory‑saving techniques, and best‑practice tips for handling large datasets.
This article explains why Redis is ultra‑fast by exploring its in‑memory design and the nine fundamental data structures—SDS, linked lists, ziplist, hash tables, skiplist, intset, quicklist, and listpack—that power keys, values, and internal objects, complete with code examples and version‑specific changes.
This article examines how Ctrip's hotel query service selects and optimizes in‑memory cache structures—covering Java object layout, HashMap overhead, alternative collections, and various encoding techniques—to achieve high‑performance reads and updates while drastically reducing memory consumption.
The article explains how Java 8 changed the internal representation of String from a char[] to a byte[] to reduce memory consumption, the role of Latin‑1 encoding, the impact on garbage collection, and why UTF‑16 remains the practical choice for Java strings.
For deduplicating game recommendations in Redis, RoaringBitMap outperforms intset and Bloom filters by storing 300 auto‑incrementing game IDs in roughly 0.5 KB—over twice the compression of intset and far smaller than the 29 KB Bloom filter—thereby cutting memory use, latency, and hardware costs.
The article explains how to locate all missing 32‑bit unsigned integers in a 4 billion‑entry file by first partitioning the range into intervals, counting entries per interval with a tiny int[64] array, and then applying a bitmap method only to under‑filled intervals, achieving a memory footprint of just a few hundred bytes.
This article explains why comparing Integer objects with == yields false for large values but true for small values due to Java's internal IntegerCache, demonstrates the caching mechanism with code examples, and shows how reflection can manipulate the cache, highlighting memory optimization considerations.
This article analyzes the excessive memory usage and blocking issues in Redis master‑slave replication, explains how the upcoming Redis 7.0 shared replication buffer solves these problems, and details the design, implementation, and key considerations of the shared buffer mechanism.
The article explains the upcoming Java Valhalla project, detailing how value objects, primitive classes, and specialized generics will reshape the JVM’s type system, reduce memory overhead, and introduce new value‑class semantics for more efficient Java programming.
This article presents a texture compression method that eliminates hollow (alpha‑zero) regions by reorganizing textures into macro‑blocks, storing index maps for reconstruction, and demonstrates significant memory savings and unchanged visual quality on mobile devices, even after video encoding.
This article explains why the classic game Contra could pack extensive graphics, music, and scrolling effects into just 128 KB by discussing data size perception, tile‑based graphics techniques, limited audio chip capabilities, and minimalist code strategies used in the NES era.
This article walks through four approaches—sorting, hashmap, file splitting, and a bitmap technique—to deduplicate 4 billion QQ numbers within a 1 GB memory limit, explains why the first three fail, and shows how a bitmap solves the problem efficiently.
This article explains several algorithmic strategies—including sorting, hash maps, file splitting, and bitmap techniques—to remove duplicates from a file containing 4 billion QQ numbers while staying within a 1 GB memory limit, and it provides extension exercises for sorting, median, top‑K, and duplicate detection.
This article explains Redis's ziplist—a compact list implementation used for small integers and short strings—by detailing its memory layout, field meanings, entry encoding schemes, the role of previous_entry, and the chain‑update behavior that occurs when nodes are added or removed.
This article explains Redis's ziplist—a compact list implementation used for small integers and short strings—detailing its memory layout, header fields, entry encoding, previous_entry handling, and the cascade update mechanism that occurs when node sizes change.
The article explains that Python dictionaries are hash tables with average O(1) lookup, describes how their internal structure changed in Python 3.6 to separate indices and entries, resulting in ordered iteration and significant memory savings.
This article explains why Android memory optimization is needed, introduces background concepts such as garbage collection and memory leaks, reviews common tools like Memory Profiler, MAT and LeakCanary, details image‑related memory reduction techniques, and presents the open‑source KOOM framework for online OOM detection and analysis.
This article presents comprehensive Redis usage standards—including key naming conventions, avoiding big keys, efficient serialization, safe command usage, data persistence strategies, and operational recommendations—to ensure high performance, memory efficiency, and reliable service under heavy traffic.
This article explores the challenges of storing billions of mapping records for a DMP in Redis and presents practical solutions such as eviction policies, key bucketing, hash‑map optimization, fragmentation reduction, and specialized memory allocators to achieve millisecond‑level real‑time queries.
This article introduces the B16 hash table, a novel design that deliberately tolerates a higher hash‑collision probability and leverages SIMD instructions to achieve faster lookups, lower memory overhead, and a compact read‑only variant comparable to minimal perfect hash functions.
This article details concrete techniques for reducing Flutter app memory consumption, focusing on image cache sizing, resource cropping, local caching, asset compression, cache thresholds, and page‑stack management, while providing step‑by‑step experiments, code snippets, and visual illustrations to guide developers.
This guide explains how to lower the high memory usage of Spring Cloud applications on low‑end machines by adjusting per‑project JVM options in IntelliJ IDEA, detailing the necessary -Xmx, -Xms, -Xmn and -Xss parameters and showing the resulting performance improvement.
This tutorial shows how to dramatically reduce pandas DataFrame memory consumption—by up to 90%—by inspecting internal storage, downcasting numeric columns, converting object columns to categoricals, and specifying optimal dtypes while reading CSV data, all demonstrated on a large MLB game logs dataset.
This tutorial demonstrates how to analyze pandas memory consumption, downcast numeric columns, convert object columns to categoricals, and specify optimal dtypes when reading CSV files, achieving a reduction of nearly 90% in DataFrame memory usage while preserving full analytical capabilities.
This article explains a memory‑efficient, divide‑and‑conquer approach using hash partitioning and HashSet intersection to identify shared URLs between two massive 5‑billion‑record files while limited to just 4 GB of RAM.
This article details three memory‑saving techniques—reducing default thread stack size, releasing a 130 MB WebView reservation, and shrinking the ART heap—implemented via system‑API hooking and the Patrons library, and evaluates their performance impact on 32‑bit Android devices.
This article explains how to reduce memory usage of massive Java int/long arrays by applying real‑time compression, eliminating redundancy, using indexed buckets, offset storage, and a series of low‑level optimizations that boost TPS from dozens to over a thousand while preserving random‑access capabilities.
This article explains how a high‑traffic map service captures road features using client‑side computer‑vision models, details the deployment of many CNNs with the lightweight MNN engine on memory‑constrained devices, and shares practical memory‑saving techniques, inference scheduling, and error‑analysis methods.
This article walks through building a front‑end‑only tool that reads student data from Excel, creates customized poster images using SheetJS, html2canvas, and JSZip, and solves out‑of‑memory crashes by analyzing JavaScript heap usage, refactoring recursive code, and optimizing DOM cloning with ignoreElements.
This article examines the challenges of storing massive DMP ID mappings in Redis—including memory fragmentation, expansion, and latency constraints—and presents eviction, bucket‑hashing, and fragmentation‑reduction techniques to achieve efficient, real‑time, large‑scale key‑value storage.
The article surveys how major JavaScript engines represent the dynamic JSValue type—using QuickJS’s tagged unions, JavaScriptCore’s NaN‑boxing, SpiderMonkey’s nun‑/pun‑boxing, V8’s tagged pointers with compression, and iOS’s Objective‑C pointer tags—explaining each scheme’s memory layout, performance trade‑offs, and design rationale.
This article examines the challenges of storing massive DMP data in Redis, analyzes memory fragmentation, key‑size issues, and latency constraints, and presents practical strategies such as TTL eviction, bucket‑hashing, custom key compression, and fragmentation‑reduction techniques to enable scalable, real‑time querying.
The article analyzes the massive storage and performance challenges of a real‑time DMP cache built on Redis, outlines data characteristics and technical obstacles, and proposes eviction policies, bucket‑based hashing, and fragmentation‑reduction techniques with Java code examples to achieve billion‑scale in‑memory key‑value storage.
This article explains the bitmap concept, demonstrates how to store and query billions of integers using bit-level operations, introduces BitSet for dynamic bit vectors, and describes Bloom filters as probabilistic structures for fast, memory‑efficient membership testing in large‑scale data scenarios.
This article explains how bitmap and Bloom filter data structures reduce memory usage for large integer sets, demonstrates a Java bitmap implementation, and explores high‑concurrency cache design, consistency, penetration, and avalanche problems with practical mitigation techniques.
When migrating Spring Boot services to Spring Cloud on servers with constrained memory, understanding the JVM's default heap configuration and applying explicit -Xms and -Xmx parameters, along with using built‑in Java tools to inspect and tune runtime memory, can prevent out‑of‑memory failures.
This guide presents thirteen practical Redis best‑practice recommendations covering memory optimization, performance tuning, high reliability, routine operations, resource planning, monitoring, and security, offering concrete steps such as key length control, maxmemory configuration, lazy‑free, command selection, connection pooling, replication settings, and safe deployment to help developers and DBA operators run Redis efficiently and safely.
TRouter is a hybrid stack routing framework for Flutter that reuses a single engine through native Activity/ViewController containers, offloading page transitions and URL parsing to the native layer, clearing iOS view bitmaps and applying bytecode‑hooked Android fixes to dramatically reduce memory usage while keeping native modifications visible, low‑risk, and compatible with multiple Flutter SDK versions.
Given two files each containing 5 billion 64‑byte URLs (≈320 GB total) and only 4 GB of memory, the solution partitions the URLs by hash modulo 1000 into 1,000 smaller files, then uses hash sets to identify the intersecting URLs efficiently.
The article explains how Java's String class was re‑engineered in JDK 9 to use a byte‑array with a coder flag, enabling Latin‑1 encoding, halving memory consumption, reducing GC pauses, and boosting overall application performance.
This article presents common Redis interview questions covering cache penetration, breakdown, and avalanche, explains RDB and AOF persistence mechanisms with configuration commands, and details memory‑size tuning, LRU/LFU/RANDOM eviction policies, plus a practical flushAll scenario.