Learn how to transform your snail-paced Rails app into a sub-100 millisecond powerhouse. The Complete Guide to Rails Performance is a full-stack course that gives you the tools to make your Ruby on Rails applications faster and more delightful for users, scale better and for less money, and take less effort to maintain. 3rd Edition: Updated for Rails 5 through Rails 7.1 Why is your Rails applicati
StrongLoop / IBMによって提供されるこの翻訳. 本書は、英語の資料と比較すると古くなっている可能性があります。最新の更新については、英語版の資料を参照してください。 実稼働環境におけるベスト・プラクティス: パフォーマンスと信頼性 概説 この記事では、実稼働環境にデプロイされた Express アプリケーションのパフォーマンスと信頼性に関するベスト・プラクティスについて説明します。 このトピックは、従来型の開発と運用の両方にわたる「DevOps」の世界に明確に分類されます。したがって、情報は次の 2 つの部分に分かれています。 コードで実行する処理 (開発部分) gzip 圧縮を使用する 同期関数を使用しない ロギングを正確に実行する 例外を適切に処理する 環境/セットアップで実行する処理 (運用部分) Set NODE_ENV to “production” Ensure
AさんはRailsで書かれたある遅いコードの検証をしていました。 X-Runtimeヘッダを見ると $ curl -Is localhost:3000/hello | grep X-Runtime X-Runtime: 5.008580 5秒もかかってる。 しかしRailsのログを見ると Started HEAD "/hello" for 127.0.0.1 at Tue Apr 03 13:04:11 +0900 2012 Processing by HelloController#index as */* Rendered text template (0.0ms) Completed 200 OK in 10ms (Views: 9.7ms) こんな感じで10msで返していることになっている。なんだこれは? こういう状況で疑わしいことの一つとして、Rack等のMiddlewareのど
1. ベンチマーカー プロファイルすると、プロファイル自体に時間がかかるので正しく速度が測れない。そのためベンチマーカーも使うと良い。 ただし、ベンチマーカーはどこが遅いか等の解決の糸口は教えてくれない。 benchmark-ips 2. プロファイラ 実際に速度のボトルネックを見つける際に使う。 stackprof どのメソッドに多くの時間を費やしているかがわかる これを入れても速度にさほど影響がない rblineprof 行ごとにかかっている時間を出してくれる peek-rblineprofを使うとブラウザで結果が見れる ただしプロファイリングに結構時間がかかる (3. NewRelic) 実際、これらのことを手元でやらなくても、特にstackprof的なことや、どこのページやどのSQLクエリが特に遅いかなどは、 New Relic がやってくれます。お金を払うと結構詳細な部分も見れま
Crush performance bottlenecks with data-driven insights and recommendationsBlackfire continuously profiles and monitors decoupled PHP and Python applications, helping you optimize performance, anticipate issues, and future-proof your apps so you can stay in full control—even before crises. Get clear, actionable guidelines to boost app performanceFollow a proven strategy to prevent and resolve cris
Stay Relevant and Grow Your Career in TechPremium ResultsPublish articles on SitePointDaily curated jobsLearning PathsDiscounts to dev toolsStart Free Trial7 Day Free Trial. Cancel Anytime. Key Takeaways Ruby’s performance has significantly improved with the advent of Ruby 2.0+, debunking the myth that Ruby is a slow programming language. The key to optimizing performance lies in sound object-orie
Sep 10, 201470 likes19,367 viewsAI-enhanced description Chartbeat measures and monetizes attention on the web. They were experiencing slow load times and TCP retransmissions due to default system settings. Tuning various TCP, NGINX and EC2 ELB settings like increasing buffers, disabling Nagle's algorithm, and enabling HTTP keep-alive resolved the issues and improved performance. These included tun
New CakePHP 5.1 Chiffon. Faster. Simple. Delicious. What's new in 5.1 The migration guide has a complete list of what's new in 5.1. We recommend you give that page a read when upgrading. A few highlights from 5.1 are: new plugin commands Components can now have dependencies injected by the container Upgraded to support PHPUnit 11.1+ Improved enum validation More events, so you can observe your app
前々回の記事、前回の記事と WordPress の反応を改善する方法を探ってきた。 PHP のコードの実行を高速化する XCache をインストールしたり、WordPress のページ表示の反応を良くする WP Super Cache プラグインを追加したりした。 確かに、これらの方策によって多少なりとも改善した気がしないでもないが、正直なところ思ったほどの効果は得られたと言えない。 しかしながら、もっと根本的な設定を見直すことで、大きく改善することができた。 それは WordPress の記事や設定などの各種データを保管する MySQL の設定にあった。 WordPress で使っている MySQL は default-storage-engine の値が InnoDB になっている。 MySQL をインストールしたときのインストール ウィザードで「Multifunctional Dat
String literals immutability is one of the new features you can find in Ruby 2.3. But, what does this imply? Same value literals points to the same object Better performance Thread safety Currently string immutability is included as opt-in, being the first step of a multi stage rollout and if it works well it will be enabled by default on Ruby 3.0. So it still can end up being just an experiment.
In my last post, we looked at how you can dig into memory "leaks" on Heroku. These techniques all work well if you can reproduce the memory bloat locally. When you can't, we can take a "heap dump" off of a running production server and analyze it for more information. In this two-post series, we'll look at the basics of what a heap dump is, what the contents look like, how to analyze one, and how
忙しいサイトなら1-5は全て同じ値に設定してしまいましょう どうせ忙しいサイトならMaxClientには達するんだと思います。であれば、変にメモリをケチらずに最初からMaxClientまで子プロセスを起動してしまったほうがレスポンスが良いです 急激なトラフィック増の際に多くの子プロセスが一気に起動することでシステムのロードがスパイクし、レスポンスを返せなくなることがあるからです mod_wsgiとかmod_perlとか読み込んでいる場合は特に子プロセス起動時のオーバーヘッドは馬鹿にできません かといって、MaxRequestsPerChildを"0"にして子プロセスを殺さないようにするのはやめたほうが良いです。子プロセスのメモリ使用量が肥大化し、システムでスワップが発生する可能性があります。 MaxClient数の算出方法 サーバの物理メモリを消費し尽くしてスワップさせないことが重要です
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く