kazuhoさんが「プロのサーバ管理者の間では存在価値が疑問視されて久しい (Min|Max)SpareServers だと思う」と書いたり、hirose31さんが去年のYAPC::Asiaで{Start,{Min,Max}Spare}Servers,MaxClientsは同じにしているよと発表したり、実際前職のサーバはそのように設定されていたのですが、自分でうまく説明ができてなかったので、調べながら書いてみた。 本当はイントラブログ用に書いていたものですが、がんばったので転載。 前提として、CPUの使用率におけるsystemとfork Re: クラウドがネットワークゲーム開発者にもたらしてくれたもの - blog.nomadscafe.jpでも書いている通りforkってのはサーバにとって重い部類の処理になります。つまり負荷の高いときにforkを大量に行うのはしてはならないことの1つです。
Twitterを利用していると、ときどきクジラの絵の画面が表示されることがあります。これはTwitterの処理能力がパンクして一時的に利用不可になったときに表示されるお馴染みの画面。 2月9日にTwitter Engineeringブログにポストされたエントリ「The Anatomy of a Whale」(クジラの解剖学)では、Twitterのエンジニアたちがこのクジラの内部に分け入ってどのようにTwitterサーバの処理能力を向上させたのか、という話が詳しく語られています。 彼らが行ったのは、まず詳細なデータを取得して原因がどの辺にあるのかを推測すること。そこから多数の無駄な処理を発見し、ソースコードの修正による性能の向上に成功します。 元記事は非常に長いエントリになっていますが、問題の調査から解決に至るアプローチについて多くのエンジニアの方の参考になりそうな内容が含まれていますし、T
データベースの醍醐味は、パフォーマンスチューニングにあります。 チューニングによっては、同じ処理でも1時間掛かる場合もあれば、 1秒で終わるということもあり得る世界です。 僕はDBの魅力に取り付かれた者の一人です。 DBという技術の奥深さが気に入っています。 DBを極めると、どこの現場に行っても絶対に必要とされます。 また、どこの現場に行っても正解を導く方程式は一緒なので応用が利くのです。 しかし、その基本原理を体系的に学べる手段はあまりありません。 OracleMasterやMCDBAといった資格試験でも学べることは限られていて あとはWebで調べるなりマニュアルを読むなりするしかありませんでした。 とくに肝であるパフォーマンスチューニングについては、 経験則でチューニングしている部分も多いです。 Oracle、SQLServer、MySQLと色々なDBのチューニングをしてきましたが、
もう、いろんなニュースサイトで言われていますが、 Yahooからページパフォーマンス計測ツールの「YSlow for Firebug」が リリースされました。Firebugをインストールしている上で、YSlowをインストールすると、Webサイトの高速化を行うためのポイントと、 現状についてのポイント表示を行ってくれます。 これ、実際に試してみるとよく分かるのですが、いかに工夫をしていないサイトは、改善の余地があり余っているか。。 ほんと身を引き締められます。ちなみにYSlowでは次の項目をポイントに挙げています。 Make Fewer HTTP Requests Use a Content Delivery Network Add an Expires Header Gzip Components Put CSS at the Top Move Scripts to the Bottom
に釣られて。 HatenaStar.js 1380 行目 テキストノード走査 一番のボトルネックはやはりここですね。IEなので、こんな感じでベタに計測。 makeTextNodes: function(c) { if (c.textNodes || c.textNodePositions || c.documentText) return; if (Ten.Highlight.highlighted) Ten.Highlight.highlighted.hide(); c.textNodes = []; c.textNodePositions = []; var isIE = navigator.userAgent.indexOf('MSIE') != -1; var texts = []; var pos = 0; var st = new Date*1; (function(node,
今仕事で書いてる Sledge アプリがあるのですが、先日負荷テストを行った結果びっくりすることに現行アプリの10倍遅いことが判明してしまいました・・・orz Sledge フレームワーク自身が重くないことは今までの経験でわかってるのですが、どうにもソースを見直しているだけでは原因が特定できない・・・そんな活躍するのがプロファイラです。プロファイラの御陰で遅いヶ所を特定することができ、無事に想定するパフォーマンスを得ることができました。この内容に関してはまた別エントリにて。 さて、プロファイラを使うとプログラム実行時の各種情報を収集し、性能解析を行うことが可能です。プロファイラについてもう少し詳しくしるには 性能解析 - Wikipedia あたりを読むと良いでしょう。 プロファイラ(英: Profiler)は性能解析ツールであり、プログラム実行時の各種情報を収集する。特に、関数呼び出しの
スクリプトが読み込まれるまで画像の読み込みがブロックされている - 同ブログより抜粋 WebページパフォーマンスツールであるYSlowの主要開発者でありYahoo! Exceptional Performanceの開発者であるStoyan Stefanov氏がNon-blocking JavaScript Downloadsというタイトルで、ページの読み込み速度を向上させるテクニックを簡潔にまとめている。これはブロックが発生するJavaScriptの読み込みを並列化することでページの読み込み時間を短縮しようというもの。Webページの読み込み高速化に効果的な手法なのでWebデベロッパは一度目を通しておきたい。 JavaScriptの読み込み中はほかの読み込み処理がブロックされる。これをDOM経由で動的にロードするように書き換えてやれば並列して読み込まれるようになる。Non-blocking
みたいなタイトルの記事を Digg 経由で発見。チートシート代わりにと思い超訳。*1 A Software Architect PHP 最適化 ベストプラクティス! 01. static にできるメソッドは static として宣言しよう。(4倍速い) 02. echo の方が print より速い。 03. echo '文','字'; (カンマ区切り)の方が、'文'.'字' (ドット連結)より速い。 04. ループの最大値は、ループ「内」ではなく「前」にセットしておこう。 05. 大きい配列のような変数は unset() してメモリを解放しよう。 06. マジックメソッド(例: __get, __set, __autoload)は使用を避けよう。 07. require_once はハイコストなのです。 08. include や require でファイルはフルパスで指定しよう。 09
今回はJavaScriptとWebページの表示・操作の体感速度について考えてみます。というのは,JavaScriptのせいでWebページの表示や操作などの速度が遅くなっている,と感じることがあるからです。 現在のWebサイトでは,JavaScriptを使って使い勝手を向上することは,ごく当たり前に行われています。例えば,動的にページを書き換えたり,ページ遷移を行わずにサーバーと通信を行ってデータを取得したりと,JavaScriptを使うことで,Webサイトをより便利に,より使いやすくすることができます。 Ajaxという言葉がはやってから,もう2年以上がたつんですよね。何年か前,JavaScriptはじゃまで,セキュリティを低下させる不要なものだと見なされていた頃がありました。しかしそれから一変して,「JavaScriptをがんがん使ってもいい」という空気になったことで,Webサイトを作成す
プログラムの高速化はプログラマにとって永遠の課題です。しかし,そこには知られざる暗黒面が隠れています。そもそも高速化に意味があるのかを調べなければなりません。次に,どの部分をどの程度高速化するのかが重要です。アルゴリズムの効率にも目配りが必要です。 コンピュータの処理速度は驚くべき勢いで向上しています。現在私たちが使っているパソコンは一昔前のスーパーコンピュータをしのぐ性能を備えていますし,半世紀前に登場したばかりの計算機と比較すると数十万倍の性能に相当します。 このように高速なコンピュータを持っているにもかかわらず,人間の欲望は限りがないものです。プログラムの実行速度はプログラマにとっての永遠の課題のようです。プログラムを高速化していると,「そんなに急いでどこに行く」という気になることもあります。 今回は,プログラムの高速化にまつわるさまざまな「秘密」と「限界」,そして「戦略」について解
こんにちは。親知らずを抜いて離乳食三昧のyukiです。GWの暴飲暴食から脱し、ダイエットするには好都合ですね。すいません。負け惜しみです。 さて、今回は「PHPのちょっとしたコツ」の続きネタで、PHP最適化Tipsまとめサイトの紹介です。 これらは既に有名なサイトで紹介されていたり、常識の範囲かもしれませんが、ひとつでも有用に感じていただければ幸いです。 そして英語が極端に苦手なため、意訳突っ込み等あれば宜しくお願い致します。 PHPの最適化 12 PHP Optimization tips (元ネタはこちらでしょうか? http://www.ilia.ws/files/zend_performance.pdf) staticが使えるなら、staticを使う。速度は4倍になる。 __get, __set, __autoload は避ける。 require_once() はコストがかか
調べごとをしたので blog に書いて理解を深めようのコーナーです。長文です。 Linux でシステム負荷を見る場合にお世話になるのが top や sar (sysstat パッケージに同梱されてるコマンド) などのツールです。 top ではシステム統計のスナップショットを見ることができます。今システムがどういう状態かなーというときは top が便利。 top - 08:16:54 up 3 days, 14:43, 6 users, load average: 0.18, 0.07, 0.03 Tasks: 43 total, 2 running, 41 sleeping, 0 stopped, 0 zombie Cpu(s): 18.2% us, 0.0% sy, 0.0% ni, 81.8% id, 0.0% wa, 0.0% hi, 0.0% si一方の sar では10分ごとのシ
給料の振込口座として三井住友銀行に口座を持っています。自動支払いサービスを使用して光熱費等の公共料金の支払いをしていますが、先日それらの内の一つを失念してたことに気づきました。口座を確認した時にはすでに引き落としが完了していたため、手元の資金が心細くなった状態で数日を過ごさなければなりません。三井住友銀行で即日キャッシングが可能であれば、是非利用したいのですが。 運が良ければ、三井住友銀行の即日キャッシングは可能 三井住友銀行の特徴はまずクレジットカード会社との連携したサービスが魅力的なことがあげられます。キャッシングでは銀行カードローンですから、何より安い金利が大きい利点になります。概ね銀行系の審査に必要な時間は長くなるようですが、三井住友銀行ではカード発行が当日に行なってくれます。 三井住友銀行は即日キャッシングができるかと言うと微妙なことになります。申込から審査結果の連絡までは、土日
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く