在cnbeta看新聞, 這條消息里面的這個部分很有興趣。
http://www.cnbeta.com/articles/59784.htm
最高峰時期達到了13000個訂單/秒

直覺上就是個假數據, 每秒1w3,如果簡單折算成pv也有10億/每日,已經超過新浪流量。需要什么樣的硬件環境才能搭建起這樣的系統? 為了一個短期的銷售行為,o2不可能如此不惜血本。

這種在線預訂是比較典型的處理業務, 應該可以用TPC的benchmark做簡單評估。順便爬了一下tpc的概念。

tpc的benchmark主要可以參考的有TPC-C和TPC-E,都是以類似下單這樣的case來做事務吞吐量評估。

tpc-c

TPC-C 基準使用一小組事務和表來模擬一家分銷企業,對訂單系統進行仿真,TPC-C模擬的是中等復雜程度的OLTP業務,由5個事務組成(New-Order-》Payment-》Delivery—》Order-Status-》Stock-Level)。TPC-C吞吐量性能由一個系統每分鐘完成的訂單混合事務處理數量決定。

TPC-C的基準數據結構可以參考此篇
http://news.softhouse.com.cn/news/show/4160.html

一般來說,我們使用TPC-C做數據庫和主機系統的性能參考基準。

目前的top3 如下
                                                                                 TPM          TPS   
IBM Power 595 Server Model 9119-FHA                    6,085,166    101419   DB2
Bull Escala PL6460R                                                  6,085,166                  DB2
HP Integrity Superdome-Itanium2/1.6GHz/24MB iL3   4,092,799                  ORACLE

這意思是如果只是數據庫,達到每秒10w這種變態級別還是沒問題的。

TPC-c的計算要注意的2點,一個統計的時間是分,此外是以混合事務而非數據庫事務為基本計量單位,在網上看到一些人的估算數值是以數據庫事務為基準,顯然被放大了,多化了很多錢。

參見FAQ。
Q: What do TPC-C throughput numbers mean?

A: You must understand what the benchmark is intended to measure, before you can understand throughput. Throughput, in TPC terms, is a measure of maximum sustained system performance. In TPC-C, throughput is defined as how many New-Order transactions per minute a system generates while the system is executing four other transactions types (Payment, Order-Status, Delivery, Stock-Level). All five TPC-C transactions have a certain user response time requirement, with the New-Order transaction response time set at 5 seconds. Therefore, for a 710 tpmC number, a system is generating 710 New-Order transactions per minute while fulfilling the rest of the TPC-C transaction mix workload.

即以主事務為計量單位,但是同時還要保證其他事務的執行,所以另外有一個事務執行時間要求,要求混合90%的混合事務執行時間少于5秒。

tpc-c的特點和online處理不符,考察的還是極端的數據庫性能。考察online應用性能,TPC-APP 應該是最符合的,不過TPC上居然只有一個05年的數據而且是。net1.1 , 數字么, 很小,幾百而已。

再看一下去年出的TPC-E
TPC-E(大型企業信息服務測試基準程序),

與TPC-C相比,TPC-E只是針對一種模擬訂單錄入與銷售環境測量每分鐘商業事務(tpmC)吞吐量,測量的事務類型也只有四種。兩相對比,TPC-E所采用的商業模型更為人們熟悉也更容易理解,也包含了更多的事務類型。

參加TPC-E測試的不多,都是pc服務器,第一位數字也少的可憐,把分轉換為秒,也只有前面的10分之一。

IBM System x3950 M2    1,250.00

另外有一個專門針對電子商務的TPC-w

TPC-W Web e-commerce

TPC Benchmark? W (TPC-W) is a transactional web benchmark. The workload is performed in a controlled internet commerce environment that simulates the activities of a business oriented transactional web server. The workload exercises a breadth of system components associated with such environments, which are characterized by:
? Multiple on-line browser sessions
? Dynamic page generation with database access and update
? Consistent web objects
? The simultaneous execution of multiple transaction types that span a breadth of complexity
? On-line transaction execution modes
? Databases consisting of many tables with a wide variety of sizes, attributes, and relationships
? Transaction integrity (ACID properties)
? Contention on data access and update
The performance metric reported by TPC-W is the number of web interactions processed per second. Multiple web interactions are used to simulate the activity of a retail store, and each interaction is subject to a response time constraint.

TPC-W simulates three different profiles by varying the ratio of browse to buy: primarily shopping (WIPS), browsing (WIPSb) and web-based ordering (WIPSo). The primary metrics are the WIPS rate, the associated price per WIPS ($/WIPS), and the availability date of the priced configuration.

找不到任何數據。

TPC主要還是考察以數據庫性能為主的,繼續翻另外一個組織SPEC的東西。

SPECweb99
specweb99是一個單純用來考察web服務器的http穩定吞吐量的基準測試,由spec組織提供。

跑到網站上看,現在已經退休了,只玩2005了,摘錄點東西看看,有點象 tpc-app

    *  Measures simultaneous user sessions
    * Relevant dynamic content: PHP and JSP implementations included
    * Page images are requested using 2 parallel HTTP connections
    * Multiple, standardized workloads: Banking (HTTPS), E-commerce (HTTP and HTTPS), and Support (HTTP); agreed to by major players in the WWW market
    * Simulates browser caching effects by using If-Modified-Since requests
    * File accesses more closely matching today's real-world web server access patterns
    * Full disclosures available on this web site
    * Stable implementation with no incomparable versions
    * Java-based client for cleaner, more portable code
    * Ability to poll clients for data during a run and display it as CSV or in a GUI
   
 計算單位為session,可以理解為能同時支持的正常運行的用戶數,折算成TPS大致可以除個8-10. web2005 提供3個基準應用Banking, Ecommerce, and Support來模擬不同負荷的請求,加權平均。
 
 看了一下記錄, 最高才8k多,居然是用tomcat和rock web server跑的,受不了。 沒人看的上這標準,都沒人玩。
 
 
 順手再看了一下 jAppServer2004
 jappserver是針對j2ee應用服務器的基準測試,目前測試標準是j2ee 1.3。
 
 主要評價指標是jAppServer Operations Per Second ("SPECjAppServer2004 JOPS")
 
 SPECjAppServer2004 JOPS = Dealer Transactions/sec + Workorders/sec

 打個折姑且勉強和TPC-C對應吧。 從內容上看是比較接近實際的online方式的電子商務應用的。
 
 
 看了一下最近的評測結果, 發現排第一的居然是webspher 6.1  , 用了26個節點, 52個cpu,真變態。 單機最強的當然是sun的sparc。 一般人用的入門級別rx3600也就600多(貌似一般應用根本達不到這個水平,呵呵)。IBM真是貴,不愧是大堆錢公司,570居然的錢可以買多少套rx3600了,按廢鐵賣也比rx3600重幾倍。速度也就比rx3600快一點點而已。
   
  jobs      node
 
  14004.42  26    104 cores, 52 chips, 2 cores/chip (SMT on)   每個核心其實也就100多
  3331.31    1     16 cores, 2 chips  sparc  //為啥沒用32核的?
  1197.51    1     4 cores, 2 chips, 2 cores/chip (SMT on)  power 570 
  618.22      1     4 cores, 2 chips  hp rx3600  英特爾-安騰


啥時候可以瞻仰一下這種26個節點的應用呀, 這要建多大的機房呀,跑完題了,午睡了。