icon

少しはDB負荷マシになったか…?

icon

これ罠かも

2023-03-13 19:52:08 ュドウフの投稿 _yudoufu@misskey.tech
icon

このアカウントは、notestockで公開設定になっていません。

icon

できればMastodonと同等かそれ以上の招待コード管理がしたいよね

icon

いやー、Misskeyの招待コード正直使いづらい

icon

一時間で1000回以上実行されてるので流石に無視できない

とりあえずメモ代わりに負荷の高いクエリを貼っておく
icon

SELECT "Hashtag"."id" AS "Hashtag_id", "Hashtag"."name" AS "Hashtag_name", "Hashtag"."mentionedUserIds" AS "Hashtag_mentionedUserIds", "Hashtag"."mentionedUsersCount" AS "Hashtag_mentionedUsersCount", "Hashtag"."mentionedLocalUserIds" AS "Hashtag_mentionedLocalUserIds", "Hashtag"."mentionedLocalUsersCount" AS "Hashtag_mentionedLocalUsersCount", "Hashtag"."mentionedRemoteUserIds" AS "Hashtag_mentionedRemoteUserIds", "Hashtag"."mentionedRemoteUsersCount" AS "Hashtag_mentionedRemoteUsersCount", "Hashtag"."attachedUserIds" AS "Hashtag_attachedUserIds", "Hashtag"."attachedUsersCount" AS "Hashtag_attachedUsersCount", "Hashtag"."attachedLocalUserIds" AS "Hashtag_attachedLocalUserIds", "Hashtag"."attachedLocalUsersCount" AS "Hashtag_attachedLocalUsersCount", "Hashtag"."attachedRemoteUserIds" AS "Hashtag_attachedRemoteUserIds", "Hashtag"."attachedRemoteUsersCount" AS "Hashtag_attachedRemoteUsersCount" FROM "hashtag" "Hashtag" WHERE ("Hashtag"."name" = $1) LIMIT $2
SELECT "__chart__per_user_notes"."id" AS "__chart__per_user_notes_id", "__chart__per_user_notes"."date" AS "__chart__per_user_notes_date", "__chart__per_user_notes"."group" AS "__chart__per_user_notes_group", "__chart__per_user_notes"."___total" AS "__chart__per_user_notes____total", "__chart__per_user_notes"."___inc" AS "__chart__per_user_notes____inc", "__chart__per_user_notes"."___dec" AS "__chart__per_user_notes____dec", "__chart__per_user_notes"."___diffs_normal" AS "__chart__per_user_notes____diffs_normal", "__chart__per_user_notes"."___diffs_reply" AS "__chart__per_user_notes____diffs_reply", "__chart__per_user_notes"."___diffs_renote" AS "__chart__per_user_notes____diffs_renote", "__chart__per_user_notes"."___diffs_withFile" AS "__chart__per_user_notes____diffs_withFile" FROM "__chart__per_user_notes" "__chart__per_user_notes" WHERE ("__chart__per_user_notes"."group" = $1) ORDER BY "__chart__per_user_notes"."date" DESC LIMIT $2

icon

正直どちらもわざわざDBに負荷掛けてまで必要な機能とは思えん

icon

一応リアルタイムで実行クエリ別のDB負荷は見てるんだけど、トレンドハッシュタグ系と各種チャート作成のためのクエリが結構重ためかも

icon

Misskey良い感じにconfigファイルで簡単にReadとWriteをそれぞれ設定できるようにならないかなーーー

icon

チューニングする暇無いのでとりあえずさらにDBをスケーリングさせてみる

icon

これ以上DBスペックあげたら破産しちゃうッピ!!!

icon

DBスケーリングしたのに100%張り付いとる:hiroshi_crying:

icon

ちょっと今ガチ業務で忙しいので一段落したら説明します

icon

色々説明をはしょって招待コード権限を付与してしまった私が悪かった、大変申し訳無い

icon

ようやくおしごとの本番障害対応が終わったけど軽く休憩したら障害発生後のふりかえりじゃ…

icon

何が原因かはよく分からんけど.techだけジョブキュー詰まってた、nokotaro.comとnokotaro.workは問題無かったのにね

icon

omhncは関係無かったわね:woozy_cute:

icon

おしごとの障害対応が終わるまでとりあえず放置しとく

icon

DBもAppもスケーリングされたので爆速でジョブキュー捌き中

icon

ていうかGTLに8時間前のnoteが大量に流れてるんだけど

icon

omhnc来たらDB重たくなった🥴

icon

omhncおるやんけ!

icon

流石にMisskey.tech誰も居らんかしら

icon

おはようございます

icon

昨日のMisskeyの活動は

ノート: 5728(+3)
フォロー : 147(+0)
フォロワー :181(+0)

でした。
https://misskey.tools