Practical Tips and Tricks to Improve Your Compose Previews (Android Worldwide July 2024)
概要 当時数ヶ月間誰も原因がわからなかった一時的にRDSの負荷(CPU使用率)がスパイクする現象の原因を調査できる環境を整えて、原因分析〜改善まで実施したときの話です。 1つ1つの取り組み自体は大きなことはやっていませんが、一連の動きで得られたものも多かったのでアウトプットしようと思い記事にまとめました。 取り組んだ課題 原因を特定するためのツールがない そもそも何が原因でRDSのCPU負荷が高まっているのかを調べるための情報がCPU使用率以外に全くない状況でした。 そこでRDSの負荷原因を探る方法を調べると、Performance InsightsやCloudWatch Logsへのスロークエリログ出力を使う記事をいくつか見つけたのでこの2つについて調べることにしました。 Performance Insights データベース負荷をSQLなどの単位で時系列で可視化したり、トップSQLやD
Last week during a casual conversation I overheard a colleague saying: "The Linux network stack is slow! You can't expect it to do more than 50 thousand packets per second per core!" That got me thinking. While I agree that 50kpps per core is probably the limit for any practical application, what is the Linux networking stack capable of? Let's rephrase that to make it more fun: On Linux, how hard
Note: Sections 2.0 and 3.0 of this article were added in response to comments on Hacker News and Reddit. Since its inception on 2000-05-29, SQLite has been implemented in generic C. C was and continues to be the best language for implementing a software library like SQLite. There are no plans to recode SQLite in any other programming language at this time. The reasons why C is the best language to
オラクルはLinuxカーネルのパラメータを、ワークロードに合わせて継続的に自動チューニングするツール「bpftune」をオープンソースで公開しました(GitHubのページ)。 bpftuneは「BPF」(Berkeley Packet Filter)と呼ばれる、Linuxカーネル内のさまざまな機能をフックして機能拡張が可能な仕組みを利用し、継続的にLinuxカーネルのきめこまなかレベルで監視を行い自動チューニングを実現しています。 オラクルはbpftuneを開発した背景として、クラウドに代表される大規模なサーバ展開が可能なインフラにおいて、以前よりも個々のサーバのチューニングについて注意が払われることがほとんどなくなったこと、チューニングされるとしても静的に適切な設定があると考えられることが一般的であることを挙げています。 bpftuneによる自動チューニング対象の項目 bpftuneは現
お願い 「C10K 問題とは何か」がわかる方は是非 Issue や Twitter などで教えてください。 追記: 自分の立場 1req ごとに 1 native thread を割り当てていたら、クライアントの数が増えれば増えるほど負荷が高まるのは当然だ。ただハードウェアの性能的に余裕があっても性能が劣化することがあり、それを C10K 問題と呼ぶ。C10K 問題は fd, pid の枯渇、スレッドを固定長サイズで確保することによるメモリの無駄遣い、コンテキストスイッチコストを含む。これを解決する方法が 1req ごとに 1 native thread を割り当てない技術で、シングルスレッド+イベントループ+IO 多重化といったテクニックや M:N モデルにつながる。 追記: @naoya_ito さんに解説してもらった当時の歴史的背景 https://twitter.com/naoya
皆さんこんにちは お元気ですか?私は元気です。 Pythonにおける高速化手法を掲載してみます。 簡単なコード並びに索引のような感じで引けるようなイメージで作成しました。 本日の目次です。 Pythonにおける高速化の必要性 Pythonの高速化 高速化の手順 Profiling 基本的な条件 計測コード Pythonの基本的な書き方部分 rangeよりxrangeを(Python2.7) リストの生成 文字列結合 Import文のコスト 関数呼び出しのコスト ドットを避ける yieldを使う Numpyに関するTips Numpyを使用して基本演算を高速化する Numpyの要素にアクセスする演算をしない Numbaで手早く高速化 その他高速化ツール Cython Dask PyPy 感想並びに展望 参考文献 Pythonにおける高速化の必要性 PythonはC++やJavaと比較すると非
来年こそ年収1000万以上狙いたいなら自分はこうする 面接の種類多すぎるので全部準備すると時間かかるので同じ面接タイプの企業を複数受けるのがコツです。 同時に勉強する勉強する大半給料の高い面接はコーディングテストあるのでleetcodeは必ずやる。leetcodeの練習は続くのが大事で1ヶ月に300問をやるぞというより1ヶ月に30問をやった方が覚えるしモチベーションが続く。 leetcodeの軌跡一日中leetcodeやるのは効率悪くなるのでドメイン知識のインプットしながらやっていく。学校の授業も一日中ずっと数学をやるのではなく複数科目をやっているのと同じ理由です。Spaced and Interleaved practiceの意識が大事 LeetCode最低限100問やってIDE補完やdocumentationなしでLeetcode mediumを解けるぐらいにしとく。 シニアレベルをも
「パフォーマンスについて言えば、ZigはCよりも速いです。」 この一文は Zig 言語の公式サイトの詳細な概要に実際に書いてある文章です。 その理由としていくつか挙げた上で最後にちらっと「Zig は SIMD ベクトル型を直接公開しており、移植性の高いベクトル化コードを簡単に記述することができます。」と書いてあります。今回の記事では画像処理っぽいお題を使って実際に SIMD 最適化される様子を検証してみます。 ベンチマーク環境 OS: Ubuntu20.04 on WSL2 on Windows11 CPU: AMD Ryzen 9 5900X 12-Core Processor お題 一般的な画像データ構造の表現である、幅×高さ×4(RGBA)の長さを持つ8bit整数の配列を受け取り、in-placeでRGBの値を 10 加算して明るくするという関数を考えます。Aの値は元のままとします。
はじめに XTechグループ Advent Calendar 2021の16日目は、iXIT株式会社 エンジニアの蝦名がお送りします。 最近ハマっているものは音楽系Vtuberです。VIRTUAFREAK良かった…。 qiita.com 本題 ツールなどを導入しなくてもSlowQueryを解析できる機能がMySQLには存在するので、今回はその一部を紹介します。 ちなみに私が開発しているサービスのMySQLバージョンは5.6です。 1. mysqldumpslow 一言で言うとスロークエリーログファイルを解析して内容のサマリーを出力してくれる機能です。 前提としてスロークエリーログを出力している必要があります。 使い方 コマンド ※合計実行時間が長い順に10件のSQLを出力する mysqldumpslow -s at -t 10 /opt/fio1/slog/sp-prd-db1-slow.
2022-09-09改訂: gcc バージョンが古すぎたのと、C が内部計測でなかった点を改め計測しなおしました。結果、Rust は C より速くはなくなりました。紛らわしいことで、ごめんなさい。また、gcc のバージョンアップに伴い、Python および Ruby についてはビルドと計測をしなおしたので、これらも少し速い値に変わっています。この点もどうぞあしからず。 2022-09-10追記:ご要望のあった Python numba.njit 使用時と Go の結果を追加しました。PHP は JIT 有効化が面倒だったので断念しました^^; 2022-09-10追記2:C の計測で clock() を使うのはフェアではないという指摘がありましたので、念のため clock_gettime() を使用したコードに差し替えました。結果に大きな差はありません。 2022-09-10追記3:PHP
Linus Torvalds: Rust For The Kernel Could Possibly Be Merged For Linux 5.20 Written by Michael Larabel in Linux Kernel on 21 June 2022 at 11:49 AM EDT. 75 Comments Speaking this morning at The Linux Foundation's Open-Source Summit, Linus Torvalds talked up the possibilities of Rust within the Linux kernel and that it could be landing quite soon -- possibly even for the next kernel cycle. Linus Tor
2017年9月に登場したJava 9以降、Javaは6カ月ごとに「フィーチャーリリース」と呼ばれるメジャーアップデートが行われています。Java 13は、今年3月に登場したJava 12に続くメジャーアップデートです。 Java 13のおもな新機能は、Application Class-Data Sharing機能を拡張した「Dynamic CDS Archives(JEP 350)」、ZGCガベージコレクタを改善し使われていないヒープメモリを返却する「ZGC: Uncommit Unused Memory(JEP 351)」、Project Loomの一部として既存のSocket APIを再実装した「Reimplement the Legacy Socket API(JEP 353)」、Switch式を可能にする「Switch Expressions(JEP 354)」(プレビュー)、J
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く