trinodb / trino

Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
https://trino.io
Apache License 2.0
10.25k stars 2.95k forks source link

Support Presto on s390x #4614

Open zhengxiaomei123 opened 4 years ago

zhengxiaomei123 commented 4 years ago

Metering Operator uses Presto database to do analytical querying on collected data using SQL. In order to enable Metering Operator on s390x arch, we have to enable Presto on s390x firstly. We built the Presto on s390x and run it in openshift platform, but we met the 4 problems which are system requirements for Presto working well.

a) Presto requires amd64 or ppc64le on Linux (found s390x)
b) Presto requires a little endian platform (found BIG_ENDIAN)
c) WARNING: Current garbage collectors are [scavenge, global]. Presto recommends the G1 garbage collector.
d) Slice library produced an unexpected result

As we discussed on slack before, I got the informations:

a — this is sanity check. It’s easy to disable (comment out or add “s390x” to accepted values), but this is the last thing we should do (from user perspective). We need to verify Presto works on s390x first.
b and d are related — some places in the code would need an update. Slice library (https://github.com/airlift/slice/) is the one thing where you could want to start the work.
c — is relatively minor, compared to other problems, but may mean that Presto on s390x won’t be as performant as on amd64, due to JVM garbage collector limitations.
zhengxiaomei123 commented 4 years ago

Another question is the state of Java / JDK on s390x. It appears to not have the G1 GC. Does it have a JIT? Are there other things missing? Is it a fully certified implementation that passes the TCK?

zhengxiaomei123 commented 4 years ago

About the Big Endian problem, The CPU arch matters for native code we ship (some compression libs, hadoop libs). CPU endianness matters for Slice class for sure (all the number decoding methods). It may matter in some other code places I am not aware of and won’t be able to point you at.