# What is this?
If you have something you are working on that may accidentally consume all your RAM (read: are a data scientist), you probably want your process OOM reaped before the other ones. What you absolutely do not want is something like process that may fail in a bad state getting reaped instead.
If you install this package with,
`bash pip install oom_reap_me_first `
then do,
`python import oom_reap_me_first.auto_enable # noqa # pylint: disable=unused-import `
at the top of your, say, Jupyter notebook, the importing processes oom_score_adj will be set to 1000, which means it will (probably?) get reaped first.
This works particularly well if you [disable swap](https://graspingtech.com/disable-swap-ubuntu/), so you don’t end up in the dreaded situation of your REPL taking all the RAM then hitting disk so hard that you can’t even i-i it.
# What else should I know?
The oom_score_adj that controls what gets preferentially gets killed can be configured automatically for systemd services. If you have something that you really don’t want to get killed, you should put,
` oom score -1000 `
in the service unit definition. Alternatively, if you are not using python you can use the choom (change-OOM) command
`bash choom -p PID -n number `
See the [man page](https://man7.org/linux/man-pages/man1/choom.1.html) here.
However, I am lazy and my solution suits me better.
Metadata
Release files for oom-reap-me-first 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| oom_reap_me_first-0.0.1.tar.gz | 3.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| oom_reap_me_first-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.5 kB
Release files / oom_reap_me_first-0.0.1.tar.gz
| Download URL | oom_reap_me_first-0.0.1.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c58fae38208315ae49711ab5e3ac69d4948b516aaabd6324b35ffdea6728afd1
|
|
BLAKE2b-256 checksum How to use checksums |
b66f56eb1af73272f37e1fdabafdc19e639a8199fa64f26c4bc05c30a3078d51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.13
|
Release files / oom_reap_me_first-0.0.1-py3-none-any.whl
| Download URL | oom_reap_me_first-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee60bd43ee181973f02cafd5db62e0e48ec6a6d1f6ddd80826fc99d068ac78a0
|
|
BLAKE2b-256 checksum How to use checksums |
f3dd9a57c0bd34d9c46d3bf20e513a044a70d06a3b89743465a869c7ca54ab85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.13
|
Security for oom-reap-me-first 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.