You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
In Part 1 of this series, we introduced you to WSGI and the top 6 WSGI web servers. In this post, we’ll show you the result of our performance benchmark analysis of these servers. There are many production-grade WSGI servers, and we were curious as to how well they performed. To this end, we constructed a benchmark to test six of the most popular servers. What About CGI and mod_python? Before WSGI
Hi there. Name’s Alex. I made the fastest image resize for modern x86 processors. I’d like to share my experience hoping I might motivate and inspire you to go optimize things. My warmest thanks to fellow Pillow contributors for their comments and motivation: Alex Clark, Hugo van Kemenade, Andrew Murray. Even though this article is mostly for developers, I seek to keep it simple. However, I love t
by Paweł Piotr Przeradowski A million requests per second with PythonIs it possible to hit a million requests per second with Python? Probably not until recently. A lot of companies are migrating away from Python and to other programming languages so that they can boost their operation performance and save on server prices, but there’s no need really. Python can be right tool for the job. The Pyth
Uberは、たった4年で38倍という目覚ましい成長を遂げたという。今回が恐らく初めてだと思うが、UberのチーフシステムアーキテクトであるMatt Ranney氏が、その面白くて詳細にわたる発表、「Scaling Uber’s Real-time Market Platform(Uberのリアルタイムマーケットプラットフォームをスケーリングする)」の中で、Uberのソフトウェアの仕組みについて詳しく説明している。 もしあなたが「急騰料金(サージ・プライシング)」に興味があるなら、それはこの発表の中に出てこない。知ることができるのは、Uberのディスパッチシステム、同社の地理空間インデックスの実装方法、システムのスケール方法、高可用性の実現方法、不具合の対処法についてだ。例えば、ドライバーの電話をリカバリ用の外部分散ストレージシステムとして使うという、データセンターの不具合に対処する驚きの方
最近は協力プレイやPvPなどの「リアルタイムサーバー」を書くときは Go が主流になっているのですが、 Tornado を使ったシステムも健在です。 (以前の記事) 数人〜十数人程度の「部屋」を、1つの Tornado プロセスに複数もたせ、さらに一台のサーバーにその Tornado プロセスを複数置くことでCPUのマルチコアを活用する構成になっているのですが、最近各プロセスがログファイルを書く部分でブロックして応答性能が悪化するケースがあったので対策しました。 この記事ではその対策で行ったチューニングや、行わなかったチューニングについても紹介します。 ※なお、この記事は Tornado を題材にしていますが、似たような仕組みになっている node.js などの他の言語のフレームワークでも同じ事が言えるはずです。 前提知識 Tornado は epoll や select などのIO多重化
We recently reduced CPU usage across our fleet by 80%. One key technique that made this possible was a lightweight profiling strategy that we could run in production. This post is about the ways we approached instrumentation, the tradeoffs involved, and some tools you can use to optimize your own apps (including code!). Background Nylas is a developer platform that provides APIs to integrate with
>>> timeit.timeit("'x' in ('x',)")0.04869917374131205>>> timeit.timeit("'x' == 'x'")0.06144205736110564 >>> timeit.timeit("'x' in ('x', 'y')")0.04866674801541748>>> timeit.timeit("'x' == 'x' or 'x' == 'y'")0.06565782838087131>>> timeit.timeit("'x' in ('y', 'x')")0.08975995576448526>>> timeit.timeit("'x' == 'y' or 'x' == 'y'")0.12992391047427532
ISUCON は Go で参戦しているんだけど、複数のチームが Python で予選通過したらしいので、応援のために Tips を公開していこうと思う。 目次 CPython の GC について 統計情報を出力する 第一世代GCの間隔を調整する Out of Band GC 循環参照を見つけて対処する CPython の GC について CPython のGCは参照カウント+循環参照コレクタだ。そして参照カウント方式は(幾つかの欠点はあるものの)Webアプリのボトルネックになったりはしにくい。 なのでGCチューニングの基本は次のようになる。 循環参照を避ける 循環参照コレクタの呼び出しタイミングを制御する 循環参照コレクタは、生きているオブジェクトの数がある程度増えると第一世代が実行され、第一世代が一定回数実行されると第二世代が、第二世代が一定回数実行されると第三世代が実行される。 各世代
locust良いですよね。 locust。最近の負荷試験は全部locustで済ませています。複雑なシナリオでもpythonでかけるのですごい楽です。 とはいえ最近は常時接続型のアプリも増えてきて単純なreq/resモデルではうまく負荷がかけれない状況も多い感じです。 というわけで、LocustのタスクでWebsocketを使った負荷をかけて、Webの画面から確認できるようにしてみました。 デフォルトだと単位がmsなんですが、ソケット通信でmsだと普通に0が連発されてしまうので単位はμsになります。 コードみるとわかりますが単にTaskの中でsocketつくって通信し、結果をlocustに通知してるだけなのでlocust本体にはまったく手を入れていません。 locustは設計がシンプルで分散環境の構築部分とリクエストしたりその結果を集計する部分が分かれてるのでこういう事が簡単に出来るのも良い
試しに英語で Blog を書いてみた のですが、書くので精一杯で結局何が言いたいのか分からない感じになってしまったので今後は日本語 Blog 書いてから英訳しようと思います。 Python 3 は 3.2 まで、文字列を unicode に統一した関係で Python 2.7 に比べて遅くなったりメモリ効率が悪くなったりしてしまっていたのですが、 Python 3.3 で PEP 393 Flexible String Representation が導入されて改善されました。 PEP 393 は Python の内部だけではなく Python/C API にも変更を加えており、内部を理解しつつ新しい API を適切に使えば、バイト列と文字列の間の変換を行うような C 拡張を高速化することができます。 そろそろ Python 3.2 のサポートを切れる時期なので、思い当たる人は目を通してお
http://www.youtube.com/watch?v=qATTTSg6zXk 1 comment | 1 point | by WazanovaNews ■ comment by Jshiike | 約3時間前 YouTubeのシステムアーキテクトであるSugu SououmaraneのFOSDEM 2014での講演です。スライドはこちらからダウンロードできます。 1) Vitessとは Vitessは大規模な本番環境でMySQL DBを効率的に利用するためのオープンソースプロジェクトです。概要はプロジェクトゴールのページ にまとまってます。 MySQLは機能が豊富だがスケールさせるときは苦労する。一方、NoSQLはスケーラビリティには問題がないが、アプリケーションが複雑になるとできることに限界があるのがネックになる。セカンダリインデックス、joinsなどがサポートされていない。
# sample.py import falcon class QuoteResource: def on_get(self, req, resp): """Handle GET requests.""" quote = { 'author': 'Grace Hopper', 'quote': ( "I've always been more interested in " "the future than in the past." ), } resp.media = quote app = falcon.App() app.add_route('/quote', QuoteResource()) $ pip install falcon gunicorn $ gunicorn sample:app Fast Falcon is a blazing fast, minimalist Py
Open Source Developer, Author, Editor. There’s always room for pie. I’ve been reviewing lot of code lately for various open source and internal projects written in Python. As part of those reviews, I have noticed what I think is a trend toward using dict() instead of {} to create dictionaries. I don’t know exactly why this trend has emerged. Perhaps the authors perceive dict() as more readable tha
--- v1 +++ v2 @@ -1,5 +1,31 @@ -Welcome to your wiki! - -This is the default page, edit it as you see fit. To add a page simply reference it within brackets, e.g.: [SamplePage]. - -The wiki uses [Markdown](/p/kajiki/home/markdown_syntax/) syntax. +![Kajiki](http://kajiki.pythonisito.com/_images/Logo.png "Kajiki") + +Are you tired of the slow performance of Genshi? But you still long for the assura
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く