Linux圣战:序幕

By , September 30, 2008 10:11 pm

English Version

Linux阵营的大师们最近比较活跃。

今年7 月15日,Linus Torvalds在Linux内核邮件列表里将极度关注安全问题的OpenBSD开发人员戏称为“一群只会手淫的猴子”。9 月17日,著名内核维护人员Greg Kroah在Linux 开发人员研讨会(Linux Plumbers Conference 2008)上发表主题演讲,谴责维护Ubuntu发行版的Canonical公司对Linux 社区的贡献太少,是Linux 社区的“害群之马”。9 月24日,Linux基金会执行总监Jim Zemlin在一篇发表在InfoWorld的文章中断言“(操作系统)的未来属于Windows和Linux”以及“Sun 公司的Solaris已经濒临死亡”。该文章还“不小心”地一稿两投,同时出现在纽约时报的网站上。

是什么使得Linux 大师们干劲十足,不仅攻击开放源代码阵营里的其他成员,甚至包括同在Linux 阵营里面的兄弟姊妹?

Linus Torvalds和Jim Zemlin攻击OpenBSD和Solaris自然有其充分的理由。Linux不是Unix,而是Unix的竞争者。尽管Linux基金会的首席平台战略家Ted Tso认为ZFS和DTrace出类拔萃,并不影响Jim Zemlin将其贬得一文不值。Linux基金会的白金赞助商毕竟囊括了一大票Sun公司的竞争对手,譬如HP、IBM、Oracle和Novell。尽管近些年来Sun公司在财务上不太景气,Solaris操作系统的总装机量依然超过市面上任何一个Unix/Linux商业发行版。2005年Sun公司发布OpenSolaris项目之后,原本属于Linux阵营的一大票开发人员对其产生了浓厚的兴趣,越来越多的人正在转向OpenSolaris作为开发桌面。在Solaris市场份额逐步增长的当头发出“Solaris已经濒临死亡”这样的断言,只能够被解释为Jim Zemlin正在演练其新近从微软那里学到的恐吓与怀疑(FUD)战略。

可是Greg Kroah为什么要向Canonical开火呢?难道Ubuntu不是Linux大家庭中的兄弟姊妹么?

“依赖于Linux的公司必须向Linux社区作出贡献,不然就是Linux社区的害群之马。”就如同一位严厉的父亲训斥他顽皮的小孩,Greg Kroah鼓励那些“工作在不鼓励贡献的公司的开发人员”尽快跳槽。为了支持他的观点,Greg Kroah列举了过去三年来各个公司对Linux内核所作出的贡献。在总共99,324个内核补丁中,Canonical以100个补丁排名79,而Greg Kroah所在的Novell公司以7222个补丁排名第五。很可惜的是,Greg Kroah忘记了Canonical一共只有130名领取薪水的雇员,而Novell一共有4100名(RedHat的总雇员数是2200)。此外,Suse Linux出现于1994年,而Ubuntu Linux出现于2004年。

由于无法确切地知道一家公司当中哪些雇员从事开发工作或者是市场和销售方面的工作,更无法确切地知道哪些雇员是从事内核开发或者是其他领域的开发工作,因此,泛泛地用平均每个雇员对某个领域所作出的贡献可能是一种比较合理的评估方法。 根据Greg Kroah所给出的数据,我们可以更深入地比较一下Redhat、Novell和Canonical的雇员平均对Linux内核所作出的贡献:

Redhat: 11846/2200 = 5.38
Novell: 7222/4100 = 1.76
Canonical: 100/130 = 0.77

以上数据表明,虽然Canonical雇员人均对Linux内核方面所作出来的贡献确实比较小,但是和Novell基本上是一个数量级上的。最突出的是Redhat,对Linux内核的人均贡献是Novell的3倍,当之无愧是Linux内核方面的老大。考虑到近些年来Redhat和Novell研发投入的重点都在服务器领域,涉及到内核的部分比 较多,对内核方面的贡献比较大是理所当然的。而Canonical作为一家新创公司,其兴趣点则集中在桌面领域,涉及内核的部分相对来说比较少,所作出的贡献比较少也是可以理解的。由此可见,Greg Kroah在演讲中所给出的数据非常具有误导性,过分地指责Canonical显然并不公平。

根据Richard Stallman的定义,自由软件中的“自由”包括如下含义:

  • 0:运行该软件的自由。
  • 1:学习、研究和修改该软件源代码的自由。
  • 2:重新分发该软件的自由。
  • 3:发布该软件之修改版本的自由。

也就是说,只要Canonical公布了他们的源代码,就算是合法地使用GNU/Linux了。事实上,Canonical做到了这一点。如果我们试图要求Canonical更多一点社会责任感,更加积极主动地将他们的修改提交到上游的项目中,那么我们提供给Canonical的可能是嗟来之食而不是自由软件了。

如果继续争论Canonical是否应该给Linux社区作出更多贡献,我们可能已经错过了问题的焦点。过去几年中,Redhat和Novell两家公司投入巨资以提高Linux操作系统在服务器端的性能。他们相信未来开放源代码经济的主流必定是服务器所带来的服务合同。出乎意料的是,Ubuntu凭借相对友好的桌面吸引了大量初级和中级开发人员,迅速成为Linux市场的一匹黑马。Canonical对于Linux社区的贡献,不是往Linux内核、glibc或者是X.org提交了多少个补丁抑或是多少行代码,而是数以万计的开发人员在Ubuntu的影响下从Windows桌面转往(或者是考虑转往)Linux桌面。只要你对Ubuntu感兴趣,你就可以免费索取一张 -- 甚至是多张 -- Ubuntu安装光盘。这一举措不仅赢得了入门级Linux用户的欢心,也从Redhat和Novell那里抢走了不少铁杆粉丝。

如今的开放源代码运动已经全然不是十年前的那个样子了。就如Greg Kroah所指出的那样,我们在一个Linux发行版中见到的大部分组件 -- 譬如说Linux内核、glibc、gcc、X.org、binutils等等 -- 大都是由那些从商业公司领取薪水的开发人员维护的,来自业余爱好者的贡献仅仅占很小的比例。商业公司投资开放源代码项目的目的与非盈利性组织或者是业余爱好者有较大的不同。他们更在乎的是经济回报而不是道德水平的提高,不然的话也就不会有2006年Novell与微软公司那笔臭名昭著的交易了。这种经济上的回报可以具体化为公司形象或者是知名度的提升,市场份额的提高,或者是对销售额的影响。长年以来,Novell和少数几个主流发行版占据了Linux市场份额的大部分,剩下的则有一些非主流的发行版瓜分。2004年Ubuntu加入后,尽管使用Linux操作系统的开发人员越来越多,Redhat和Novell都有不少市场份额丢给了Canonical。Canonical还推出针对Ubuntu用户的企业级服务,其售价Windows Vista的企业级服务还要贵一些。更让Novell感到恼火的是,这么贵的服务竟然还有公司要买!

Canonical老兄,因为你对Linux社区的贡献实在是太少,所以我们只能够将你当作外人。假如你仅仅是用Linux赚一点小钱养家糊口,我们也不好说你什么。问题是你竟然想要用我们的劳动成果来赚大钱,这也太过分了一点。

这就是被Ubuntu这个害群之马所破坏的Linux生态环境。

越来越多的公司已经意识到开放源代码是推销其产品和技术的有力武器。当OpenSolaris加入开放源代码的阵营,开发人员在Linux和BSD家属之外又多了一个选择。同时又有象Canonical这样的公司涌现出来,紧紧把握住那些不为其他厂商所注意的市场机会。操作系统这个领域的竞争,必将是愈演愈烈。所谓Windows(在桌面端)与Linux(在服务器端)和平共处的美好愿望,只能够是贻笑大方而已。我们今天所看到的,仅仅是Linux圣战的序幕。更精彩的战争,还远远没有开始。

尾注:尽管本文作者就职于Sun 公司,本文仅代表作者自己的观点,而不代表其雇主Sun 公司的观点。

2008.09. 30,初稿
2008.10.01,根据wonzi@newsmth所提供的额外数据修改

The Linux Crusade: A Prelude

By , September 30, 2008 8:43 pm

(中文版本)

The Linux folks seems to be pretty active recently.

On July 15, on the public Linux kernel maillist, Linus Torvalds described the OpenBSD crowd as “a bunch of masterbating monkeys” regarding their concentration on security issues. On September 17, during his keynote presentation on the Linux Plumbers Conference 2008, Greg Kroah criticized Canonical, the company behind Ubuntu, for not contributing back to the Linux community. Then, on September 24, in an article published on InfoWorld (which was “accidentally reprinted” on the New York Times), Jim Zemlin (Executive Director of the Linux Foundation) declared that “the future (OS) is Linux and Windows” and “Sun Solaris is on its deathbed”.

When was the last time the Linux folks became so aggressive, launching warfares against other members in the open source movement, and brothers and sisters in the Linux ecosystem as well?

I am not extremely interested in why the Linus Torvalds / Jim Zemlin attacked OpenBSD and Solaris. Linux is not Unix, but competitors of Unix. Therefore it is understandable for Jim Zemlin to denounce ZFS and DTrace on Solaris while Ted Tso (the Linux Foundation’s Chief Platform Strategist) wants them in the Linux kernel. After all, the platinum members of the Linux Foundation include Sun’s business opponents like HP, IBM, Oracle, and Novell. Despite the fact that Sun did not do well financially in recent years, the Solaris operating system still has the largest installed-base among all commercial Unix/Linux distributions. Three years after Sun unveiled the OpenSolaris project (in 2005), there have been tremendous interests coming from people previously using Lunix, and the adoption of OpenSolaris as a development desktop is accelerating. The assertion that “Solaris is on its deathbed” while its market share is growing can only be explained as a FUD (Fear, Uncertainty, and Doubt) strategy, which was learned by Jim Zemlin from Microsoft only recently.

But why Greg Kroah set fire on Canonical? Isn’t Ubuntu a brother or sister of the Linux family?

“Companies who rely on Linux must contribute, or they are at the whim of others.” Just like a father reproaching his naughty child, Greg Kroah kindly advised “developers who are not allowed to contribute to Linux should change jobs”. To support his argument, Greg Kroah provided a ranking of the companies contributing to the Linux kernel during the past 3 years. Among all 99,324 patches, Canonical ranked number 79 with 100 patches, while Novell (Greg Kroah’s employer) ranked number 5 with 7222 patches. Well, Greg Kroah forgot the fact that Canonnical has only 130 paid employees, while Novell has about 4100 (Redhat has 2200). Also Suse Linux has been around since 1994, while Ubuntu, since 2004.

It is difficult to know how many employees belongs to engineering or marketing / sales in a company, even more difficult to identify the number of kernel developers or desktop developers. Therefore, it might be fair to measure a company’s contribute to a certain area with the average contribution per employee. Based on the data provided by Greg Kroah, we can compare the average contribution from Redhat, Novell and Canonical to the Linux kernel, as below:

Redhat: 11846/2200 = 5.38
Novell: 7222/4100 = 1.76
Canonical: 100/130 = 0.77

Clearly the average contribution from Canonical employees to the Linux kernel is relatively small, but still on the same scale as that of Novell. Redhat is obviously the most outstanding contributor, its average contribution is 3 times as big as that of Novell. Considering the fact that in recent years Redhat and Novell invest heavily on server-side technologies, which has a lot to do with the Linux kernel, it is reasonable that they contribute more to the Linux kernel. Canonical as a startup that focuses on desktop, might has less contact with the Linux kernel, therefore not being able to contribute more. Nonetherless, the data provided in Greg Kroah’s presentation was extremely misleading, and unfair for Canonical.

Free software, as defined by Richard Stallman, has four degrees of freedom.

  • Freedom Zero is the freedom to run the program however you wish.
  • Freedom One is the freedom to study the source code of the program and to change it to make the program do what you wish.
  • Freedom Two is the freedom to distribute copies of the program to others, when you wish. Now this includes republication of the program.
  • And Freedom Three is the freedom to distribute copies of your modified versions to others when you wish, and this also includes publication if that’s how far you wish to go.

So, as long as Canonical publishes their source code, they are using GNU/Linux in a legitimate way. And Canonical does exactly that. Should we require Canonical to grow the moral responsibility to put back their modifications to upstream projects, then we are giving Canonical free as “free lunch” rather than “freedom”.

If we continue to explore whether Canonical should contribute more to the Linux community then we are missing the point. During the past years both Redhat and Novell have invested significantly on server-side technologies, with the belief that server-side deals will be the future of the open source economy. However, Ubuntu is gaining market share by providing a user-friendly desktop to entry-level and medium-level developers. The contribution of Canonical to the Linux community lies not in the lines of code or number of patches to the Linux kernel, glibc, or X.org. Rather, it lies in the number of people being influenced by Ubuntu and switch (or consider to switch) from Windows to Linux. By offering free CD’s to anybody who are interested, Ubuntu not only wins users from those who previously use Windows, but also from territories traditionally occupied by Redhat and Novell.

The open source movement today is quite different from what it was 10 years ago. As pointed out by Greg Kroah, most of the components that we see in a Linux distribution — just like the Linux kernel, glibc, gcc, X.org, binutils and others — are maintained and patched by paid developers hired by commercial companies rather than amateur developers. Unlike non-profit organizations or amateur individuals, commercial companies invest in open source projects for financial returns rather than an elevation in morality. (Otherwise there wouldn’t be the notorious Novell-Microsoft deal in 2006.) The above-mentioned financial returns can be in the form of a better public relationship (corporate branding), a higher market share, or more directly, more revenue. In the past Novell — along with a couple of other mainstream distributions — controlled the majority of the Linux market, leaving the rest to other minor Linux distributions. When Ubuntu joined the game in 2004, although the total number of people using Linux is increasing, both Redhat and Novell are losing market share to Canonical. Canonical is offering enterprise-class support services for Ubuntu users with a price tag that is more expensive than that for Windows Vista. The fact that there are companies buying these services makes companies like Novell even more unhappy.

Mr. Canonical, you are an outsider of the Linux community (because you contribute very little). It is OK for you to earn a little bit money from Linux. But, if you are earning too much from our work, then it is too much.

This is exactly the kind of Linux ecosystem that is being destroyed by Canonical with Ubuntu.

More and more companies have realized that open source can be a strong weapon for technology adoption. When OpenSolaris joined the competition, developers have one more option along with Linux and BSD. New companies like Canonical also managed to grab business opportunities with products like Ubuntu. The competition in the operating system market will be a lot more violent, rather than Windows (desktop) and Linux (server side) share the market peacefully. What we are seeing today is only a prelude to the Linux crusade, and we should be well prepared for more eventful warfares.

(PS. Although the author works for Sun Microsystems, the opinions conveyed in this blog entry does not represent the point of view from his employer.)

无聊?

By , September 30, 2008 3:16 pm

前天吃饭的时候,问婉清:“养猪养鸡可以杀来吃,养狗养猫可以带出去玩。养着你到底有什么好处呢?”

小人想了半天说:“养着我你们就不无聊了啊。”

力?能量?

By , September 26, 2008 10:00 am

昨天中午,在上班的路上偶然遇到覃维祖老师,聊了一些关于土木工程教学、研究和实践中的一个问题。覃老师的观点高瞻远瞩,令人深思。不敢专美,特记录于此,希望于人于己都有点用处。

要设计一个建筑物或者是构筑物,按照我们所受的教育,是通过力学分析来进行结构设计。说得简单点,就是考虑外部和内部的荷载(包括动荷载和静荷载)的共同作用,设计出来的结构需要能够抵抗这么大的荷载 -- 也就是说,能够承受这么大的力。

结构越来越大型化,对承载力的要求也越来越高。在具体的工程实践中,体现在对混凝土(以及其他工程材料)强度的要求上。譬如说现在用于大坝的混凝土,其强度要求就比过去高很多。水泥在水化过程中要发出大量的热量,由于大坝的体积比较大,这些热量不能够及时地散出去,从而导致大坝内部的温度升高。我们知道,一般材料都是热胀冷缩,变形受约束时就产生内应力(混凝土升温时尚未凝固或刚凝固,模量尚不大,但降温时模量已很大,收缩受到约束就产生很大拉应力)。而混凝土的强度是一个逐渐增长的过程。当温度导致的内应力超过混凝土的强度时,混凝土就会开裂。众所周知,对混凝土的强度要求越高,则水灰比越低,发热的问题就越严重。目前在制备大坝混凝土的时候,都需要将水泥和骨料预先冷却到7 摄氏度左右,仍然不能够有效地解决由于温度导致的混凝土开裂问题。

温度应力不是导致混凝土开裂的唯一原因。混凝土硬化过程和硬化后,还要发生其他体积变化,例如在水泥的水化过程中,通常会出现体积变化的情况;尤其显著的还有干燥收缩,受到约束也形成拉应力,与温度应力叠加起来就非常可观,而混凝土的抗拉强度(或者确切地说是断裂能)又很小。这些内应力都会对大体积混凝土的安全性和耐久性造成严重的挑战。我们知道,混凝土是一种不均匀、非线形的各向异性材料。混凝土中最薄弱的地方,既不是骨料也不是水化之后的浆体,而是浆体和骨料之间的过渡区。在水泥浆体膨胀或者收缩过程中,首先受到破坏的,就是这个过渡区域。举个例子说,我们现在花很大气力去研究水泥浆体中的缝隙,其直径都是微米级的。对于大体积混凝土来说,过渡区那里的裂缝,基本上都是毫米级的(至少也是零点几个毫米)。研究浆体中的小缝隙,却不去研究过渡区的大裂缝,根本就是舍本求末。

从八十年代后期起,为了发展交通开始建设高速公路。由于国内缺乏合格的沥青资源,许多省市地区建设混凝土路面的高速公路。这些高速公路的设计寿命都是三十年到五十年,但是实际使用寿命不超过十五年。有一些地区的高速公路,甚至还没有通车就已经开始严重开裂,无法正常投入运营。这些路面混凝土的强度要求都很高,因此在其不断强化的过程中产生了很大的内应力,在与外力的共同作用下导致了混凝土的开裂与失效。而我们统统将其原因归结于官商勾结,偷工减料,又何曾想过我们的设计思想出了问题。九十年代初开始大力发展,而短短几年后到九十年代末,我国主要的高速公路又转向铺筑沥青路面,原因就是新修的水泥混凝土路很快就破损。仅在省市一级的公路建设中还在大量使用混凝土路面。目前正在大力倡导的村村通工程,也是在大量使用混凝土路面。

在结构设计中,到底是力重要还是能量更重要。如果是力,那么结构就必须能够抵抗该结构的荷载。如果是能量,就意味着结构可以给荷载让路,因为一个能量较低的系统才是一个更稳定的系统。换句话说,是顶还是让,是堵还是疏, 是两种不同的策略甚至是哲学问题。

覃维祖老师推荐了两本书,都是Fritjof Capra写的。一本是 The Turning Point: Science, Society, and the Rising Culture, 另外一本是The Tao of Physics: An Exploration of the Parallels between Modern Physics and Eastern Mysticism 。用东方哲学的观点来重新审视物理学和工程学中的概念,虽然非主流,却是一个很有意思的论题。有空的时候,应该拿来看看。

再次感谢覃老师的指教。

2008.09.26,初稿
2008.09.27,经覃老师修改

When The Company Goes Downwards…

By , September 25, 2008 11:48 am

Sin-Yaw, your blog title is a little bit misleading. 44% pay increase? I was about to say congratulations, and then I hit the URL you quoted. Oh my…

During the past 12 months, Jonathan Schwartz’s salary increased by 44%, while our stock price decreased by over 60%.  These are really great numbers.

I am still working for Sun, so I can’t commend on our current CEO. However, this makes me recall something Sin-Yaw told us in a meeting: a talent can do good no matter where he/she is, even if the company is going downwards… (Was that a “how to become a staff engineer” meeting? I think I called for that meeting for our engineers.)

And Jonathan Schwartz just proved it.

Panorama Theme by Themocracy