... | ... | @@ -140,3 +140,22 @@ Ex: collect (and count) all the flags values of a file: |
|
|
Flag,(NULL),26860
|
|
|
Flag,E,9924
|
|
|
Flag,B,8
|
|
|
|
|
|
## tmpfs - mount directory in RAM
|
|
|
|
|
|
When a directory grows in size of number of files, the disk I/O becomes slower, even with SSD disks.
|
|
|
|
|
|
A quick and dirty solution during development is to use [tmpfs](https://en.wikipedia.org/wiki/Tmpfs) like so (paths are simplified):
|
|
|
|
|
|
```sh
|
|
|
cd json-data
|
|
|
sudo mount -t tmpfs -o size=8g tmpfs wto-json-data-tmpfs
|
|
|
|
|
|
cd wto-fetcher
|
|
|
./wto_to_dbnomics.py wto-source-data wto-json-data-tmpfs
|
|
|
|
|
|
cd json-data
|
|
|
sudo umount wto-json-data-tmpfs
|
|
|
```
|
|
|
|
|
|
Warning: after un-mounting, data is lost! Once your script is OK, execute it against the real `wto-json-data` directory. |
|
|
\ No newline at end of file |