Comments (7)
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.
Not reproduce on my PC. Maybe ask help for @goccy ?
from sonic.
[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.
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.
[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.
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.
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)
- windows use sonic error
- 使用 marshal 方法出现问题 _blankCharsMask overflows int HOT 3
- github.com/bytedance/sonic/ast not support ARM32 "_blankCharsMask overflows int" HOT 2
- Go1.16 Encode/Marshal maybe OOM when high QPS for sonic v1.10.0~v1.11.6
- Go is going to lock down future uses of `linkname` HOT 6
- optimize stream decoder SkipOneFast
- 在启用cgo环境中的情况下,编译出错ast\decode.go:31:29: cannot use 4294977024 (untyped int constant) as int value in constant declaration (overflows) HOT 3
- Error: relocation target github.com/bytedance/sonic/internal/rt.StartProf not defined HOT 4
- Checking if a field has a certain JSON type HOT 1
- Unconsumed '}' in (*traverser).decodeObject() causes entries loss after nested empty object
- make strict and accurate build tags for all source files
- support marshal NaN and INF with customed handler
- Enhance the unittest and integration testing
- minimize the performance gap for stream APIs
- make fuzz testing run longer
- Incompatible with Go 1.23, which doesn't allow //go:linkname to internal symbols, including to runtime package HOT 3
- A running error occurred in the arm environment HOT 1
- 能否添加一个MarshalIndent在根方法那里? HOT 1
- Unmarshal/Marshal for unsupported field not as encoding/json HOT 1
- What is the maximum depth of data that sonic.Marshal can serialize? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sonic.