- 0
- 0
- 约6.2千字
- 约 4页
- 2023-04-25 发布于上海
- 举报
Disclaimer :
Disclaimer : The original version of this article was first published on IBM developerWorks, and is property of Westtech Information Services. This document is an updated version of the original article, and contains various improvements made by the Gentoo Linux Documentation team.
This document is not actively maintained.
Maximum swappage
1. Getting the most out of swap
When you set up a brand new Linux server, do you create a single 128 MB swap partition? If so, did you know that you are severely limiting swap performance? Would you like to increase swap performance by several orders of magnitude, and to create swap partitions larger than 1 GB? Its possible, requiring no kernel patches or special hardware, just pure geek know-how!
Some of you may not really care about swap. After all, Linux systems are typically very memory efficient, and swap is often barely touched. While often true on desktop systems, servers are another story. Because servers may handle unexpected stresses, such as runaway processes, denial of service attacks, or even the Slashdot effect, they need to have adequate high-speed swap so that they do not grind to a halt and possibly crash when all physical memory (and then some) is exhausted.
Still not convinced that this is a big deal? Ill show you how easy it is to bring down a server by launching a massive amount of new processes.
Warning:
Warning: Please, if you try this, do it only on a non-production server that you actually administer!
Lets say you have two customized grep commands in /usr/bin, called bobgrep and jimgrep. Now, lets assume that bobgrep is simply a shell script that calls the ELF executable jimgrep, as follows:
Code Listing 1.1: The bobgrep script #!/bin/bash
Code Listing 1.1: The bobgrep script #!/bin/bash
jimgrep -r $*
Everything looks good so far, but what happens if jimgrep gets accidentally replaced with a symbolic link to bobgrep? Well, in that case, calling bobgrep or jimgrep will cause an infinite loop,
您可能关注的文档
- 06001惠港酒店发文格式.docx
- 06005 统一打卡通知.docx
- 06092工作分析八套试卷 答案.docx
- 10000汉字起笔部首表.docx
- 11000地形测量技术设计.docx
- 20000字起笔部首检字表.docx
- 20148小继教培训心得体会.docx
- 20151人教版三年级数学上册教学工作总结.docx
- 20165理论题分析和总结.docx
- 20192广东公需课 中华传统美德.docx
- 中国国家标准 GB/Z 37551.300-2026海洋能 波浪能、潮流能及其他水流能转换装置 第300部分:河流能转换装置发电性能评估.pdf
- GB/T 44937.3-2025集成电路 电磁发射测量 第3部分:辐射发射测量 表面扫描法.pdf
- 中国国家标准 GB/T 44937.3-2025集成电路 电磁发射测量 第3部分:辐射发射测量 表面扫描法.pdf
- 《GB/T 44937.3-2025集成电路 电磁发射测量 第3部分:辐射发射测量 表面扫描法》.pdf
- 中国国家标准 GB/T 44937.1-2025集成电路 电磁发射测量 第1部分:通用条件和定义.pdf
- GB/T 44937.1-2025集成电路 电磁发射测量 第1部分:通用条件和定义.pdf
- 《GB/T 44937.1-2025集成电路 电磁发射测量 第1部分:通用条件和定义》.pdf
- 中国国家标准 GB/T 4937.37-2025半导体器件 机械和气候试验方法 第37部分:采用加速度计的板级跌落试验方法.pdf
- 《GB/T 4937.10-2025半导体器件 机械和气候试验方法 第10部分:机械冲击 器件和组件》.pdf
- 中国国家标准 GB/T 44937.2-2025集成电路 电磁发射测量 第2部分:辐射发射测量TEM小室和宽带TEM小室法.pdf
最近下载
- 新人教版九年级上册初中化学全册重点习题课件.pptx VIP
- 2025年全国《考评员》专业技能鉴定考试题库与答案.docx VIP
- 招商定位—2018九江铜锣湾广场总体发展思路与招商汇报方案.pptx VIP
- 新冀教版九年级下册初中数全册教学课件.ppt VIP
- (高清版)B-T 23331-2020 能源管理体系 要求及使用指南.pdf VIP
- NB∕T 20596-2021 压水堆核电厂控制区墙体孔洞辐射防护封堵准则.pdf
- 轧制与退火工艺对铜铝复合板结合性能的多维度解析.docx VIP
- geogebra入门_简体中文新.pdf VIP
- 便携式无人机探测和反制系统编制说明.docx VIP
- 保障农民工工资支付条例(2020版)培训解读课件.pptx VIP
原创力文档

文档评论(0)