Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minimal deployment of couchdb on windows

I'd like to use couchdb for a client-only application on Windows (the document-oriented structure and the synchronization features would be perfect for me).

There is a Windows installer package here, but the installer itself has about 45 MB, when installed it takes more than 100 MB on my HD. This is far to much for my (relatively small) application.

I noticed that there are a lot of "src" directories in the couchdb/lib subdirs. I've been experimenting with removing some of them and it didn't seem to break the system.

Now I'm wondering what would be the "minimal" set of files (preferably binary-only) that would be needed in order to run a local couchdb server. Are there already any efforts to create such a deployment-friendly installer? Or could anyone give some (even very general) hints how to create it? How much disk space would be minimally required for such an installation?

Needless to say that I'm not at all familiar with neither the couchdb internals nor the Erlang system :). But perhaps I could figure out if I got some direction (or I could stop trying if someone told me that this would be impossible or didn't make sense at all ...)

Thanks anyway!

EDIT

Thanks to skaffmann, I did the analysis using WinDirStat which led me to the following additional questions:

  • Is it correct, that the source-Files (i.e. .erl) files would not be needed for operation? (This would reduce the size by about 40 MB).
  • Are all compiled files (i.e. .beam) files required by couchdb? For example, there seems to be a complete wxwidgets library within couchdb and I cannot see at all, where that would be needed? Also the megaco library (media gateway protocol?) seems to belong to a "standard" erlang distribution but makes no sense for couchdb?

(I will just try to remove them by filetype/library and post updates here just in case anyone is interested ...)

like image 519
MartinStettner Avatar asked May 23 '10 11:05

MartinStettner


1 Answers

I just ran WinDirStat over my windows couchdb install, and it's quite illuminating, showing you where all the space is being taken up.

   119.7 MB D:\apps\CouchDB
    93.5 MB D:\apps\CouchDB\lib
    20.0 MB D:\apps\CouchDB\bin
     3.9 MB D:\apps\CouchDB\erts-5.7.3
     1.0 MB D:\apps\CouchDB\<Files>
   932.1 KB D:\apps\CouchDB\share
   323.7 KB D:\apps\CouchDB\var
    39.2 KB D:\apps\CouchDB\releases
     5.8 KB D:\apps\CouchDB\etc

93.5 MB D:\apps\CouchDB\lib
28.2 MB D:\apps\CouchDB\lib\megaco-3.11.3
 8.0 MB D:\apps\CouchDB\lib\wx-0.98.3
 6.4 MB D:\apps\CouchDB\lib\erl_interface-3.6.3
 4.8 MB D:\apps\CouchDB\lib\stdlib-1.16.3
 4.0 MB D:\apps\CouchDB\lib\snmp-4.13.5
 3.0 MB D:\apps\CouchDB\lib\xmerl-1.2.1
 2.6 MB D:\apps\CouchDB\lib\compiler-4.6.3
 2.6 MB D:\apps\CouchDB\lib\asn1-1.6.11
 2.6 MB D:\apps\CouchDB\lib\hipe-3.7.3
 2.4 MB D:\apps\CouchDB\lib\cosNotification-1.1.11
 2.3 MB D:\apps\CouchDB\lib\kernel-2.13.3
 2.3 MB D:\apps\CouchDB\lib\orber-3.6.13
 1.9 MB D:\apps\CouchDB\lib\inets-5.1.3
 1.8 MB D:\apps\CouchDB\lib\ssl-3.10.4
 1.7 MB D:\apps\CouchDB\lib\mnesia-4.4.11
 1.3 MB D:\apps\CouchDB\lib\tools-2.6.4
 1.1 MB D:\apps\CouchDB\lib\dialyzer-2.0.0
 1.1 MB D:\apps\CouchDB\lib\public_key-0.3
 1.1 MB D:\apps\CouchDB\lib\debugger-3.2

It does look like you'll be able to remove large chunks of stuff, and WinDirStat will tell you which bits are worth concentrating on.

like image 133
skaffman Avatar answered Oct 05 '22 13:10

skaffman