キャッシュ戦略

From Meta, a Wikimedia project coordination wiki

他の言語:English

翻訳未完 / Only partially translated

03:54, 25 Feb 2005 (UTC) 時点での英語版最終アップデート: 00:44 (UTC), 12 Feb 2005

サイトの実行性能を改善すべく、ウィキメディアではキャッシュをいくつかの水準で利用しています。

  • Squidキャッシュ(en:Squid cache)サーバ群は、ウェブページのリクエストの約70%を処理しており、そのうちのほとんどはサイトにログインしていない閲覧者から生じるものです。報道への露出にともなって負荷が殺到する間には、そのトラフィックのほとんどをSquidたちが処理しています。
  • Memcached is used to save web pages which have been parsed, so that step doesn't need to be carried out repeatedly. This adds about 7% to the overall cache hit rate for pages. As of 19 September 2004 34 instances each of 180MB are in use: 12 on Yongle, 6 on Bart and Bayle, 2 on Isidore and Moreri and one each on dalembert, Tingxi, Alrazi, Friedrich, Harris and Avicenna for a total of 6120MB. It also caches login session IDs and user interface text in the various languages.
  • Memcached(Memcached)を使うことで、構文解析によって生成した?ウェブページを保存しておくので、繰り返し同じ工程を実行する必要がありません。これにより、ページに対する全体のキャッシュヒット率が約7%上がります。2004年9月19日時点において、各180MBのインスタンスを34個使用中です:Tongle に12個、Bart と Bayle に6個ずつ、Isidore と Moreri に2個ずつ、Dalembert、Tingxi、Alrazi、Friedrich、Harris および Avicenna に1個ずつ、合わせて 6120MB になります。さらに、ログインセッションIDや様々な言語によるユーザインターフェースのテキストもこれでキャッシュしています。
  • Turck MMCache(en:MMCache)が持つPHPキャッシング(PHP caching and optimization)機能を各Apacheウェブサーバに適用することで、ウェブサーバの実行性能を改善しています。PHPコードはふつう随時解釈されますが、同一のコードを反復的に再解釈するさいのCPUオーバーヘッドについてはこれによってかなり節約されます。
  • The database servers have large caches:
    • Ariel has 8GB of RAM total and 5.8GB is used for InnoDB caching, giving a hit rate over 99%. The remaining RAM is used for in-memory sorting, temporary tables used in SQL query processing and buffering of non-InnoDB table types.
    • Suda, the former master and now fallback master and general database slave has 4GB available for caching, as does Bacon, a query slave.
  • 各データベースサーバは大きなキャッシュを備えています:
    • ArielHardware order May 2004)は総計 8GB のRAMを備えており、そのうち 5 8GB がInnoDBキャッシュにあてられ、99%以上のヒット率を示しています。残りのRAMの用途は、整列処理の作業領域、SQL問合せ処理のための一時テーブル、およびInnoDB以外のテーブル型のためのバッファです。
    • SudaHardware order January 2004)は、前任のマスターであり現在は予備のマスターおよび general データベーススレーブ?として使われてるものですが、その 4GB をキャッシュにあてています。これは問合せスレーブ?の一つである Bacon と同じです。
  • Ariel has a 64MB battery-backed buffer to help disk performance. This is particularly significant for database transaction log entries, which are very regularly written to disk. This buffer lets the controller say that the write has completed without having to wait for the disks to actually write the data.
  • Ariel はディスクの実行性能を補助するために、バッテリーバックアップされたバッファメモリを 64MB 備えています。これは、ディスクに非常に頻繁に書き込まれるデータベース・トランザクション・ログ・エントリー?のためにとりわけ重要です。これにより制御側は、実際にデータがディスクに書き込まれるのを待つことなく、その書き込みが完了したと仮にみなす?ことができます。

負荷分散[edit]

==Load balancing==

未翻訳

In June 2004 the load was balanced with:

  • Round robin DNS distributed page requests evenly to one of three Squid cache servers.
  • Squid cache servers used response time measurements to distribute page requests between seven web servers. In addition, the Squid servers cached pages and delivered about 75% of all pages without ever asking a web server for help.
  • The PHP scripts which run the web servers distribute load to one of several database servers depending on the type of request, with updates going to a master database server and some database queries going to one or more slave database servers.

関連項目[edit]