Skip to content

Commit

Permalink
closes #63 - add minimum RAM requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
thatmattlove committed Jul 19, 2020
1 parent b686174 commit 212edf3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions docs/docs/production.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ To determine the number of CPU cores on the system, Python's [multiprocessing](h

While hyperglass is, to the extent possible, fully [asynchronous](https://docs.python.org/3/library/asyncio.html) (which means tasks may be run while waiting on other tasks to complete), this asynchronism is currently only applicable to **each request**. This means that with a single worker process, while one request is being processed, a second request must wait until the first request completes. If the first request is long-running for whatever reason, the second request may time out (this also applies to running multiple queries at the same time, in the same session).

To combat this, hyperglass uses the above worker strategy. **Ultimately, it's important to provision the appropriate number of CPU cores, corresponding to the number of concurrent sessions you might expect to have in your environment**.
To combat this, hyperglass uses the above worker strategy. **Ultimately, it's important to provision the appropriate number of CPU cores, corresponding to the number of concurrent sessions you might expect to have in your environment** (keeping in mind that if your system supports hyperthreading, each core equates to two workers).

:::note
When [debug](configuration.mdx#global-settings) is set to `true`, the number of workers is set to 1.
:::

### Memory

Testing shows that hyperglass is extremely memory efficient at runtime. For example, running 4 simulations BGP Route queries, with two devices utilizing [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent), and two devices utilizing SSH, the server increased RAM utilization by about 20MB during execution, and went back down afterwards. It should be more than safe to stick with the minimum system requirements for your Linux distribution.
Testing shows that hyperglass is extremely memory efficient at runtime. For example, running 4 simulations BGP Route queries, with two devices utilizing [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent), and two devices utilizing SSH, the server increased RAM utilization by about 20MB during execution, and went back down afterwards.

However, at build time, there are some fairly memory-intensive tasks which _will_ time out or cause strange errors without the proper amount of RAM. Testing suggests **2GB of RAM is sufficient**, however **4GB is the ideal minimum amount of RAM**.

### Storage

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/ui/logo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ During the [UI build process](setup.mdx#ui-build) hyperglass automatically gener
- `.svg`

:::caution Icon File Size
Generating the favicons is very CPU-intensive, and therefore has the tendency of timing out if the icon file is very large. If you receive a timeout error when starting hyperglass or running the `hyperglass build-ui` command, try reducing the size of the icon file. **File sizes of around 200 MB** have been known to succeed without too much overhead.
Generating the favicons is very CPU-intensive, and therefore has the tendency of timing out if the icon file is very large. If you receive a timeout error when starting hyperglass or running the `hyperglass build-ui` command, try reducing the size of the icon file. **File sizes of around 200 KB** have been known to succeed without too much overhead.
:::

The following icons types are generated:
Expand Down

0 comments on commit 212edf3

Please sign in to comment.