Skip to content
This repository was archived by the owner on Apr 9, 2021. It is now read-only.

Comments

In memory fdsnws-station-text#87

Open
damb wants to merge 3 commits intonextfrom
feature/in-memory-station-text
Open

In memory fdsnws-station-text#87
damb wants to merge 3 commits intonextfrom
feature/in-memory-station-text

Conversation

@damb
Copy link
Contributor

@damb damb commented Nov 26, 2019

Features and Changes:

  • Instead of dumping fdsnws-station-text download task results into temporary files, keep them in-memory

Daniel Armbruster added 3 commits November 22, 2019 13:04
Implement an in-memory download task for fdsnws-station-text. The class
inherits from InMemoryTask.
When downloading fdsnws-station-text the corresponding RequestProcessor
can either handle a (temporary) file-based download task or an in-memory
download task. Though task types, switching is not configurable, yet.
@damb
Copy link
Contributor Author

damb commented Nov 26, 2019

Stats:

Test were performed using the docker setup from https://github.com/EIDA/mediatorws/tree/feature/in-memory-station-text/docker/prod at localhost (i.e. granular endpoint requests; HTTP caching); logLevel=WARNING

N=100
Columns: Percentiles | Response start time | Response total time (times in seconds)

  • Query: /fdsnws/station/1/query?net=CH&format=text
    • File based:

      50%: [0.9462825 2.1556645]
      85%: [0.9964951 2.26633  ]
      90%: [1.0228163 2.3158552]
      95%: [1.1145799  2.39628655]
      99%: [2.04467591 3.22645922]
      
    • In-memory:

      50%: [0.8970515 2.0515955]
      85%: [0.92775625 2.11524265]
      90%: [1.5534705 2.70055  ]
      95%: [1.6321251 2.8170224]
      99%: [2.27393176 3.44195183]
      

The difference is just marginal. Most probably there is still some kind of OS-level caching involved.

@kaestli
Copy link
Contributor

kaestli commented Nov 26, 2019

This is OS level disk caching.

@damb
Copy link
Contributor Author

damb commented Nov 26, 2019

This is OS level disk caching.

@kaestli, do you know the actual limits of OS-level disk caching? How does it scale with more files (most probably this is both hardware, OS and filesystem dependent, right)?

@kaestli
Copy link
Contributor

kaestli commented Nov 26, 2019

I know that linux typically uses the entire free physical RAM for caching (windows, at least non-server versions, not).
It is widely configurable (e.g. https://unix.stackexchange.com/questions/30286/can-i-configure-my-linux-system-for-more-aggressive-file-system-caching); configuration is different for physical devices and NFS. Actual disk operation is FS-dependent, thus i guess also the effects of some config parameters.
I think, at least for the current application, OS level optimization of the caching strategy may be overkill.

@damb damb added the station label Jan 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants