2012年3月5日 星期一

vm.swappiness



vm.swappiness is a tunable kernel parameter that controls how much the kernel favors swap over RAM. At the source code level, it’s also defined as the tendency to steal mapped memory. A high swappiness value means that the kernel will be more apt to unmap mapped pages. A low swappiness value means the opposite, the kernel will be less apt to unmap mapped pages. In other words, the higher the vm.swappiness value, the more the system will swap.

The default value I’ve seen on both enterprise level Red Hat and SLES servers is 60.

step of modify:
sysctl -w vm.swappiness=0 (default: 60)
swapoff -a
swapon -a

ADD  vm.swappiness=0  to  /etc/sysctl.conf

References:
What Is the Linux Kernel Parameter vm.swappiness?
http://overinfinityresearch.blogspot.com/2008/09/ubuntu804.html

2012年2月17日 星期五

英文日期寫法


a) 23 April 1616
b) 23rd April, 1616                            
c) April 23, 1616
d) April 23rd 1616


1)   [西元1616年4月23日]在英式傳統的寫法是[ 23rd April, 1616 ]。
2)   [西元1616年4月23日]在美式傳統的寫法是[ April 23, 1616 ]。
3)   現代的寫法a), b), c), d)都可以,中間有無[ , ]都可以,但是絕對不能先寫西元。



資料來源

2011年12月1日 星期四

Usage of nvidia-smi

## show GPU short messages
nvidia-smi -L

## Display GPU detail info
nvidia-smi -q

## Disable GPU ECC memory
nvidia-smi --ecc-config=0
Reboot required.

## Set MODE for compute applications
##  0/DEFAULT
##  1/EXCLUSIVE_THREAD
##  2/PROHIBITED
##  3/EXCLUSIVE_PROCESS
nvidia-smi --compute-mode=3

2011年9月26日 星期一

英文標點符號

英文標點符號

.
句號
period
,
逗號
comma

分號
semicolon

冒號
colon

問號
question mark

驚嘆號
exclamation point
“ ”
雙引號
double quotation mark
‘ ’
單引號
single quotation mark

連字號
hyphen
––
破折號
dash
( )
括號
parenthesis
[ ]
方括號
square bracket
...
刪節號
ellipsis
/
斜線
slash
`
省略號
apostrophe

2011年9月22日 星期四

wxPython

## Install wxPython in CentOS 5.5

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
yum install wxPython.x86_64 wxPython-devel.x86_64

[references]
wxPython API

wxPyWiki
http://wiki.wxpython.org/FrontPage
http://wiki.wxpython.org/AnotherTutorial

LDS株式會社 blog
The wxPython tutorial
宅學習 python blog
Image Processing in Python
wxPython自製Control : 用Matplotlib畫圖表的FigurePanel
wxPython Programming Tutorial

http://wiki.pastwind.org/home/python-cheng-shi-yu-yan
http://garywlee.blogspot.com/2007/10/wxpython.html