Tag Archives: kernel

内核的 shmall 和 shmmax 参数

shmall 是全部允许使用的共享内存大小,shmmax 是单个段允许使用的大小。这两个可以设置为内存的 90%。例如 16G 内存,16*1024*1024*1024*90% = 15461882265,shmall 的大小为 15461882265/4k(getconf PAGESIZE可得到) = 3774873。 修改 /etc/sysctl.conf。 kernel.shmmax=15461882265 kernel.shmall=3774873 kernel.msgmax=65535 kernel.msgmnb=65535 执行 sudo sysctl -p 可以使用 ipcs -l 看结果。ipcs -u 可以看到实际使用的情况。 —— Shared Memory Limits ——– max number of segments = 4096 max seg size (kbytes) = 15099494 max total shared memory (kbytes) = 15097856 min seg [...]

更新 kenerl 到了 2.6.28

之前用的是 tuxonice 的 kernel, 为了体验他的休眠。可是最近发现我基本就不用休眠。而且 tuxonice 的内核还一直停留在 2.6.26 上面。最近 2.6.28 火的不行,所以就给他升级了。 升级没遇到什么问题。新选择了 ext4 支持,等哪天把 fs 都修改到 ext4 去,不过好像有点折腾,呵呵。 gentoo-souces 也是支持的休眠的。想要在 gnome 下面休眠的话,安装一个 pm-utilus 这个包就可以了。在电源管理那里选休眠就可以了。不过发现 挂起 好像不支持,挂起了就不能唤醒了,很郁闷。我记得 tuxonice 下面挂起好像也不支持,不管他了。 那个号称革命性的 GEM 不知道什么时候能在 radeon 上面出现。等着吧。

使用 uvesafb

FB 就是 Frambuffer 了。直观一点说,使用之后,可以给 console 设置分辨率,可以在console下面看电影,看图? 在 Kernel 里面,ATI 显卡有个 Readonfb,使用后不需要修改 grub 就可以直接出现高分辨率的 console,但是他和 ATI 的 fglrx 驱动冲突,会导致死机,所以,基本没法子用,除非你不打算进 x。 uvesafb 以前叫做 vesafb-tng,似乎是从 kernel 2.6.23 开始改名的。使用这个也很简单了,参考作者的 web 页面。 有几个内核参数: Connector – unified userspace <-> kernelspace linker Graphics support —> Userspace VESA VGA graphics support General Setup —> Initial RAM filesystem and RAM disk (initramfs/initrd) support 设置为 [...]

linux tuning

地址 http://www.enigma.id.au/linux_tuning.txt # Linux kernel tweaking for performance and security on a busy Linux # server with a decent amount of memory. # # This file should be saved as /etc/sysctl.conf # You can source it manually if your system has booted by using: # sysctl -e -p /etc/sysctl.conf # # Paul Day, paul (at) [...]