Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: SlickTheNick on March 27, 2013, 04:47:30 AM



Title: 0.8.1 Bitcoind Server performance?
Post by: SlickTheNick on March 27, 2013, 04:47:30 AM
Currently running Bitcoind server on a VPS, running the latest version of Ubuntu (64-bt). It doesnt have very much ram, only 1.5 gigs, but its been holding up pretty decent. It receives anywhere from 3000-5000 + RPC requests a day. Can be a bit slugish at times, and every now and then it just crashes due to not enough memory. I have it set up to auto-restart on crashes, so not a big deal.

Anyways, Iv noticed that since upgrading from 0.7 to 0.8.1, its been a bit slower and crashing way more often. Instead of running out of RAM and dieing maybe a couple times a day, its happening regularly, like once every 30-60 minutes or so.

Anyone have any tips on how to improve performance, besides just upgrading the memory?


Title: Re: 0.8.1 Bitcoind Server performance?
Post by: Diapolo on March 27, 2013, 06:22:48 AM
Perhaps a subtle memory-leak sneaked into 0.8.1... some developer who is capable to do it should check with Valgrind or some other tools, if that is the case.
Is there any way to debug on your machine, what part of the code is eating your RAM?

Dia


Title: Re: 0.8.1 Bitcoind Server performance?
Post by: SlickTheNick on March 27, 2013, 02:29:33 PM
Perhaps a subtle memory-leak sneaked into 0.8.1... some developer who is capable to do it should check with Valgrind or some other tools, if that is the case.
Is there any way to debug on your machine, what part of the code is eating your RAM?

Dia

Il investigate further and update this post with my findings.


Title: Re: 0.8.1 Bitcoind Server performance?
Post by: 2112 on March 27, 2013, 03:43:49 PM
Code:
ulimit -c unlimited
is your friend. Then do post-mortems on those coredumps with:
Code:
gdb bitcoind core.2112
.


Title: Re: 0.8.1 Bitcoind Server performance?
Post by: zvs on March 28, 2013, 04:49:00 AM
*scratch*

Someone deleted my earlier reply.

Are posts about modifying the source to reduce the # of tx orphans stored in memory not allowed?

laugh


Title: Re: 0.8.1 Bitcoind Server performance?
Post by: SlickTheNick on April 07, 2013, 06:06:27 PM
@zvs

I did see your post. Thanks for the suggestion. Question, I would probably have to recompile bitcoind again after changing that right?


Title: Re: 0.8.1 Bitcoind Server performance?
Post by: Mike Hearn on April 08, 2013, 07:22:07 PM
IF you use the code from git memory usage is a lot better.


Title: Re: 0.8.1 Bitcoind Server performance?
Post by: SlickTheNick on April 09, 2013, 01:16:23 AM
IF you use the code from git memory usage is a lot better.

I did use the code from git, but it was from at least a few weeks ago. Iv pulled down the latest commits, and also updated the max orphan block size in main.h as was suggested (and apparantly deleted) before. Re-compiling now, will report back with my findings later


Title: Re: 0.8.1 Bitcoind Server performance?
Post by: Pieter Wuille on April 09, 2013, 10:25:03 PM
Make sure you have commit c7f039b67 (Process getdata invs separately until send buffer overflows), though there are a few other commits that improve memory consumption recently.


Title: Re: 0.8.1 Bitcoind Server performance?
Post by: carlos on April 09, 2013, 11:45:43 PM
Actually latest stable 0.8.1 linux crashes often ...

Quote
************************
EXCEPTION: St9bad_alloc
std::bad_alloc
bitcoin in ThreadMessageHandler()

This RAM issues should be solved ASAP.

We have tried latest git version few days ago, but it crashed even more often...

Currently we have workaround that monitors if bitcoind is running and starts it if needed but please solve this in next stable release...


Title: Re: 0.8.1 Bitcoind Server performance?
Post by: Pieter Wuille on April 09, 2013, 11:51:11 PM
Actually latest stable 0.8.1 linux crashes often ...

Did you read the few posts above?


Title: Re: 0.8.1 Bitcoind Server performance?
Post by: SlickTheNick on April 11, 2013, 07:35:26 AM
After recompiling, I noticed a bit of an increase in speed, and instead of the server crashing very 5-10 minutes, it would crash every 20 minutes to an hour. Little bit of an improvement, but it seems to be extremely finicky. Sometimes it will start up, and other times it will start the process, but then just hang there. Not sure whats up with that


Experienced some pretty odd issues the past day though. My server sends a sendmany() command about 2 or 3 times an hour, usually to about a couple dozen addresses at a time. All of a sudden last night, every time a sendmany command was sent, it would just hang there for a 1-3 minutes, and then come back with a error saying" failed creating transaction". Spent alot of the day trying to figure out why the hell its doing this all of a sudden. Also, doing the listaccounts command would just freeze the server. I ended up doing a fresh pull of the code from github, recompiling it without making any changes to the sources. I then sent all the BTC I had in the server wallet to a new wallet, erased it and re-synced the block chain. Basically started completely fresh. Seems to be running alot faster now, so far so good.