Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: payb.tc on July 31, 2011, 08:00:02 AM



Title: bitcoind 17mb? How to shrink it after compiling?
Post by: payb.tc on July 31, 2011, 08:00:02 AM
after compiling bitcoind it's come out as 17mb... it actually runs fine (finally, yay!), but I'm wondering what is the final step in the process... what util would one use to strip it down to the size that normally gets released?


Title: Re: bitcoind 17mb? How to shrink it after compiling?
Post by: Sukrim on July 31, 2011, 08:11:27 AM
Maybe you compiled it with debug code?


Title: Re: bitcoind 17mb? How to shrink it after compiling?
Post by: mrb on July 31, 2011, 09:36:20 AM
what util would one use to strip it down to the size that normally gets released?

Simply "strip (http://linux.die.net/man/1/strip) bitcoin"!


Title: Re: bitcoind 17mb? How to shrink it after compiling?
Post by: payb.tc on July 31, 2011, 09:49:45 AM
thank you! duh.


Title: Re: bitcoind 17mb? How to shrink it after compiling?
Post by: JoelKatz on August 01, 2011, 05:44:46 AM
I would recommend not stripping it unless you have some specific need to. The larger size is due to debug information that is never loaded or used when the program is running (it doesn't actually bloat memory or slow execution in any way). But without it, you cannot make sense of core dumps.


Title: Re: bitcoind 17mb? How to shrink it after compiling?
Post by: ShadowOfHarbringer on September 22, 2011, 10:10:58 AM
I would recommend not stripping it unless you have some specific need to. The larger size is due to debug information that is never loaded or used when the program is running (it doesn't actually bloat memory or slow execution in any way). But without it, you cannot make sense of core dumps.

I have just compiled it and it is also 17 MB...

So you are saying this is completely normal, and i have absolutely nothing to worry about, including running that version on production servers ?


Title: Re: bitcoind 17mb? How to shrink it after compiling?
Post by: ShadowOfHarbringer on September 22, 2011, 11:12:22 AM
Update:

It would appear that the unstripped version is not production safe. It damaged the database and now when i try to run normal (non-compiled) client, it crashes with following error:

Quote
************************
EXCEPTION: 22DbRunRecoveryException      
DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery      
bitcoin in AppInit()      

terminate called after throwing an instance of 'DbRunRecoveryException'
  what():  DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery

EDIT:
Actually, I can only run compiled versions now, the binary version from bitcoin.org crashes every time i try to launch it using the same database. Any ideas ?

Perhaps different version of BerkeleyDB on my debian system or whatever ?


Title: Re: bitcoind 17mb? How to shrink it after compiling?
Post by: ArtForz on September 22, 2011, 12:25:38 PM
the database format itself is compatible, the transaction logs are not. remove /database/log.* while bitcoind is stopped and you can happily switch from bdb5.1 back to 4.6 and similar stunts.