Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public instance is very slow #53

Open
chriskuehl opened this issue Nov 25, 2017 · 3 comments
Open

Public instance is very slow #53

chriskuehl opened this issue Nov 25, 2017 · 3 comments

Comments

@chriskuehl
Copy link
Owner

On the public instance:

$ echo asdf | time fpb
[...]
fpb  0.30s user 0.04s system 11% cpu 2.848 total

On a certain company's internal instance:

$ echo asdf | time fpb
[...]
fpb  0.18s user 0.02s system 39% cpu 0.485 total

Something must be misconfigured on the public instance?

(This only applies for new uploads, not for viewing files -- on the public instance, uploaded files are served directly by S3 with CloudFront in front of it, so it's very fast.)

@chriskuehl
Copy link
Owner Author

Interestingly, if I run a dev instance of fluffy on the same host as the prod fluffy.cc, it can paste in ~0.6s, whereas the prod one (running in Docker) consistently takes 2+ seconds. Networking misconfiguration maybe?

@chriskuehl
Copy link
Owner Author

Upgrading to the latest docker and switching from devicemapper to overlay2 shaved off about a second. I'm now getting roughly ~1.3 seconds to paste a new file, which is closer to what I'd expect, but still a lot slower than hitting dev fluffy...

The other (fast) internal fluffy I compared to also runs in Docker, so something is up...

@chriskuehl
Copy link
Owner Author

Added some timing code and compared inside and outside of Docker. Outside of Docker, paste() is ~instant (~0.006s) up until upload_objects is called. That function then takes 0.17s (roughly normal). The entire request (as measured by the flask app) takes ~0.18s.

Inside Docker, there is sometimes a big (~0.16s) delay between objects.append(uf) and when we call upload_objects (between C and D in this diff: https://i.fluffy.cc/H2pkJ5J37NMP8nHrjjvGJQg9MD2DGLm5.html. Sometimes it is "only" ~0.004 seconds. `upload_objects then takes ~0.74s, which is significantly more than outside Docker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant