FAQ - 404Setup/Mars GitHub Wiki
Why not use net/http instead of fasthttp?
Well, first I've tried it in gin and it got a really bad performance.
Fasthttp has very high performance, of course, it does this by trading memory for CPU, but net/http doesn't seem to help at all, and is actually worse.
After I replaced fasthttp with gin, turned off active GC, and then uploaded to vine-server, the memory usage of gin was twice that of fasthttp (when active GC was also turned off for fasthttp). Oh no....
Since I didn't have git setup, I wasted an hour of my life testing it and then slowly rolling it back. So now Mars is still based on fasthttp.
Why aren't it recommended for ordinary users to use Mars?
First of all, it is suitable for people who want to build hardware that has the same effect as papermc.io but lacks some large memory. Mars does not need a huge JVM and is compatible with SQLITE mode. Download, configure, launch, and then available.
If you are a regular user, you will find that Mars is basically useless to you and you can't find any scenarios that can use it.
If you are a non-Minecraft Server Fork developer, then Mars is not for you, and you will find that there are a lot of builds under a version, and your API doesn't need to be that complicated.
Can I use TLS on Mars?
It is not recommended to do this. Although I added TLS support in 1.3.0, it is still experimental. You should close the public access of the Mars port in the firewall, and then use software such as caddy, nginx to proxy its traffic.
How much memory should Mars occupy?
I will upload two jars, bundler and paperclip, at the same time. They occupy 143M on the hard disk. After passing Mars, Mars occupies 123M of memory. If active_gc
is enabled, the memory is recycled to 57M after the upload is completed. If all_recycled
is enabled, it is 7M.
Is there any difference between v1-v4?
In the AMD64 architecture in Golang, there are four architectural levels.Each level differs in the set of x86 instructions that the compiler can include in the generated binaries:
- v1 (default): The baseline. Exclusively generates instructions that all 64-bit x86 processors can execute.
- v2: all v1 instructions, plus CMPXCHG16B, LAHF, SAHF, POPCNT, SSE3, SSE4.1, SSE4.2, SSSE3.
- v3: all v2 instructions, plus AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, OSXSAVE.
- v4: all v3 instructions, plus AVX512F, AVX512BW, AVX512CD, AVX512DQ, AVX512VL.
It is recommended to run Mars on a processor that supports v3-v4, which can bring higher performance improvements. The arm64 architecture processor only includes sha256 calculation acceleration.
Can Mars builds be provided for other operating systems/CPU architectures?
No.
Mars only provides compatibility for x64 by default, arm64 is only attached.
I don't have a test environment other than Windows and Linux, and I can't guarantee whether Mars will run well in it.