Code Monkey home page Code Monkey logo

Comments (14)

suminb avatar suminb commented on June 2, 2024 1
$ 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.

weisjohn avatar weisjohn commented on June 2, 2024 1

@hamiltont can confirm, also on a t1 micro. Thanks!

from wrk.

wg avatar wg commented on June 2, 2024

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.

suminb avatar suminb commented on June 2, 2024

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.

wg avatar wg commented on June 2, 2024

Glad to hear you got it running!

from wrk.

hamiltont avatar hamiltont commented on June 2, 2024

For future travelers, this also happens on t1.micro instances. Upgrading to m1.medium resolved the problem as explained above

from wrk.

NickSar avatar NickSar commented on June 2, 2024

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.

hamiltont avatar hamiltont commented on June 2, 2024

@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.

strk avatar strk commented on June 2, 2024

any way to reduce the amount of memory allocated by wrk upfront ?

from wrk.

hamiltont avatar hamiltont commented on June 2, 2024

+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.

robertd avatar robertd commented on June 2, 2024

+1

from wrk.

methane avatar methane commented on June 2, 2024

Shorter timeout may save your memory.
https://github.com/wg/wrk/search?utf8=✓&q=stats_alloc&type=Code

from wrk.

robertd avatar robertd commented on June 2, 2024

ty

from wrk.

methane avatar methane commented on June 2, 2024

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)

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.