View Single Post
Old 11-28-2017, 12:26 AM   #3
haertig
Wizard
haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.haertig ought to be getting tired of karma fortunes by now.
 
Posts: 1,912
Karma: 32620480
Join Date: Sep 2017
Device: PW3, Galaxy Tab A9+, Moto G7
Thanks very much for pointing me in the "look at memory usage" direction!

I did a little testing on my ~400 book library running caliber-server (this is on my larger Linux box). It's difficult to tell how much the "entire Calibre Server operation" consumes, since there are all kinds of libraries and shared stuff that the calibre-server process might set in motion.

As best I could guestimate, is that starting calibre-server alone does not take much. In my case, maybe 70k (the web browser was already running and accounted for prior to coming up with that 70k figure). Then when I hit calibre-server with a web connection, usage jumped to 300-400k, when I changed the view to detailed list, usage spiked to about 500k, then settled back down into the 400k+ range. Take all this with a grain of salt, but it's the best guesstimate that I could come up with.

So it looks like calibre-server would use about 1/2 the 1Gb total memory of the Pi. Add the OS and NGINX on top of that and the Pi would be OK I think, but without much room to spare. I'll have to do more testing on the Pi itself to check OS and NGINX memory footprints.

Bottom line - it's worth a shot to try running the caliber-server on a Pi (with my 400 book library size). I could use COPS because that's much lighter, but I really like the native Calibre Server much better. I'll probably give this Calibre setup a try under Arch Linux ARM implemented as light as I can make it, running headless. Hopefully when they finally come out with the Pi4 (sometime in 2018?) they'll give it at least 2Gb ram (and USB 3.0!)

My fallback would be to continue running calibre-server on my bigger Linux box like I'm doing now, and have NGINX on the Pi reverse proxy that. Using client certs with NGINX for security, and a user profile on Calibre to allow me to prevent write access. This is what I'm doing now (currently in test/debug phase - but it works fine). I'm not too keen on exposing my main Caliber library like this, even with write access turned off, but it is backed up daily to a separate backup server and I can restore to any day's snapshot that I want. So a rogue user that broke through Calibre's defenses would not devastate me. A full restore of my Calibre library would probably only take a few minutes. My Calibre data directory is on 1.1Gb total at this point. That's high for only 400 books, but I keep both an AZW3 and EPUB copy of each book - 1) to make sure conversion worked, and 2) for additional redundancy.
haertig is offline   Reply With Quote