Could be an issue with storing the pruned chain in a database not
scaling well. I don't know because I never used this mode ... maybe
others can tell.

I'd try SPVBlockStore temporarly to see if that is much faster (it should).


On 12/21/2017 07:38 PM, Nasser G. wrote:
> Hi Everyone,
> 
> I have a bit of a dilemma here. I'm trying to download the full
> blockchain and use it to generate checkpoint and wallet-restore files.
> The problem is that when I start the whole thing, 
> the download-speed rarely reaches 1MB/s (in pulses, not consistently),
> and the every 24 hours or so, the app crashes. The exception originally
> given was "GC Overhead Limit Exceeded", then when I 
> increased the java memory to around 6GB, now it's "Java running out of
> heap"ish. (Please note that MySQL query cache is set to 768MB).
> 
> 
> 
> This is the code I'm running as we speak:
> 
> 
>         // This function starts the blockchain operation
>         public boolean StartOperation()
>         {       
>             // Get the NetParamrs        
>             this._netParamsForBitcoinJ = MainNetParams.get();
> 
>             // Create our BlockStore file
>             try
>             {
>                 _ourBlockStore = new
>     MySQLFullPrunedBlockStore(_netParamsForBitcoinJ, 
>                                                                1500, 
>                                                                "localhost", 
>                                                              
>      "<BLOCKSTORE-DB-NAME>", 
>                                                              
>      "<USERNAME>", 
>                                                              
>      "<PASSWORD>"); 
>             }
>             catch (BlockStoreException exc)
>             {
>                 return false;
>             }   
>        
>             try
>             {
>                 _ourBlockChain = new
>     FullPrunedBlockChain(_netParamsForBitcoinJ, _ourBlockStore);    
>             }
>             catch (BlockStoreException blockStoreException)
>             {
>                 return false;
>             }            
>             
>             // We launch our peer-group
>             _ourPeerGroup = new PeerGroup(_netParamsForBitcoinJ,
>     _ourBlockChain);
>             _ourPeerGroup.addPeerDiscovery(new
>     DnsDiscovery(_netParamsForBitcoinJ));
>             _ourPeerGroup.setMaxConnections(250);
>             _ourPeerGroup.setMaxPeersToDiscoverCount(250);
> 
>             // We start our peer-group
>             _ourPeerGroup.start();
>             _ourPeerGroup.startBlockChainDownload(new
>     PeerDataEventListenerEx(this) 
>             {
>                 @Override
>                 public void onBlocksDownloaded(Peer peer, Block block,
>     FilteredBlock fb, int i) 
>                 {   
>                     // Call super...
>                     super.onBlocksDownloaded(peer, block, fb, i);
>                 }
> 
>                 @Override
>                 public void onChainDownloadStarted(Peer peer, int i) 
>                 {
>                     // Call super...
>                     super.onChainDownloadStarted(peer, i);
>                 }
> 
>                 @Override
>                 public List<Message> getData(Peer peer, GetDataMessage gdm)
>                 {
>                     return null;
>                 }
>             });
> 
>  
> 
>             // We do need to return something... which is 'true' in this
>     case
>             return true;
>         }
> 
> 
> 
> 
> As a comparison, I ran "bitcoind" on the same machine, took seven hours
> to fully synchronize, at a constant rate of 9MB/s (on a 100Mbps
> connection). 
> The machine in question has an Intel i5 Quad-Core, with 8GB RAM and
> 500GB SSD, running Ubuntu 16.
> 
> 
> Thanks in advance,
> Nasser
> 
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "bitcoinj" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to