Repository navigation
Description
[splitting off #57]
Uh-oh: warning in Openshift console:
Warning: Gear 546a6d7e5973cac907000028 is using 95.6% of inodes allowed
Back to Openshift quota issue.
Following https://help.openshift.com/hc/en-us/articles/202399760-Disk-Quota-Exceeded-Now-What- :
[mathdown-cben.rhcloud.com 546a6d7e5973cac907000028]> quota -s
Disk quotas for user 546a6d7e5973cac907000028 (uid 4040):
Filesystem blocks quota limit grace files quota limit grace
/dev/mapper/EBSStore01-user_home01
617M 0 1024M 76453 0 80000
So inodes are tight but overall space is also 60% used.
Notable, partially overlapping, parts of storage used:
360M app-root
257M app-deployments/2015-01-25_18-20-02.081
212M app-root/runtime/repo
212M app-deployments/2015-01-25_18-20-02.081/repo
170M app-deployments/2015-01-25_18-20-02.081/repo/MathJax
169M app-root/runtime/repo/MathJax
104M app-root/logs
45M app-root/runtime/dependencies/.npm
45M app-deployments/2015-01-25_18-20-02.081/dependencies/.npm
AFAICT app-root vs app-deployments/2015... are copies, not symlinks nor hardlinks.
app-root/logs contains miniscule haproxy logs and 10x10M nodejs.log* consiting of stdout/err from my server.js.
For unclear reason, my logs consist predominantly of GET /: (abridged sort | uniq -c | sort -n):
1 GET /administrator/index.php
1 GET /blog/
1 GET /templates/cn/template.xml
1 GET /user/
1 GET /xmlrpc.php?rsd=1
2 GET /wp-login.php
...
2 GET /MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BBBold.js?rev=2.4-beta-2
2 GET /?doc=demo
...
14 GET /robots.txt
15 GET /favicon.ico
...
21 GET /MathJax/extensions/Safe.js?rev=2.4-beta-2
27 GET /CodeMirror/addon/dialog/dialog.css
27 GET /?doc=about
28 GET /MathJax/config/TeX-AMS_HTML-full.js?rev=2.4-beta-2
513 HEAD /
446038 GET /
[Interesting. That's a LOT of hits for /, especially for a server not linked to almost anywhere on the net. Though the domain has existed for a long time.]
After running rhc app-tidy mathdown, went from 95.6% to 95.4% inodes :-(
quota -s
Disk quotas for user 546a6d7e5973cac907000028 (uid 4040):
Filesystem blocks quota limit grace files quota limit grace
/dev/mapper/EBSStore01-user_home01
513M 0 1024M 76292 0 80000
Following https://forums.openshift.com/disk-quotas to count inodes:
> for i in *; do echo -n "$i: "; find $i | sort -u | wc -l ; done | sort -rn
nodejs: 47
haproxy: 34
git: 38
gear-registry: 4
app-root: 38110
app-deployments: 38098
Drilling down leads to almost everything being in repo: 36462 -> MathJax: 33761 -> fonts: 29949 ->-> TeX: 29419 -> png: 29330.
Aha.
- Getting rid of png fonts sounds promising but I do need them for old IE or something.
Perhaps serve those from a zip or similar? Would need to (1) compress post-install, or switch submodule to forked compressed MathJax repo (2) decompress in server.js (e.g. express-static-zip](https://www.npmjs.com/package/express-static-zip)) - Switch to bigger Openshift gears? 1 medium gear = €0.04/hour = $33/month!
Feels silly for a bunch of inodes :-(
But maybe just adding storage ($1.00 / GB / month / gear) would also increase inodes? - Switch to MathJax CDN entirely. But that's a mess wrt. debugging offline.
- Serve most MJ ourselves, point only png fonts to CDN? Mostly acceptable, but I'm wary of complicated dev/prod differences...
There also will be complications with same-origin policy: http://docs.mathjax.org/en/latest/installation.html#notes-about-shared-installations
- Serve most MJ ourselves, point only png fonts to CDN? Mostly acceptable, but I'm wary of complicated dev/prod differences...
- Investigate getting rid of the
app-deploymentscopy? On the contrary, I might want to enable more than 1: https://blog.openshift.com/introduction-to-deployments-and-rollbacks-on-openshift/
Activity
cben commentedon Feb 15, 2015
Paid for 1GB more (now 2GB per gear) and this also doubled the inode limit: