Merge branch 'fix_eta' into develop
This commit is contained in:
commit
b387daee03
19
HOWTO.rst
19
HOWTO.rst
@ -6,10 +6,10 @@ successfully on MaxOSX and DragonFlyBSD. It won't run out-of-the-box
|
|||||||
on Windows, but the changes required to make it do so should be
|
on Windows, but the changes required to make it do so should be
|
||||||
small - patches welcome.
|
small - patches welcome.
|
||||||
|
|
||||||
+ Python3 ElectrumX makes heavy use of asyncio so version >=3.5 is required
|
+ Python3: ElectrumX makes heavy use of asyncio so version >=3.5 is required
|
||||||
+ plyvel Python interface to LevelDB. I am using plyvel-0.9.
|
+ plyvel: Python interface to LevelDB. I am using plyvel-0.9.
|
||||||
+ aiohttp Python library for asynchronous HTTP. ElectrumX uses it for
|
+ aiohttp: Python library for asynchronous HTTP. ElectrumX uses it for
|
||||||
communication with the daemon. I am using aiohttp-0.21.
|
communication with the daemon. I am using aiohttp-0.21.
|
||||||
|
|
||||||
While not requirements for running ElectrumX, it is intended to be run
|
While not requirements for running ElectrumX, it is intended to be run
|
||||||
with supervisor software such as Daniel Bernstein's daemontools, or
|
with supervisor software such as Daniel Bernstein's daemontools, or
|
||||||
@ -22,9 +22,9 @@ for someone used to either.
|
|||||||
When building the database form the genesis block, ElectrumX has to
|
When building the database form the genesis block, ElectrumX has to
|
||||||
flush large quantities of data to disk and to leveldb. You will have
|
flush large quantities of data to disk and to leveldb. You will have
|
||||||
a much nicer experience if the database directory is on an SSD than on
|
a much nicer experience if the database directory is on an SSD than on
|
||||||
an HDD. Currently to around height 430,000 of the Bitcoin blockchain
|
an HDD. Currently to around height 434,000 of the Bitcoin blockchain
|
||||||
the final size of the leveldb database, and other ElectrumX file
|
the final size of the leveldb database, and other ElectrumX file
|
||||||
metadata comes to around 15GB. Leveldb needs a bit more for brief
|
metadata comes to just over 17GB. Leveldb needs a bit more for brief
|
||||||
periods, and the block chain is only getting longer, so I would
|
periods, and the block chain is only getting longer, so I would
|
||||||
recommend having at least 30-40GB free space.
|
recommend having at least 30-40GB free space.
|
||||||
|
|
||||||
@ -137,10 +137,7 @@ rough wall-time::
|
|||||||
|
|
||||||
Machine A: a low-spec 2011 1.6GHz AMD E-350 dual-core fanless CPU, 8GB
|
Machine A: a low-spec 2011 1.6GHz AMD E-350 dual-core fanless CPU, 8GB
|
||||||
RAM and a DragonFlyBSD HAMMER fileystem on an SSD. It requests blocks
|
RAM and a DragonFlyBSD HAMMER fileystem on an SSD. It requests blocks
|
||||||
over the LAN from a bitcoind on machine B. FLUSH_SIZE: I changed it
|
over the LAN from a bitcoind on machine B.
|
||||||
several times between 1 and 5 million during the sync which causes the
|
|
||||||
above stats to be a little approximate. Initial FLUSH_SIZE was 1
|
|
||||||
million and first flush at height 126,538.
|
|
||||||
|
|
||||||
Machine B: a late 2012 iMac running El-Capitan 10.11.6, 2.9GHz
|
Machine B: a late 2012 iMac running El-Capitan 10.11.6, 2.9GHz
|
||||||
quad-core Intel i5 CPU with an HDD and 24GB RAM. Running bitcoind on
|
quad-core Intel i5 CPU with an HDD and 24GB RAM. Running bitcoind on
|
||||||
@ -229,6 +226,6 @@ Flushes can take many minutes and look like this::
|
|||||||
|
|
||||||
After flush-to-disk you may see an aiohttp error; this is the daemon
|
After flush-to-disk you may see an aiohttp error; this is the daemon
|
||||||
timing out the connection while the disk flush was in progress. This
|
timing out the connection while the disk flush was in progress. This
|
||||||
is harmless; I intend to fix this soon by yielding whilst flushing.
|
is harmless.
|
||||||
|
|
||||||
The ETA is just a guide and can be quite volatile.
|
The ETA is just a guide and can be quite volatile.
|
||||||
|
|||||||
@ -29,7 +29,7 @@ class cachedproperty(object):
|
|||||||
def deep_getsizeof(obj):
|
def deep_getsizeof(obj):
|
||||||
"""Find the memory footprint of a Python object.
|
"""Find the memory footprint of a Python object.
|
||||||
|
|
||||||
Based on from code.tutsplus.com: http://goo.gl/fZ0DXK
|
Based on code from code.tutsplus.com: http://goo.gl/fZ0DXK
|
||||||
|
|
||||||
This is a recursive function that drills down a Python object graph
|
This is a recursive function that drills down a Python object graph
|
||||||
like a dictionary holding nested dictionaries with lists of lists
|
like a dictionary holding nested dictionaries with lists of lists
|
||||||
@ -38,10 +38,6 @@ def deep_getsizeof(obj):
|
|||||||
The sys.getsizeof function does a shallow size of only. It counts each
|
The sys.getsizeof function does a shallow size of only. It counts each
|
||||||
object inside a container as pointer only regardless of how big it
|
object inside a container as pointer only regardless of how big it
|
||||||
really is.
|
really is.
|
||||||
|
|
||||||
:param o: the object
|
|
||||||
|
|
||||||
:return:
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
ids = set()
|
ids = set()
|
||||||
@ -66,6 +62,7 @@ def deep_getsizeof(obj):
|
|||||||
|
|
||||||
return size(obj)
|
return size(obj)
|
||||||
|
|
||||||
|
|
||||||
def chunks(items, size):
|
def chunks(items, size):
|
||||||
for i in range(0, len(items), size):
|
for i in range(0, len(items), size):
|
||||||
yield items[i: i + size]
|
yield items[i: i + size]
|
||||||
|
|||||||
@ -467,6 +467,7 @@ class DB(object):
|
|||||||
History is always flushed. UTXOs are flushed if flush_utxos.'''
|
History is always flushed. UTXOs are flushed if flush_utxos.'''
|
||||||
flush_start = time.time()
|
flush_start = time.time()
|
||||||
last_flush = self.last_flush
|
last_flush = self.last_flush
|
||||||
|
tx_diff = self.tx_count - self.fs_tx_count
|
||||||
|
|
||||||
# Write out the files to the FS before flushing to the DB. If
|
# Write out the files to the FS before flushing to the DB. If
|
||||||
# the DB transaction fails, the files being too long doesn't
|
# the DB transaction fails, the files being too long doesn't
|
||||||
@ -493,7 +494,6 @@ class DB(object):
|
|||||||
.format(self.flush_count, self.height, flush_time))
|
.format(self.flush_count, self.height, flush_time))
|
||||||
|
|
||||||
# Log handy stats
|
# Log handy stats
|
||||||
tx_diff = self.tx_count - self.fs_tx_count
|
|
||||||
txs_per_sec = int(self.tx_count / self.wall_time)
|
txs_per_sec = int(self.tx_count / self.wall_time)
|
||||||
this_txs_per_sec = 1 + int(tx_diff / (self.last_flush - last_flush))
|
this_txs_per_sec = 1 + int(tx_diff / (self.last_flush - last_flush))
|
||||||
if self.height > self.coin.TX_COUNT_HEIGHT:
|
if self.height > self.coin.TX_COUNT_HEIGHT:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user