Code Monkey home page Code Monkey logo

Comments (4)

msiebuhr avatar msiebuhr commented on August 17, 2024

For good measure: It's in a branch where I'm experimenting with namespaces, so that may be related.

from ucs.

msiebuhr avatar msiebuhr commented on August 17, 2024

Not related to namespaces, but fs-cache GC - when run with a cache-size of eg. 1k, it will GC a lot, and eventually it can't keep up with the clients -- half closed connections and open file-handles all over.

go run ./cmd/ucs -quota 100k -verbose
go run ./cmd/ucs-bender #Possibly in separate terminal window
# Now observe the server's epic slowness

(Edited to clarify it's about the cache GC, not Go GC + example)

from ucs.

msiebuhr avatar msiebuhr commented on August 17, 2024

Thinking it over, it should have some way of ensuring we'll do a GC on/after an upload. Current logic is to check if (quota < size + newly-uploaded-item) { gc() }, which means we'll do a GC on most uploads when we're hovering around the quota.

  • Run GC periodically (either timer or every X requests/connections)
  • Over-GC (say, 10% or just remove the oldest entry from every bucket)
  • Have a lock/queue, so we don't over-schedule GC's (we can upload small items a lot faster than we can GC them)
  • More fine-grained locking so GC doesn't block new uploads (goes with locked GC'ing, so we don't have something looking at files while another is deleting them...)

from ucs.

msiebuhr avatar msiebuhr commented on August 17, 2024

After some thinking / digging it turned out to be caused by a missing Close() call when GC'ing.

Bumping the last comment to a new issue, as it really should be fixed too - see #13

from ucs.

Related Issues (19)

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.