Support for ARM servers

https://github.com/discourse/discourse_docker/issues/121

Continuing on from the discussion on ARM support at GitHub.

ARM support would be extremely useful for owners of small communities like myself because of the extremely low price (like the Scaleway 2GB ARM servers for €2.99) and for those who can’t afford the move from cheap shared hosting to the dedicated or KVM machines that Discourse requires.

https://community.scaleway.com/t/discourse-instantapp/452

There has also been some discussion of this on the Scaleway forums, although much of this has been around getting Discourse working without using the Docker method.

5 个赞

As @erlend_sh said, this is a blocker. No updates so far? Maybe Discourse could provide a list of non-ARM gems so far so that we could track here the process with respect to blocking dependencies?

1 个赞

Simplest thing to do is install Ruby on a scaleway copy our Gemfile and do a bundle install… what happens?

bundle install is not an issue.

However, the therubyracer and v8 gem requires some patches/different version. Otherwise, the
RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production bundle exec rake assets:precompile
does not finish, but break with a stack trace.

Purging temp files
abort:

==== JS stack trace =========================================

Security context: 0x3fd36f3d <JS Object>#0#
    1: /* anonymous */ [<eval>:~56513] (this=0x3fd36fe5 <JS Global Object>#1#,data=0x4f74cec5 <JS Array[2]>#2#)
    2: intersection [<eval>:57141] (this=0x4f74d431 <JS Object>#3#,argument=0x4f74ce7d <JS Object>#4#)
    3: /* anonymous */ [<eval>:58617] (this=0x4f70b199 <an Object>#5#,_dereq_=0x4f70b0f1 <JS Function>#6#,module=0x4f70b1a5 <an Object>#7#,exports=0x4f70b199 <an Object>#5#)
    4: arguments adaptor frame: 7->3
    5: s [<eval>:~2] (this=0x3fd36fe5 <JS Global Object>#1#,o=591,u=0x3fd08091 <undefined>)
    6: arguments adaptor frame: 1->2
    7: /* anonymous */ [<eval>:2] (this=0x3fd36fe5 <JS Global Object>#1#,e=591)

stacktrace.txt (291 KB)

This seems to be the upstream bug: TheRubyRacer 0.12.1 Segmentation Fault · Issue #317 · rubyjs/therubyracer · GitHub
I posted recently a comment, but did not get a response.

Scaleway patches the Gemfile and Gemfile.lock in order to use local versions that have been downloaded from elsewhere: https://github.com/scaleway-community/scaleway-discourse/blob/master/Dockerfile#L53

5 个赞

For those looking into this, a fair amount of progress has been made on this front:

https://community.scaleway.com/

7 个赞

Nice looks like mini racer helped here @sam!

7 个赞

现在在 ARM 上能用了吗?

这仅仅是需要修改安装脚本的问题,还是确实使用了 x86 二进制闭源组件?

如今大家都有 100Mbit 的线路,很多人家里甚至已经接入了千兆光纤。只需花 30 美元买一台搭载 Cortex-A55 的电视盒子,通过 3 美元的 USB 3.0 转接头接入旧 SSD,安装 Linux 即可投入使用。它几乎不耗电,处理速度和磁盘速度却令人惊叹。其延迟往往比数据中心还低。这甚至算不上托管的未来,因为这项技术早已存在。它完全优于任何中端服务器,实际上只有优势,没有任何劣势。

1 个赞

并非每个人都有幸享受到如此快的网速(更不用说光纤互联网了)。有些人甚至还在使用拨号上网。这种情况在美国开始有所改变,但在贫困地区的改变却微乎其微。不过,我想还是有必要提一下 Starlink

1 个赞

你说得很有道理,但我认为在数据中心中这一点甚至更加重要。

ARM 在数据中心的广泛采用有望实现巨大的能效提升(> 2 倍?)并降低成本,从而产生重大影响。这是一个非常负责任的目标。

顺便提一下,这个话题最近在以下讨论中被提及:Require ARM64 Support - #3 by david 二进制文件)在 x86 架构之外不可用。

3 个赞

现在支持了

5 个赞