-
Notifications
You must be signed in to change notification settings - Fork 6
RAM usage #7
Comments
+1. I am also needing to use Caddy with Bleve. The Ram issue looks like a killer for production deployments. |
I'm currently trying caddy-search on a larger big blog (1250 posts or so) and on my Mac (MBP mid 2012 with 8 G of RAM), it seems fine. The caddy process uses around 300 Mo of RAM and the index file for the search is around 270 Mo, so I guess it's not too much. Or am I wrong ? |
I think it's way too much. Will your caddy process eventually terminate if it runs out of RAM? |
We'll look into this. It could have something to do with the underlying bleve library. |
It was guess too : Bleve creates a database and stores a lot (maybe all) in RAM. I don't think it's unexpected. |
Perhaps there's a way to minimize RAM usage, but ultimately the trade-off is this: we access the database on disk for each search query or we keep the database in memory for faster searches. |
Exactly and I think RAM is better. |
@jungle-boogie @joeblew99 @nicolinuxfr @mholt |
For the caddy site, it went down from ~17 MB to ~15 MB. On a larger directory with many more subfolders I see memory usage at ~64 MB. So it seems a little better? Have we determined what is actually using the memory? |
Are the above changes implemented in the version being auto-build by the caddy download service? I just downloaded a fresh caddy today to diagnose a server crash I was experiencing, and on a Pi2 I just get a "cannot allocate memory" crash when I try to launch caddy with search enabled. |
It may still be too much for the Pi -- sorry about that. I haven't had time to work on this plugin myself in a long time... |
It would be great if there was a configuration option to either keep all in RAM (for machines with lots of RAM) or to store it on disk (for RAM-starved machines). |
Hello,
@mholt and I discussed that this plug-in seems to use up a very large amount of
RAM when caddy search is enabled in the
Caddyfile
and/or when caddy iscompiled with caddy-search.
Here's an example of just starting caddy in the forground and crashing a short
amount of time.
Here's another example:
The Caddyfile is very bare and only contained
search
, no regexs were used. The directory caddy is serving is 53MB but there are 4 mp3s that should be excluded from caddy-search. There's also 25MB of images that caddy-search should not be indexing.Using caddy-search from master on freebsd -release 10.2 with Caddy 0.8 beta 4.
The text was updated successfully, but these errors were encountered: