1. 程式人生 > >Windows 系統慢?這並非技術原因

Windows 系統慢?這並非技術原因

原文連結:http://blog.zorinaq.com/?e=74

I was explaining on Hacker News why Windows fell behind Linux in terms of operating system kernel performance and innovation. And out of nowhere an anonymous Microsoft developer who contributes to the Windows NT kernel wrote a fantastic and honest response acknowledging this problem and explaining its cause. His post

has been deleted! Why the censorship? I am reposting it here. This is too insightful to be lost. [Edit: The anonymous poster himself deleted his post as he thought it was too cruel and did not help make his point, which is about the social dynamics of spontaneous contribution. However he let me know he does not mind the repost at the condition I redact the SHA1 hash info, which I did.][Edit:
A second statement, apologetic, has been made by the anonymous person. See update at the bottom.]

"""

I'm a developer in Windows and contribute to the NT kernel. (Proof: the SHA1 hash of revision #102 of [Edit: filename redacted] is [Edit: hash redacted].) I'm posting through Tor for obvious reasons.

Windows is indeed slower than other operating systems in many scenarios, and the gap is worsening. The cause of the problem is social. There's almost none of the improvement for its own sake, for the sake of glory, that you see in the Linux world.

Granted, occasionally one sees naive people try to make things better. These people almost always fail. We can and do improve performance for specific scenarios that people with the ability to allocate resources believe impact business goals, but this work is Sisyphean. There's no formal or informal program of systemic performance improvement. We started caring about security because pre-SP3 Windows XP was an existential threat to the business. Our low performance is not an existential threat to the business.

See, component owners are generally openly hostile to outside patches: if you're a dev, accepting an outside patch makes your lead angry (due to the need to maintain this patch and to justify in in shiproom the unplanned design change), makes test angry (because test is on the hook for making sure the change doesn't break anything, and you just made work for them), and PM is angry (due to the schedule implications of code churn). There's just no incentive to accept changes from outside your own team. You can always find a reason to say "no", and you have very little incentive to say "yes".

There's also little incentive to create changes in the first place. On linux-kernel, if you improve the performance of directory traversal by a consistent 5%, you're praised and thanked. Here, if you do that and you're not on the object manager team, then even if you do get your code past the Ob owners and into the tree, your own management doesn't care. Yes, making a massive improvement will get you noticed by senior people and could be a boon for your career, but the improvement has to be very large to attract that kind of attention. Incremental improvements just annoy people and are, at best, neutral for your career. If you're unlucky and you tell your lead about how you improved performance of some other component on the system, he'll just ask you whether you can accelerate your bug glide.

Is it any wonder that people stop trying to do unplanned work after a little while?

Another reason for the quality gap is that that we've been having trouble keeping talented people. Google and other large Seattle-area companies keep poaching our best, most experienced developers, and we hire youths straight from college to replace them. You find SDEs and SDE IIs maintaining hugely import systems. These developers mean well and are usually adequately intelligent, but they don't understand why certain decisions were made, don't have a thorough understanding of the intricate details of how their systems work, and most importantly, don't want to change anything that already works.

These junior developers also have a tendency to make improvements to the system by implementing brand-new features instead of improving old ones. Look at recent Microsoft releases: we don't fix old features, but accrete new ones. New features help much more at review time than improvements to old ones.

(That's literally the explanation for PowerShell. Many of us wanted to improve cmd.exe, but couldn't.)

More examples:

  • We can't touch named pipes. Let's add %INTERNAL_NOTIFICATION_SYSTEM%! And let's make it inconsistent with virtually every other named NT primitive.
  • We can't expose %INTERNAL_NOTIFICATION_SYSTEM% to the rest of the world because we don't want to fill out paperwork and we're not losing sales because we only have 1990s-era Win32 APIs available publicly.
  • We can't touch DCOM. So we create another %C#_REMOTING_FLAVOR_OF_THE_WEEK%!
  • XNA. Need I say more?
  • Why would anyone need an archive format that supports files larger than 2GB?
  • Let's support symbolic links, but make sure that nobody can use them so we don't get blamed for security vulnerabilities (Great! Now we get to look sage and responsible!)
  • We can't touch Source Depot, so let's hack together SDX!
  • We can't touch SDX, so let's pretend for four releases that we're moving to TFS while not actually changing anything!
  • Oh god, the NTFS code is a purple opium-fueled Victorian horror novel that uses global recursive locks and SEH for flow control. Let's write ReFs instead. (And hey, let's start by copying and pasting the NTFS source code and removing half the features! Then let's add checksums, because checksums are cool, right, and now with checksums we're just as good as ZFS? Right? And who needs quotas anyway?)
  • We just can't be fucked to implement C11 support, and variadic templates were just too hard to implement in a year. (But ohmygosh we turned "^" into a reference-counted pointer operator. Oh, and what's a reference cycle?)

Look: Microsoft still has some old-fashioned hardcore talented developers who can code circles around brogrammers down in the valley. These people have a keen appreciation of the complexities of operating system development and an eye for good, clean design. The NT kernel is still much better than Linux in some ways --- you guys be trippin' with your overcommit-by-default MM nonsense --- but our good people keep retiring or moving to other large technology companies, and there are few new people achieving the level of technical virtuosity needed to replace the people who leave. We fill headcount with nine-to-five-with-kids types, desperate-to-please H1Bs, and Google rejects. We occasionally get good people anyway, as if by mistake, but not enough. Is it any wonder we're falling behind? The rot has already set in.

"""

Edit: This anonymous poster contacted me, still anonymously, to make a second statement, worried by the attention his words are getting:

"""

All this has gotten out of control. I was much too harsh, and I didn't intend this as some kind of massive exposé. This is just grumbling. I didn't appreciate the appetite people outside Microsoft have for Kremlinology. I should have thought through my post much more thoroughly. I want to apologize for presenting a misleading impression of what it's like on the inside.

First, I want to clarify that much of what I wrote is tongue-in-cheek and over the top --- NTFS does use SEH internally, but the filesystem is very solid and well tested. The people who maintain it are some of the most talented and experienced I know. (Granted, I think they maintain ugly code, but ugly code can back good, reliable components, and ugliness is inherently subjective.) The same goes for our other core components. Yes, there are some components that I feel could benefit from more experienced maintenance, but we're not talking about letting monkeys run the place. (Besides: you guys have systemd, which if I'm going to treat it the same way I treated NTFS, is an all-devouring octopus monster about crawl out of the sea and eat Tokyo and spit it out as a giant binary logfile.)

In particular, I don't have special insider numbers on poaching, and what I wrote is a subjective assessment written from a very limited point of view --- I watched some very dear friends leave and I haven't been impressed with new hires, but I am *not* HR. I don't have global facts and figures. I may very well be wrong on overall personnel flow rates, and I shouldn't have made the comment I did: I stated it with far more authority than my information merits.

Windows and Microsoft still have plenty of technical talent. We do not ship code that someone doesn't maintain and understand, even if it takes a little while for new people to ramp up sometimes. While I have read and write access to the Windows source and commit to it once in a while, so do tens and tens of thousands of other people all over the world. I am nobody special. I am not Deep Throat. I'm not even Steve Yegge. I'm not the Windows equivalent of Ingo Molnar. While I personally think the default restrictions placed on symlinks limited their usefulness, there *was* a reasoned engineering analysis --- it wasn't one guy with an ulterior motive trying to avoid a bad review score. In fact, that practically never happens, at least consciously. We almost never make decisions individually, and while I maintain that social dynamics discourage risk-taking and spontaneous individual collaboration, I want to stress that we are not insane and we are not dysfunctional. The social forces I mentioned act as a drag on innovation, and I think we should do something about the aspects of our culture that I highlighted, but we're far from crippled. The negative effects are more like those incurred by mounting an unnecessary spoiler on a car than tearing out the engine block. What's indisputable fact is that our engineering division regularly runs and releases dependable, useful software that runs all over the world. No matter what you think of the Windows 8 UI, the system underneath is rock-solid, as was Windows 7, and I'm proud of having been a small part of this entire process.

I also want to apologize for what I said about devdiv. Look: I might disagree with the priorities of our compiler team, and I might be mystified by why certain C++ features took longer to implement for us than for the competition, but seriously good people work on the compiler. Of course they know what reference cycles are. We're one of the only organizations on earth that's built an impressive optimizing compiler from scratch, for crap's sake.

Last, I'm here because I've met good people and feel like I'm part of something special. I wouldn't be here if I thought Windows was an engineering nightmare. Everyone has problems, but people outside the company seem to infuse ours with special significance. I don't get that. In any case, I feel like my first post does wrong by people who are very dedicated and who work quite hard. They don't deserve the broad and ugly brush I used to paint them.

P.S. I have no problem with family people, and want to retract the offhand comment I made about them. I work with many awesome colleagues who happen to have children at home. What I really meant to say is that I don't like people who see what we do as more of a job than a passion, and it feels like we have a lot of these people these days. Maybe everyone does, though, or maybe I'm just completely wrong.

"""

mrbFriday 10 May 2013 at 9:14 pm | |Default

相關推薦

Windows 系統並非技術原因

原文連結:http://blog.zorinaq.com/?e=74 I was explaining on Hacker News why Windows fell behind Linux in terms of operating system kernel pe

運維采集技術分享: 通過WMI監控NAT後的Windows系統

運維技術 it運維 勤智數碼 運維管理軟件 1、Windows OS和WMI簡介隨著互聯網技術的飛速發展,我們對於IT業務系統的服務能力要求越來越高。根據Gartner統計2017年1季度全球服務器出貨量超過125億美金,正在運行支撐各種業務的服務器數量更是龐大。這些服務器中有超過50%的服務

計算機基礎與作業系統 計算機系統簡介 計算機基礎知識 計算機的發展史及多道技術 計算機網路知識簡單介紹 Windows系統,Mac系統與Linux系統的的安裝與簡介 伺服器硬體基礎 Linux發展史 Linux伺服器遠端登入 Linux常用的150個命令彙總 在終端下寫Python程式碼

第一章:計算機系統簡介 第二章:計算機基礎知識 第三章:計算機的發展史及多道技術 第四章:計算機網路知識簡單介紹 第五章:Windows系統,Mac系統與Linux系統的的安裝與簡介 第六章:伺服器硬體基礎 第七章:Linux發展史 第八章:Linux伺服器遠端登入 第九

12月技術考核:Windows系統故障排查

系統故障排查 徹底 問題 系統故障 機器 考核 防火墻 測試 異常 一:Windows系統故障排查 1.無法遠程,將故障排查。 答:對於Windows系統無法遠程,要進行的排查步驟有:第一個是機器是否死機還是關機了;第二個是機器的系統裏邊的遠程設置是否打開了;第三個是機器的

Windows系統優化軟體 | 10款功能超級強大!介面優美!值得收藏

1. True Launch Bar ——工作列增強工具可以在工作列分類整理應用的圖示,可以設定當滑鼠懸停時展開二級選單:展開的選單也可以再次分級:這樣可以把桌面圖示整理到這裡,外觀可以自定義:可以去貼吧查詢更多面板,還可以使用一些外掛。其他的一些True Launch Ba

windows系統磁碟爆滿,原因是因為redis

最近一段時間一直被一個問題困擾,我的電腦c盤報紅,空間越來越小,執行效率也越來越慢,今天一早到公司一開機發現100G的c盤空間用了99G,解決這個問題迫在眉睫。 在同事的推薦下,我用SpaceSniffer.exe磁碟空間分析工具軟體分析了一下C盤的大檔案,發現如下資料夾

windows系統抓屏技術

一,GDI GDI抓屏        所有的windows版本都通用的抓屏方式,這種抓屏方式相對比較慢,抓取一幀1080p的桌面需要5~8ms左右的時間。而且在vista以後的系統上,如果啟用Aero特效的話,效率較低。 HDC window_dc =

Windows 系統下安裝 dig 命令

通過 mat info span dns查詢 ber 環境變量 none class dig是一個Linux下用來DNS查詢信息的小工具,dig全稱是Domain Information Groper,與nslookup類似,但比nslookup功能更強大。Windows只

天兔(Lepus)監控系統查詢分析平臺安裝配置

fig align fxaa comm one 平臺 back ria pri 轉http://suifu.blog.51cto.com/9167728/1770672 被監控端要安裝pt工具 1 2 3 4 [[email protec

TensorFlow - 在 windows 系統上安裝

conda 安裝 rsh anaconda src 最新 之前 power ins 安裝方式: 1、pip (將介紹) 2、Anaconda 我采用的是本地 pip 方式 需提前安裝 Python - Python 3.5.x > TF 只支持 Python 3

針對目前windows系統的所有勒索病毒補丁和安全工具

windows 勒索病毒 安全工具 針對目前windows系統的所有勒索病毒補丁和安全工具https://pan.baidu.com/s/1boBiHNx 可以下載到內網進行安裝。本文出自 “simeon技術專欄” 博客,請務必保留此出處http://simeon.blog.51cto.com/1

公司網絡很很卡的原因分析與處理

網絡問題分析與解決方案一、電腦網速突然變的很慢、很卡,怎麽辦1. 如果你是用的無線路由器,不管你有沒有設置無線密碼,都有可能被別人盜用你的網絡,可以關掉無線功能,自已用有線連接上網 2. 如果還不行,那麽啟路由器,有貓的話也要重啟,再試試 3. 如果你的路由器用的時間超過一年,質量不好的話可能內部的部件已經老

Windows系統中網絡故障

百度百科 network windows 網絡服務 電腦網絡 前些時候,處理電腦的時候發現開機後電腦網絡符號直接是紅色感嘆號.分析:一般連接線問題,網絡服務關閉會出現紅色感嘆。網卡是好的,連接燈也是閃爍無問題;於是操作系統,發現打不開網絡中心,進入服務(services.msc),有幾個服

windows系統 安裝MongoDB

system32 mongod 追加 解壓 windows 鼠標 創建服務 安裝mongodb www 本篇文章記錄了我在win7 32位下安裝MongoDB的步驟,以作記錄。 一、下載MongoDB 下載地址:https://www.mongodb.com/downl

tensorboard在windows系統瀏覽器顯示空白的解決writer =tf.summary.FileWriter("logs/", sess.graph)

local window 瀏覽器 顯示空白 sta spa con cal file writer =tf.summary.FileWriter("logs/", sess.graph) >tensorboard --logdir=D://logs http://l

windows系統字體安裝使用的幾種方法

windows ps 字體簡易安裝方法:1、打開系統盤的 windows 下的 fonts 文件夾;2、用另一個窗口打開字體存放的文件夾;3、在存放字體的文件夾中選擇要安裝的字體(部分選或全選均可);4、用鼠標右鍵將所選字體拖到windows 下的 fonts 文件夾上,松開鼠標,在彈出的提示框上選擇

虛擬Linux系統使用Windows系統oracle數據庫

ora 設置 這樣的 protocol ets 安裝 文件 war 11.2 前提:本地oracle數據庫能正常使用。 數據庫:oracle 11g 虛擬機:VMware_workstation_full_12.5.2 本機系統:Windows 7 旗艦版 虛擬機系統:op

windows系統中安靜的安裝補丁

安裝補丁 批處理 安靜執行 腳本如下:@Echo Off Title Install Windows Update pack Echo 正在安裝,請稍等...... ::循環當前目錄中所有的exe文件並執行安裝for %%i in (*.exe) do %%i /passive /norestar

Inno Setup 檢測Windows系統版本

comm pan 文檔 lan window create lag info servers Inno Setup 檢測Windows系統版本 如果軟件對系統有要求,必須安裝在某些系統下,在制作安裝包的時候,要檢測當前系統版本是否滿足要求, 以免安裝過程中發生異常,或者安裝

AngularJS4.0環境搭建詳解--windows系統環境

class images 開發 安裝 hub 詳解 ans win 總結 第一步:安裝NodeJS   下載最新版的NodeJS並安裝,安裝完成後打開CMD命令行,輸入以下命令:   node -v   若返回類似版本號則代表NodeJS安裝成功,如下:    第二部