07:06:32
2017-04-21 07:06:32 zundaの投稿 zundan@mastodon.zunda.ninja
07:06:35
icon

おっと

07:14:46
2017-04-21 07:14:46 zundaの投稿 zundan@mastodon.zunda.ninja
07:14:47
2017-04-21 07:14:47 zundaの投稿 zundan@mastodon.zunda.ninja
07:38:17
2017-04-21 07:38:17 zundaの投稿 zundan@mastodon.zunda.ninja
07:39:01
2017-04-21 07:39:01 zundaの投稿 zundan@mastodon.zunda.ninja
07:39:34
2017-04-21 07:39:34 zundaの投稿 zundan@mastodon.zunda.ninja
07:39:35
2017-04-21 07:39:35 zundaの投稿 zundan@mastodon.zunda.ninja
07:48:40
icon

@ms2sato 手元のぼっちインスタンスでは、pumaのスレッド数を5から3くらいに少なくしたほうがswapに突っ込んじゃうと可能性が低そうだなあと感じてます。もうすぐ確かめる!

08:27:06
icon

With decreased number of threads (3) on puma process (2):

Web:
- Max total memory: 286 MB
- Mat response time: 107 ms median, 735 ms 95%
- Max throughput: 15 request/min
Worker:
- Max total memory: 228 MB

Seems like I can combine two processes onto one dyno of 512 MB memory.

Plot is memory profile of the web dyno where puma threads are changed from 5 to 3 around 2017-04-21 01:00 UTC. https://mastodon.zunda.ninja/media/sTcqKyAhQbSKCz9fJ5E

Attach image
08:28:22
icon

https://github.com/zunda/mastodon/wiki/CreateInstanceOnHeroku に、rake mastodon:dailyをHeroku Schedulerに登録する手順を追加しました。

09:00:03
icon

OK. This instance is now running b1d4efc on https://github.com/zunda/mastodon/tree/zunda-ninja-on-heroku with

- heroku config:set MAX_THREADS=3
- heroku ps:scale web=1 worker=0

Let's see if the instance continue running healthy :)

Web site image
GitHub - zunda/mastodon at zunda-ninja-on-heroku
09:07:28
icon

Database status:

$ heroku pg:info DATABASE
=== DATABASE_URL, PG_HOBBY_BASIC_URL
Plan: Hobby-basic
Status: Available
Connections: 7/20
PG Version: 9.6.1
Created: 2017-04-20 18:31 UTC
Data Size: 17.4 MB
Tables: 26
Rows: 10903/10000000 (In compliance)

12:48:25
icon

@ms2sato ありがとうございます!

1 dynoにSidekiqを詰めようとするとpumaの2プロセス✕5スレッドでらメモリが512 MBから溢れそう、と書きたかったのでした。

こちらではアカウント1つのインスタンスが、puma 2プロセス✕3スレッドで6時間ほど稼働させてみてしてます。R14をもらうとしたらこれからかもですね…。

pumaとSidekiqを同居させるには、シェルからバックグラウンドに送る方法もありました: https://github.com/zunda/mastodon/blob/zunda-ninja-on-heroku/Procfile

Web site image
mastodon/Procfile at zunda-ninja-on-heroku · zunda/mastodon
17:10:44
2017-04-21 17:10:44 zundaの投稿 zundan@mastodon.zunda.ninja
20:11:57
2017-04-21 20:11:57 zundaの投稿 zundan@mastodon.zunda.ninja
20:12:24
icon

このインスタンス全然メール送ってこないのなんか変なのか…?

20:13:44
icon

@himamura mstdn.jpがそれ(というかきっかけの一つ)かも?

21:37:02
2017-04-21 21:37:02 zundaの投稿 zundan@mastodon.zunda.ninja
21:38:04
2017-04-21 21:38:04 zundaの投稿 zundan@mastodon.zunda.ninja
21:39:38
icon

にゃーん