��ǰ��������æ��ʱ��û�з����⼸�����̣��Դ�װ��2��mysql�Ժ�����������,�����м�����֪�����õĽ���,
google֮��,��֮
290 root 10 -5 0 0 0 S 1 0.0 1:40.26 kswapd0
1969 root 10 -5 0 0 0 D 0 0.0 165:27.61 kjournald
19080 root 15 0 0 0 0 S 0 0.0 0:21.40 pdflush
1.kswapd0
Linux uses kswapd for virtual memory management such that pages that have been recently accessed are kept in memory and less active pages are paged out to disk.
(what is a page?)…Linux uses manages memory in units called pages.
So,the kswapd process regularly decreases the ages of unreferenced pages…and at the end they are paged out(moved out) to disk
ϵͳÿ��һ��ʱ���ͻỽ��kswapd�������ڴ��Ƿ����ţ����������ţ���˯�ߣ���kswapd�У���2����ֵ,pages_hige��pages_low,�������ڴ�ҳ����������pages_low��ʱ��,kswapd���̾ͻ�ɨ���ڴ沢��ÿ���ͷų�32��free pages,ֱ��free page����������pages_high.
2.kjournald
EXT3�ļ�ϵͳ����־����,����3��ģʽ:
journal - logs all filesystem data and metadata changes. The slowest of the three ext3 journaling modes, this journaling mode minimizes the chance of losing the changes you have made to any file in an ext3 filesystem.����¼�����ļ�ϵͳ�ϵ�Ԫ���ݸı�,������һ��ģʽ,��
ordered - only logs changes to filesystem metadata, but flushes file data updates to disk before making changes to associated filesystem metadata. This is the default ext3 journaling mode.(Ĭ��ʹ�õ�ģʽ,ֻ��¼�ļ�ϵͳ�ı���Ԫ���ݣ����ڸı�֮ǰ��¼��־)
writeback - only logs changes to filesystem metadata but relies on the standard filesystem write process to write file data changes to disk. This is the fastest ext3 journaling mode.(������һ��ģʽ,ͬ��ֻ��¼�Ĺ���Ԫ����,�������ļ�ϵͳд���̽�����д��Ӳ��)
��ģʽEXT3�Ĺ���ģʽ��
vim /etc/fstab
/dev/hda5 /opt ext3 data=writeback 1 0��ϸ����:http://www.linuxplanet.com/linuxplanet/reports/4136/5/
3.pdflush
pdflush���ڽ��ڴ��е����ݺ��ļ�ϵͳ����ͬ��������˵,��һ���ļ����ڴ��н�����,pdflush��������д��Ӳ��.ÿ���ڴ��е�����ҳ��dirty page������10%��ʱ��,pdflush�ͻὫ��Щҳ�汸�ݻ�Ӳ��.���������ǿɵ��ڵ�,ͨ��/etc/sysctl.conf�е� vm.dirty_background_ratio�� Ĭ��ֵΪ10 Ҳ����
cat /proc/sys/vm/dirty_background_ratio �鿴��ǰ��ֵ
�˽���Щ�֣��ǵ���˼ �ɵ���˼ ������˼ �ĵ���˼