<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>wd and cc &#187; kernel</title>
	<atom:link href="http://wdicc.com/tag/kernel/feed/" rel="self" type="application/rss+xml" />
	<link>http://wdicc.com</link>
	<description>Happy every day...</description>
	<lastBuildDate>Wed, 01 Feb 2012 03:27:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>内核的 shmall 和 shmmax 参数</title>
		<link>http://wdicc.com/shmall-and-shmmax-kernel-paramaters/</link>
		<comments>http://wdicc.com/shmall-and-shmmax-kernel-paramaters/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 06:22:47 +0000</pubDate>
		<dc:creator>wd</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[kernel]]></category>

		<guid isPermaLink="false">http://wdicc.com/?p=497</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>shmall 是全部允许使用的共享内存大小，shmmax 是单个段允许使用的大小。这两个可以设置为内存的 90%。例如 16G 内存，16*1024*1024*1024*90% = 15461882265，shmall 的大小为 15461882265/4k(getconf PAGESIZE可得到) = 3774873。</p>
<p>修改 /etc/sysctl.conf。</p>

<div class="wp_syntax"><div class="code"><pre class="text">kernel.shmmax=15461882265
kernel.shmall=3774873
kernel.msgmax=65535
kernel.msgmnb=65535
执行 sudo sysctl -p</pre></div></div>

<p>可以使用 ipcs -l 看结果。ipcs -u 可以看到实际使用的情况。</p>

<div class="wp_syntax"><div class="code"><pre class="text">------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 15099494
max total shared memory (kbytes) = 15097856
min seg size (bytes) = 1
&nbsp;
------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767
&nbsp;
------ Messages: Limits --------
max queues system wide = 16
max size of message (bytes) = 8192
DEFAULT max size of queue (bytes) = 16384</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://wdicc.com/shmall-and-shmmax-kernel-paramaters/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>更新 kenerl 到了 2.6.28</title>
		<link>http://wdicc.com/upgrade-kenerl-to-2-6-28/</link>
		<comments>http://wdicc.com/upgrade-kenerl-to-2-6-28/#comments</comments>
		<pubDate>Sat, 27 Dec 2008 10:53:26 +0000</pubDate>
		<dc:creator>wd</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[tuxonice]]></category>
		<category><![CDATA[休眠]]></category>

		<guid isPermaLink="false">http://wdicc.com/?p=470</guid>
		<description><![CDATA[之前用的是 tuxonice 的 kernel, 为了体验他的休眠。可是最近发现我基本就不用休眠。而且 tuxonice 的内核还一直停留在 2.6.26 上面。最近 2.6.28 火的不行，所以就给他升级了。 升级没遇到什么问题。新选择了 ext4 支持，等哪天把 fs 都修改到 ext4 去，不过好像有点折腾，呵呵。 gentoo-souces 也是支持的休眠的。想要在 gnome 下面休眠的话，安装一个 pm-utilus 这个包就可以了。在电源管理那里选休眠就可以了。不过发现 挂起 好像不支持，挂起了就不能唤醒了，很郁闷。我记得 tuxonice 下面挂起好像也不支持，不管他了。 那个号称革命性的 GEM 不知道什么时候能在 radeon 上面出现。等着吧。]]></description>
			<content:encoded><![CDATA[<p>之前用的是 tuxonice 的 kernel, 为了体验他的休眠。可是最近发现我基本就不用休眠。而且 tuxonice 的内核还一直停留在 2.6.26 上面。最近 2.6.28 火的不行，所以就给他升级了。</p>
<p>升级没遇到什么问题。新选择了 ext4 支持，等哪天把 fs 都修改到 ext4 去，不过好像有点折腾，呵呵。</p>
<p>gentoo-souces 也是支持的休眠的。想要在 gnome 下面休眠的话，安装一个 pm-utilus 这个包就可以了。在电源管理那里选休眠就可以了。不过发现 挂起 好像不支持，挂起了就不能唤醒了，很郁闷。我记得 tuxonice 下面挂起好像也不支持，不管他了。</p>
<p>那个号称革命性的 GEM 不知道什么时候能在 radeon 上面出现。等着吧。</p>
]]></content:encoded>
			<wfw:commentRss>http://wdicc.com/upgrade-kenerl-to-2-6-28/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用 uvesafb</title>
		<link>http://wdicc.com/use-uvesafb/</link>
		<comments>http://wdicc.com/use-uvesafb/#comments</comments>
		<pubDate>Sun, 13 Apr 2008 00:20:31 +0000</pubDate>
		<dc:creator>wd</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[uvesafb]]></category>

		<guid isPermaLink="false">http://wdicc.cn/?p=408</guid>
		<description><![CDATA[FB 就是 Frambuffer 了。直观一点说，使用之后，可以给 console 设置分辨率，可以在console下面看电影，看图？ 在 Kernel 里面，ATI 显卡有个 Readonfb，使用后不需要修改 grub 就可以直接出现高分辨率的 console，但是他和 ATI 的 fglrx 驱动冲突，会导致死机，所以，基本没法子用，除非你不打算进 x。 uvesafb 以前叫做 vesafb-tng，似乎是从 kernel 2.6.23 开始改名的。使用这个也很简单了，参考作者的 web 页面。 有几个内核参数： Connector - unified userspace &#38;lt;-&#38;gt; kernelspace linker Graphics support ---&#38;gt; Userspace VESA VGA graphics support General Setup ---&#38;gt; Initial RAM filesystem and RAM disk (initramfs/initrd) support 设置为 [...]]]></description>
			<content:encoded><![CDATA[<p>FB 就是 Frambuffer 了。直观一点说，使用之后，可以给 console 设置分辨率，可以在console下面看电影，看图？</p>
<p>在 Kernel 里面，ATI 显卡有个 Readonfb，使用后不需要修改 grub 就可以直接出现高分辨率的 console，但是他和 ATI 的 fglrx 驱动冲突，会导致死机，所以，基本没法子用，除非你不打算进 x。</p>
<p><a href="http://dev.gentoo.org/~spock/projects/uvesafb/" target="_blank"> uvesafb</a> 以前叫做 vesafb-tng，似乎是从 kernel 2.6.23 开始改名的。使用这个也很简单了，参考作者的 <a href="http://dev.gentoo.org/~spock/projects/uvesafb/" target="_blank">web</a> 页面。</p>
<p>有几个内核参数：</p>

<div class="wp_syntax"><div class="code"><pre class="text">Connector - unified userspace &amp;lt;-&amp;gt; kernelspace linker
Graphics support ---&amp;gt; Userspace VESA VGA graphics support
General Setup ---&amp;gt;  Initial RAM filesystem and RAM disk (initramfs/initrd) support 设置为 /usr/share/v86d/initramfs
上面几个设置分别是
CONFIG_CONNECTOR=y
CONFIG_FB_UVESA=y
CONFIG_INITRAMFS_SOURCE=&quot;/usr/share/v86d/initramfs&quot;</pre></div></div>

<p>安装 klibc 和 v86d 。修改 grub，添加 video=uvesafb:1024&#215;768-32,mtrr:3,ywrap</p>
<p>如果遇到 &#8216;uvesafb: failed to execute /sbin/v86d&#8217; 的错误，可能是最后一个内核参数没有设置好的缘故。</p>
]]></content:encoded>
			<wfw:commentRss>http://wdicc.com/use-uvesafb/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>linux tuning</title>
		<link>http://wdicc.com/linux-tuning/</link>
		<comments>http://wdicc.com/linux-tuning/#comments</comments>
		<pubDate>Mon, 04 Jun 2007 01:47:22 +0000</pubDate>
		<dc:creator>wd</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://blog.wdicc.com/wordpress/2007/06/04/337/</guid>
		<description><![CDATA[地址 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) [...]]]></description>
			<content:encoded><![CDATA[<p>地址 <a href="http://www.enigma.id.au/linux_tuning.txt">http://www.enigma.id.au/linux_tuning.txt</a></p>

<div class="wp_syntax"><div class="code"><pre class="bash"><span class="co0"># Linux kernel tweaking for performance and security on a busy Linux</span>
<span class="co0"># server with a decent amount of memory.</span>
<span class="co0">#</span>
<span class="co0"># This file should be saved as /etc/sysctl.conf</span>
<span class="co0"># You can source it manually if your system has booted by using:</span>
<span class="co0"># sysctl -e -p /etc/sysctl.conf</span>
<span class="co0">#</span>
<span class="co0"># Paul Day, paul (at) bur.st</span>
<span class="co0">#</span>
<span class="co0"># Last updated 02/03/05 and tested on 2.6.9</span>
<span class="co0">#</span>
&nbsp;
<span class="co0"># Increase RPC slots</span>
sunrpc.tcp_slot_table_entries = <span class="nu0">32</span>
sunrpc.udp_slot_table_entries = <span class="nu0">32</span>
<span class="co0"># Increase size of RPC datagram queue length</span>
net.unix.max_dgram_qlen = <span class="nu0">50</span>
<span class="co0"># Log spoofed, source routed and redirects</span>
net.ipv4.conf.default.log_martians = <span class="nu0">1</span>
<span class="co0"># Don't accept source routes</span>
net.ipv4.conf.default.accept_source_route = <span class="nu0">0</span>
<span class="co0"># Don't send redirects</span>
net.ipv4.conf.default.send_redirects = <span class="nu0">0</span>
<span class="co0"># Source route verification on - incoming packets must match outgoing routing</span>
net.ipv4.conf.default.rp_filter = <span class="nu0">1</span>
<span class="co0"># Don't accept redirects</span>
net.ipv4.conf.default.accept_redirects = <span class="nu0">0</span>
<span class="co0"># Don't forward source routes</span>
net.ipv4.conf.default.mc_forwarding = <span class="nu0">0</span>
<span class="co0"># Disable forwarding </span>
net.ipv4.conf.default.forwarding = <span class="nu0">0</span>
<span class="co0"># Log spoofed, source routed and redirects</span>
net.ipv4.conf.all.log_martians = <span class="nu0">1</span>
<span class="co0"># Don't relay bootp</span>
net.ipv4.conf.all.bootp_relay = <span class="nu0">0</span>
<span class="co0"># Don't proxy arp for anyone</span>
net.ipv4.conf.all.proxy_arp = <span class="nu0">0</span>
<span class="co0"># Don't accept source route packets</span>
net.ipv4.conf.all.accept_source_route = <span class="nu0">0</span>
<span class="co0"># Don't send redirects</span>
net.ipv4.conf.all.send_redirects = <span class="nu0">0</span>
<span class="co0"># Source route verification on - incoming packets must match outgoing routing</span>
net.ipv4.conf.all.rp_filter = <span class="nu0">1</span>
<span class="co0"># Don't accept redirects</span>
net.ipv4.conf.all.accept_redirects = <span class="nu0">0</span>
<span class="co0"># Don't forward source routes</span>
net.ipv4.conf.all.mc_forwarding = <span class="nu0">0</span>
<span class="co0"># Don't enable forwarding</span>
net.ipv4.conf.all.forwarding = <span class="nu0">0</span>
<span class="co0"># Don't allow the arp table to become bigger than this</span>
net.ipv4.neigh.default.gc_thresh3 = <span class="nu0">2048</span>
<span class="co0"># Tell the gc when to become aggressive with arp table cleaning.</span>
<span class="co0"># Adjust this based on size of the LAN. 256 is suitable for most</span>
net.ipv4.neigh.default.gc_thresh2 = <span class="nu0">1024</span>
<span class="co0"># Adjust where the gc will leave arp table alone - set to 32.</span>
net.ipv4.neigh.default.gc_thresh1 = <span class="nu0">32</span>
<span class="co0"># Adjust to arp table gc to clean-up more often</span>
net.ipv4.neigh.default.gc_interval = <span class="nu0">30</span>
<span class="co0"># Increase TCP</span>
net.ipv4.neigh.default.proxy_qlen = <span class="nu0">96</span>
net.ipv4.neigh.default.unres_qlen = <span class="nu0">6</span>
<span class="co0"># Increase size of socket buffers</span>
net.ipv4.tcp_rmem = <span class="nu0">4096</span>	<span class="nu0">98304</span>	<span class="nu0">349520</span>
net.ipv4.tcp_wmem = <span class="nu0">4096</span>	<span class="nu0">65535</span>	<span class="nu0">262142</span>
net.ipv4.tcp_mem = <span class="nu0">98304</span>	<span class="nu0">262142</span>	<span class="nu0">393216</span>
<span class="co0"># Turn off sack</span>
net.ipv4.tcp_dsack = <span class="nu0">0</span>
<span class="co0"># Don't use ECN because too many sites have wacky routers that can't handle it`</span>
net.ipv4.tcp_ecn = <span class="nu0">0</span>
net.ipv4.tcp_reordering = <span class="nu0">3</span>
<span class="co0"># Turn off sack/fack</span>
net.ipv4.tcp_fack = <span class="nu0">0</span>
<span class="co0"># Enable bad error message Protection</span>
net.ipv4.icmp_ignore_bogus_error_responses = <span class="nu0">1</span>
<span class="co0"># Ignore broadcasts pings, could become part of a Smurf</span>
net.ipv4.icmp_echo_ignore_broadcasts = <span class="nu0">1</span>
<span class="co0"># But don't ignore directed pings</span>
net.ipv4.icmp_echo_ignore_all = <span class="nu0">0</span>
<span class="co0"># Widen local port range</span>
net.ipv4.ip_local_port_range = <span class="nu0">33000</span>	<span class="nu0">60000</span>
<span class="co0"># Bump up TCP socket queuer to help with syn floods</span>
net.ipv4.tcp_max_syn_backlog = <span class="nu0">2048</span>
<span class="co0"># Turn syn-cookie protection on</span>
net.ipv4.tcp_syncookies = <span class="nu0">1</span>
<span class="co0"># Drop it so lack of FIN times out quicker</span>
net.ipv4.tcp_fin_timeout = <span class="nu0">30</span>
<span class="co0"># How many times to retry killing an alive TCP connection</span>
net.ipv4.tcp_retries2 = <span class="nu0">15</span>
net.ipv4.tcp_retries1 = <span class="nu0">3</span>
<span class="co0"># Enable a fix for RFC1337 - time-wait assassination hazards in TCP</span>
net.ipv4.tcp_rfc1337 = <span class="nu0">1</span>
<span class="co0"># Drop keep-alive time</span>
net.ipv4.tcp_keepalive_time = <span class="nu0">3600</span>
<span class="co0"># Set number of times to retry a SYN-ACK in a half-open new connections</span>
net.ipv4.tcp_synack_retries = <span class="nu0">5</span>
<span class="co0"># Set number of times to retry SYN in a new connection</span>
net.ipv4.tcp_syn_retries = <span class="nu0">5</span>
<span class="co0"># Turn off sack</span>
net.ipv4.tcp_sack = <span class="nu0">0</span>
<span class="co0"># Enable really big (&gt;65kB) TCP window scaling if we want it.</span>
net.ipv4.tcp_window_scaling = <span class="nu0">1</span>
<span class="co0"># Turn off timestamps</span>
<span class="co0"># Turn this back on if you're on a gigabit or very busy network</span>
<span class="co0"># Having it off is one less thing the IP stack needs to work on</span>
net.ipv4.tcp_timestamps = <span class="nu0">0</span>
<span class="co0"># Increase number of incoming connections backlog</span>
net.core.somaxconn = <span class="nu0">512</span>
<span class="co0"># Bump optmem_max up</span>
net.core.optmem_max = <span class="nu0">20480</span>
<span class="co0"># Increase number of incoming connections backlog</span>
net.core.netdev_max_backlog = <span class="nu0">1024</span>
net.core.dev_weight = <span class="nu0">64</span>
<span class="co0"># Bump up default r/wmem to max</span>
net.core.rmem_default = <span class="nu0">262141</span>
net.core.wmem_default = <span class="nu0">262141</span>
<span class="co0"># Bump up max r/wmem</span>
net.core.rmem_max = <span class="nu0">262141</span>
net.core.wmem_max = <span class="nu0">262141</span>
<span class="co0"># Increase size of file handles and inode cache</span>
fs.file-max = <span class="nu0">209708</span></pre></div></div>

<p class="poweredbyperformancing">Powered by <a href="http://scribefire.com/">ScribeFire</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://wdicc.com/linux-tuning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

