Git Product home page Git Product logo

Comments (7)

wymli avatar wymli commented on July 24, 2024 1

Actually, MemAvailable: 859404 kB is the mem a process can really get without swapping.
>>> 859404 / 1024.
839.26171875
maybe other pkgs won't occupy more than 200M?

ok, i will try it later on a machine with larger mem.

from sonic.

AsterDY avatar AsterDY commented on July 24, 2024

Not reproduce on my PC. Maybe ask help for @goccy ?

from sonic.

wymli avatar wymli commented on July 24, 2024

[liwm29@VM-12-11-centos test_sonic]$ uname -a
Linux VM-12-11-centos 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

the machine is a tencent cloud server @goccy

from sonic.

goccy avatar goccy commented on July 24, 2024

Perhaps this is an error caused by a very low memory on the server being built.
I have confirmed that it can be compiled with at least 600MB ( FYI: https://github.com/goccy/go-json/blob/master/docker-compose.yml#L10 ). Check the memory of the server .

from sonic.

wymli avatar wymli commented on July 24, 2024

[liwm29@VM-12-11-centos sonic]$ cat /proc/meminfo
MemTotal: 1882020 kB
MemFree: 606568 kB
MemAvailable: 859404 kB
Buffers: 14476 kB
Cached: 362404 kB
SwapCached: 0 kB
Active: 878820 kB
Inactive: 273936 kB
Active(anon): 782712 kB
Inactive(anon): 276 kB
Active(file): 96108 kB
Inactive(file): 273660 kB
....
it seems that MemFree ≈ 600MB

from sonic.

goccy avatar goccy commented on July 24, 2024

There seems to be a relationship. It actually compiles another library besides go-json at the same time,
so you may need a little more memory.

If this behavior is unacceptable, it seems that we have to separate benchmark code ( like this ) or remove go-json from the benchmark target .

from sonic.

wymli avatar wymli commented on July 24, 2024

Well, in my wsl, it works.
Thanks a lot

liwm29@wymli-NB1:/mnt/d/app/sonic$ go test -count=1 ./...
ok github.com/bytedance/sonic 3.119s
ok github.com/bytedance/sonic/ast 0.024s
ok github.com/bytedance/sonic/decoder 0.282s
ok github.com/bytedance/sonic/encoder 0.265s
ok github.com/bytedance/sonic/internal/caching 0.027s
? github.com/bytedance/sonic/internal/cpu [no test files]
ok github.com/bytedance/sonic/internal/jit 0.019s
ok github.com/bytedance/sonic/internal/loader 0.026s
? github.com/bytedance/sonic/internal/native [no test files]
ok github.com/bytedance/sonic/internal/native/avx 0.013s
ok github.com/bytedance/sonic/internal/native/avx2 0.011s
? github.com/bytedance/sonic/internal/native/types [no test files]
ok github.com/bytedance/sonic/internal/resolver 0.004s
? github.com/bytedance/sonic/internal/rt [no test files]
? github.com/bytedance/sonic/unquote [no test files]

liwm29@wymli-NB1:/mnt/c/WINDOWS/system32$ cat /proc/meminfo
MemTotal: 6399360 kB
MemFree: 6285696 kB
MemAvailable: 6180448 kB

from sonic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.