又加了三台电脑的 nbench 测试成绩

这次把自己的笔记本和台式机,还有一台虚拟机服务器都跑了一下,得到了以下结果。

其中我的笔记本,Macbook Pro (2008 Early),内置了 Intel Core 2 Duo T8300 的处理器,得到测试冠军,工作站 HP XW4600 虽然使用的处理器是 2.5Ghz E7200 的,但是比起 2.4GHz 的 T8300,性能还是有一定差距的。所以不要迷信 Intel 处理器的主频,真的有差别。

跑自己的服务器纯粹是因为我的 Web server 在上面反应真的比较慢,所以跑了一下,那个 Xen 的版本比较老了,还是 3.0.x 的,新版本能够支持 Intel VT 和 AMD-V 技术,相信性能会好不少,因为是处理器直接支持虚拟化的,只是我手头暂时没有机器测试,RHEL 5.4 里将要内置的 KVM 也很值得期待。

Macbook Pro(T8300) Mac OS X 10.6.0 Beta1 20.190 37.898 22.963
HP XW4600(E7200) Fedora 11 17.013 36.669 16.797
RHEL in Xen(AMD 8356) RHEL 5.3 Running in Xen 11.694 14.412 9.201

详情请到 http://xuqingkuang.is-programmer.com/2006/10/10/nbench.6107.html 查看,测试的详细日志那里都有。

 

Posted by K*K Thu, 16 Jul 2009 12:32:26 -0400


在 Fedora 上安装并使用 Chromium

Chromium 官方只提供了 for 乌班兔的 deb 包,好在从 Solidot 上看到已经有好心人在 Fedora 上也编译了一份,经过试验运行起来没有问题,功能也已经比较完备了,可以满足最基本使用需求,速度却比 Firefox 要快了很多,基于对 Webkit 的好感,以后它就是我的主力浏览器了(这话前两天好像刚说过 :-p)。

Chromium running on Fedora 11

我也写了个的 repo 文件,以便于用 yum 升级,内容很简单,把下面内容以文件名 chromium.repo 存放到 /etc/yum.repos.d 里就好了:

[chromium]
name=Chromium build for Fedora $releasever - $basearch
baseurl=http://spot.fedorapeople.org/chromium/F$releasever/
enabled=1
gpgcheck=0 

如果想偷一把小懒的话,也可以去 http://www.box.net/shared/rbyeny0bge 里下载,并放到 /etc/yum.repos.d,不过 box.net 好像被墙了,可能需要翻墙。。。

然后在终端里运行 # yum install chromium,就可以了

Posted by K*K Mon, 29 Jun 2009 10:40:56 -0400


用 Synergy 共享两台电脑的键盘鼠标

情况:

因为公司另有一台性能很强劲的 Linux 工作站,自己有台 mac 笔记本,在两台电脑间来回切换让人很郁闷,所以就想让一套键盘鼠标在两个系统上都能使用上,把两台电脑当成一台电脑用。

之前用过 Synergy,所以又重新打起了它的主意,唯一和以前不同的是,现在我懒了很多,都不愿意用命令行来做这种配置工作了。。。 -_-#

安装:

Mac 从 http://sourceforge.net/projects/synergykm 上下载 SynergyKM,并且安装,会在 System Preferences 里增加 SynergyKM 一项。

Fedora 9 用 yum install quicksynergy synergy 来安装 Synergy 程序,然后会在 GNOME 菜单下的 internet 项下增加 QuickSynergy 一项。

配置:

我这里是把 Fedora 工作站当成服务器,共享它的键盘鼠标,而我的笔记本放在工作站的左边,所以在 QuickSynergy 的 Share 标签页左边写上 Macbook Pro 的主机名,然后点击 Execute。

如图:

Quick Synergy for Fedora

然后在 Mac OS X 的 System Preferences 里启动 SynergyKM,选择 Connect to shared keyboard and mouse,然后在 Client Configuration 里写上服务器的主机名或者 IP 地址,点上  Apply Now,然后再回到 General 标签页里,点击 Turn Synergy On,如果下面的 Status 显示了 Connected 则连接成功。

如图:

SynergyKM for Mac OS X

好了,现在可以试试把台式机的鼠标指针“跨过”屏幕左边,直接挪到左边的 Mac 上进行操作了。

不仅如此,Synergy 还能在两台电脑间共享剪贴板,真正是把两台电脑当成一台用。

不过好像有点 Bug,在 Fedora 机器上开着一个菜单的时候,鼠标是被局限在 Fedora 的机器上的。

Posted by K*K Wed, 19 Nov 2008 13:13:45 -0400


scribes 编辑器,不错,不错

自定义了很多 HTML 标签,总算用起来比较顺手了。

稍后把 javascript、python 和 css 的 templates 都完善一下,就发上来。

最好用这个地址看:

http://www.youtube.com/watch?v=0IbUjO3J64c&fmt=18

Posted by K*K Wed, 29 Oct 2008 14:17:00 -0400


用 Wine 将 Google Chrome 运行于 Linux 之上

如图:


运行平台是 Red Flag Desktop 6.0 SP1 Update。

环境是 wine 1.1.3 带 winetricks,安装后运行

$ winetricks riched20 riched30 flash allfonts

安装控件和 Flash 插件。

然后从网上下载 Google Chrome(从前一篇日志的地址),并安装,安装时需要 root 帐户(但不推荐用 root 帐户平时使用系统),可以用 sudo 切过去然后再改变文件的所有者和路径来改回普通用户。

安装后选择不要立刻启动 Chrome,否则会崩溃。

需要编辑一下桌面上的“谷歌浏览器.desktop”文件,把 Exec 那行末尾添上:
--new-http --in-process-plugins

例如:
Exec=env WINEPREFIX="/home/xqkuang/.wine" wine "C:\\windows\\profiles\\xqkuang\\Local Settings\\Application Data\\Google\\Chrome\\Application\\chrome.exe" --new-http --in-process-plugins

然后再把 Windows 中的 simsun.ttc 和 simhei.ttf 拷贝出来,放到 ~/
.wine/dosdevices/c:/windows/Fonts 路径下,这样就可以显示中文了。

然后点击桌面上图标就可以运行了。

不过目前仍然存在一些问题:

https 协议似乎无法访问,会导致一个“错误2(net::FAILD): 未知错误”。
标签页拖出来以后是一个黑块。

不过浏览普通网页够用了,所以可以先凑合用着。

主要参考了 LinuxTOY 这篇文章

Posted by K*K Fri, 05 Sep 2008 15:07:00 -0400


以普通用户编包

RPM:

## 建目录

$ cd ~
$ mkdir rpm
$ cd rpm
$ ls /usr/src/redflag/ | xargs mkdir -pv
mkdir: 已创建目录 “BUILD”
mkdir: 已创建目录 “RPMS”
mkdir: 已创建目录 “SOURCES”
mkdir: 已创建目录 “SPECS”
mkdir: 已创建目录 “SRPMS”
$ cd RPMS
$ ls /usr/src/redflag/RPMS | xargs mkdir -pv
mkdir: 已创建目录 “athlon”
mkdir: 已创建目录 “i386”
mkdir: 已创建目录 “i486”
mkdir: 已创建目录 “i586”
mkdir: 已创建目录 “i686”
mkdir: 已创建目录 “noarch”

## 写 rpmmacros 定义变量

echo "%_topdir $HOME/rpm" > ~/.rpmmacros

## 开始 rpm -ivh xxx.src.rpm 开始编包吧。

Portage:

写一个 Overlay ;-)

Posted by K*K Mon, 01 Sep 2008 11:18:00 -0400


Gentoo 和 Windows 时钟同步

Windows 时钟和 Linux 时钟其实都是分为了系统时钟和硬件时钟的,硬件时钟存储于 BIOS 内部,而系统时钟存储于内核里,这两者的区别是系统时钟往往具有时区功能,而这两种操作系统对于时钟的处理方式却是不一样的,Windows 的系统时钟与硬件时钟同步,而 Linux 系统中的硬件时钟往往是格林尼治时间(GMT),而系统时钟才是真正的本地时间。

这一区别导致了在双系统的电脑中,Windows 的时钟往往比 Linux 慢 8 个小时,如果 Linux 直接设置为本地时间(localtime),运行 date 命令时又会出现 Timezone should be set, see zic manual page 的提示,其实这是有办法解决的。

  • 第一种办法是使 Windows 使用 GMT 的硬件时钟,可以将下面内容另存为注册表文件(.reg)导入,或者直接在注册表编辑器(regedit)中修改:

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
         "RealTimeIsUniversal"=dword:00000001
  • 第二种办法是将 Linux 使用与硬件时钟同步的系统时钟,同时设置好时区

    首先设置好本地时区

    # zic -l Asia/Shanghai

    其次设置 /etc/conf.d/hwclock(Gentoo 的 Baselayout 2 OpenRC 系统),修改其中的 clock 字段:

    clock="local"
    修改为
    clock="GMT" # 是的,没有看错,虽然注释称双系统时设置需要设置成 local,但实际上只有设置成 GMT 时 Linux 才能将硬件时钟作为系统时钟使用。

Posted by K*K Fri, 04 Jul 2008 13:55:00 -0400


Everes 0.5 for Loongson(beta1) 五一发布

做了半年了,总算出来了。

http://www.linux-ren.org

Posted by K*K Wed, 30 Apr 2008 22:53:00 -0400


Optimization DRI for double performance

X have some options for better work, most time X just use the universality options for run on most computer.
But you can tweak them. With the best result, you will get the double performance.

My system is Gentoo 2006.1 with X.org Server 1.1.1-r3 and xf86-video-ati 6.6.3 with DRI(Direct Render Interface), also I have the beryl 0.1.4 and AIXGL for the 3D desktop test.
Hardware is Powerbook pre-High definition, G4 1.67 and ATI 9700 with 128M.

Let's see the default Display adapter configuration.

Section "Device"
Identifier "Card0"
Driver "ati"
VendorName "ATI Technologies Inc"
BoardName "RV350 [Mobility Radeon 9600 M10]"
EndSection


The frames per seconds benchmark with glxgear looks like below.

2007-01-09-114743_663x354_scrot

Add some options in this device section for tweak.

Option "AGPMode" "4"
Option "UseFBDev" "false"
Option "AGPFastWrite" "true"
Option "EnablePageFlip" "true"
Option "DynamicClocks" "true"
Option "RenderAccel" "true"


Let's bechmark and see it again.

2007-01-09-114539_665x354_scrot

Wow. double performance !

How about these options works in the full hardware acceleration berly ?

2007-01-09-115107_669x363_scrot

Oh, it back to half and unstable. But I think it's the free ati driver's problem.
I feel Intel's GMA series open source driver is much better and stable than it, I will also test it if I have time.

OK, What's these options and value means ?

Option "AGPMode" "4"
AGPMode define the bandwidth of the AGP bus, the 4 means 4 times than the default AGP bus bandwidth, the defualt AGP running on 66Mhz with 266MB/s bandwidth, and Xorg will auto decide in 1X in default, you can tweak this option for more bandwith, the highest value of this option is 8 but it's need you conform your hardware support it.

Option "UseFBDev" "false"
It's a IMPORTANT option.
Most display adapter support and universal driver mode called framebuffer. It create a spool in memery and map it to the screen pixel, it's a FB device. Xorg write data into this spool, and the the driver read from this spool and write the data to the screen. it's not fully optimized.
ATI driver support a DMA(Direct Memery Access) mode, Xorg can write the data into the memory of the display adapter, it means Xorg can write to screen skip the memory spool of the FB device.

Option "AGPFastWrite" "true"
Fast write option looks like FBDev, I't also a memery access mode of display adapter.
It's skip memory access and write data to display adapter directly.

Option "EnablePageFlip" "true"
Enable Page Flip will increases performance, it tweak the memory access mode.
This option will be disabled if EAX architecture is in used.

Option "DynamicClocks" "true"
DynamicClock is "Intel SpeedStep" technology for display chips. it adjust the performance of display adapter only for save energy.

Option "RenderAccel" "true"
RenderAccel looks like it name, enable it for Render Acceleration Mode.
This option is default enabled.

Other options will increases performance more, I will do more around it and blog it more.

Posted by K*K Tue, 09 Jan 2007 19:57:00 -0400


COCOTRON

Cocotron 是由 Christopher Lloyd 编写的一套,相当于 Mac OS X AppKit 和 Foundation 在其它平台上的实现,通过它使用 Objective C 编译器将能够同时在 Mac OS X/Windows/Linux 上运行。

想法很好,但是问题是,Mac OS X 的菜单位于屏幕顶端,其它平台的菜单一般在窗口的标题栏下。

我还没试,先不乱猜测。

Right here: http://www.cocotron.org
Cocotron

Posted by K*K Wed, 27 Dec 2006 10:15:00 -0400