首页 | 资讯动态 | linux基础 | 系统管理 | 网络管理 | 编程开发 | linux数据库 | 服务器技术 | linux相关 | linux认证 | 嵌入式 | 下载中心 | 专题 | linux招聘 | HR | 镜像
OKLinux中文技术站
·设为首页
·加入收藏
·联系我们
系统管理: 中文环境 系统管理 桌面应用 内核技术 | Linux基础: 基础入门 安装配置 常用命令 经验技巧 软件应用 | Linux数据库: Mysql Postgre Oracle DB2 Sybase other
网络管理: 网络安全 网络应用 Linux服务器 环境配置 黑客安全 | 编程开发: PHP CC++ Python Perl Shell 嵌入式开发 java jsp | PHP技术: PHP基础 PHP技巧 PHP应用 PHP文摘
搜索中心 Linux招聘 Linux专题 Apache | Linux相关: 硬件相关 Linux解决方案 Linux认证 企业应用 其它Unix | 相关下载: 资料下载 参考手册 开发工具 服务器类 软路由 其它
 技术搜索:
会员中心 注册会员 高级搜索  
  → 当前位置:首页>linux数据库>其他>正文

Linux 64-bit, MySQL, Swap and Memory

http://www.oklinux.cn  2009-06-07  Linux社区    会员收藏  游客收藏  【 】 
您查看的文章来源于http://www.oklinux.cn

The VM for Linux prefers system cache over application memory. What does this mean? The best way I can explain is by example.

Imagine you have 32 GB of RAM

MySQL is set to take 20 GB of RAM for a process based buffer and up to 6M for the various thread buffers.

Over a period of time the box swaps. The only thing that is running is mysql and its memory size is around 21GB for resident memory. Why does swap grow when there is plenty of memory? The reason is when a memory alloc is needed (thread based buffer is tickled) the VM will choose to use swap over allocating from the system cache, when there is not enough free memory.

DO NOT TURN OFF SWAP to prevent this. Your box will crawl, kswapd will chew up a lot of the processor, Linux needs swap enabled, lets just hope its not used.

So how do you stop Nagios pages because of swap usage? Well if you have a few choices.

reboot the box

or

stop mysql && swapoff -a;swapon -a;

or just

swapoff -a;swapon -a;

Doing the latter command is rather scary and fun at the same time. Because you can either crash mysql or not. I just did the swap* commands live, I was very certain nothing was using swap and it worked. YAY no more pages and I didn't have to shut down the service!


上一篇:Linux/UNIX为什么比Windows安全   下一篇:openSUSE 11.1下安装MySQL 5.0.22

收藏于收藏夹】 【评论】 【推荐】 【打印】 【关闭
相关文档
·openSUSE 11.1下安装MySQL 5.0.22
·Linux下编译安装第二个MySQL
·Linux Oracle 10g 新手笔记
·InnoDB与Oracle单行存储长度对比
·MySQL与Oracle一些小区别
·Ubuntu下成功安装Oracle学习备忘录
·Oracle中查询rownum和rowid的区别
·Linux中MySQL的数据文件转移位置的问题解决
·三招让Oracle表列管理更加简单
·解决系统从Oracle到Sybase的迁移
·TSM 5.3 Linux Oracle安装配置
·Ubuntu 下 Oracle 10g 的导入与导出
·Ubuntu MySQL插入中文出错
·在HP Unix 下Oracle的控制和管理
·Linux下用Perl进行MySQL数据库开发
·将Oracle表空间升级为本地托管模式
发表评论
密码: 匿名评论
评论内容:

(不超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规)
 
  最新文档
·Ubuntu下成功安装Oracle学习备忘录
·MySQL与Oracle一些小区别
·InnoDB与Oracle单行存储长度对比
·Linux Oracle 10g 新手笔记
·Linux下编译安装第二个MySQL
·openSUSE 11.1下安装MySQL 5.0.22
·Oracle中查询rownum和rowid的区别
·Linux中MySQL的数据文件转移位置的问题
·三招让Oracle表列管理更加简单
·解决系统从Oracle到Sybase的迁移
·TSM 5.3 Linux Oracle安装配置
·Ubuntu 下 Oracle 10g 的导入与导出
  阅读排行
·Linux下安装Oracle数据库完整笔记
·Oracle建表过程初学
·MySQL导入导出.sql文件步骤
·Oracle 建立临时表语法及使用技巧
·Linux平台下启动oracle 11g EM控制台
·Linux平台下配置MySQL主从复制
·RHEL5.1 下安装Oracle 10.2.0.1及常见
·Mysql JDBC驱动版本与Mysql版本的对应
·Linux系统下启动MySQL的命令及相关知识
·关于MySQL事务处理学习
·Oracle10g RAC for Linux配置全过程
·Linux操作系统下MySQL的卸载、安装全过
·手工配置Oracle 10G Enterprise Manage
·Linux系统中Oracle数据库的用户权限
·向MySQL插入数据乱码解决办法
网摘收藏: