Comments (14)
$ sysctl vm.overcommit_memory
vm.overcommit_memory = 0
$ sysctl vm.overcommit_ratio
vm.overcommit_ratio = 50
$ free
total used free shared buffers cached
Mem: 502944 164716 338228 0 16520 67608
-/+ buffers/cache: 80588 422356
Swap: 0 0 0
Well, I guess it is pretty much self-explanatory... There is simply not enough memory.
from wrk.
@hamiltont can confirm, also on a t1 micro. Thanks!
from wrk.
Hi @suminb, could you share the output of sysctl vm.overcommit_memory and vm.overcommit_ratio on your system? How much RAM and swap does it have?
wrk allocates quite a bit of memory in advance for data samples, though most won't be used during a short test.
from wrk.
It was one of the virtual machines that I use for development purposes. I increased the system memory size to 2 GB and tried it again. It worked without any problem.
from wrk.
Glad to hear you got it running!
from wrk.
For future travelers, this also happens on t1.micro instances. Upgrading to m1.medium resolved the problem as explained above
from wrk.
does anyone know if m1 small is sufficient? I have already set up a small machine and i would rather not to proceed in a medium one... thanks :)
from wrk.
@NickSar I think that wrk allocates most memory up front, so if you can call ./wrk ${URL}
(on any URL) without an immediate crash then you should be good to go
from wrk.
any way to reduce the amount of memory allocated by wrk upfront ?
from wrk.
+1 for method to reduce memory up front. For ensuring consistency, perhaps have the flag also print something like WARNING: wrk has been requested to reduce it's memory footprint. You may experience segfaults and/or your results may not be valid
from wrk.
+1
from wrk.
Shorter timeout may save your memory.
https://github.com/wg/wrk/search?utf8=✓&q=stats_alloc&type=Code
from wrk.
ty
from wrk.
39af03f
This commit reduced memory usage dramatically.
Before: 800MB * 2 for statistics.latency
and statistics.requests
After: 8 * (timeout [us]) for statistics.latency
and 80MB for statistics.requests
from wrk.
Related Issues (20)
- Total request statistics are inaccurate
- Feature request: an example script with a pause after each request
- Any way to register a hook on response timeout?
- streaming requests and responses
- wrk 4.2.0 regression test failed with luajit 2.1.0-beta3-20230416.4 HOT 4
- how to use socks5 proxy?
- Multiple domain support
- How to compile wrk.c?
- add binaries download for windows 10/11
- Support for redirects
- support do a slow speedup on start
- Process to compile in windows 10/11 HOT 3
- What about high latency of wrk access interface on ubuntu? HOT 1
- Allow disable "keep alive" feature HOT 1
- Help needed invoking multiple addresses HOT 2
- Question of Nginx CPU usage under wrk stress test HOT 2
- No slash after domain drops GET query params
- Very need http proxy function, can support?
- test
- Sampling latency
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 wrk.