<oembed><type>rich</type><version>1.0</version><author_name>npub16cadfx8ew8z4qmsmsd9kndvntt4uad7vsdmkjer4jd8wjq4swxrqp2gy5d</author_name><author_url>https://nostr.ae/npub16cadfx8ew8z4qmsmsd9kndvntt4uad7vsdmkjer4jd8wjq4swxrqp2gy5d</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2012-07-25&#xA;📝 Original message:On 25/07/2012 10:45, Michael Grønager wrote:&#xA;&gt; Hi Steve,&#xA;&gt; &#xA;&gt; I see dramatic differences in performance on virtual machines vs &#xA;&gt; running directly on the iron. I am not an expert in virtual&#xA;&gt; machines,&#xA;&#xA;They can be, it depends on how they are set up.  For reference, these&#xA;VM&#39;s used to test network stacks and file format bugs.  They do this&#xA;via debug tracing, trace into, not over.  They then dump this data in&#xA;files and it can keep up with a core2 duo laptop for file io. however&#xA;I moved to using an in ram database (4gb chunks, that then get dumped&#xA;over the network port to a db on a seperate machine)&#xA;&#xA;I am not sure I have the skills to instrament this into bitcoind&#xA;&#xA;&gt; &#xA;&gt; I would like to do a test keeping database log files in memory. It &#xA;&gt; should not matter for durability of the wallet, as it flushes at&#xA;&gt; each write anyway. As for the blockindex, it will remain&#xA;&gt; consistent, but might be lagging some blocks behind at startup,&#xA;&gt; which shouldn&#39;t really matter (except that the same block could end&#xA;&gt; up appearing twice in the block00X files, inelegant, but not really&#xA;&gt; a problem).&#xA;&gt; &#xA;&gt; Otherwise the system you describe (raid0 over 6 disks) should&#xA;&gt; perform like crazy wrt disk i/o, at least on par with SSD. It is&#xA;&gt; your virtualization I am worried about.&#xA;&#xA;I will test that when I get back :)&#xA;&#xA;&gt; &#xA;&gt; Have a safe trip to down under!&#xA;&#xA;will do, thanks for the response. :)&#xA;&#xA;&gt; &#xA;&gt; /M&#xA;&gt; &#xA;&gt; On 24/07/2012, at 21:56, steve wrote:&#xA;&gt; &#xA;&gt;&gt; Hi Michael,&#xA;&gt;&gt; &#xA;&gt;&gt; from what I have noticed, bitcoin blockchain&#xA;&gt;&gt; download/verfication all happens in 1 thread.  (so multicores&#xA;&gt;&gt; doesnt really help)&#xA;&gt;&gt; &#xA;&gt;&gt; That said, I have never tried on an ssd.&#xA;&gt;&gt; &#xA;&gt;&gt; What I do have is 6 SATA 6gbs configed as RAID0 Drives. 32gb of &#xA;&gt;&gt; ram. ubuntu 64 (yeah I know), this runs upto 16 VM&#39;s (I have 4&#xA;&gt;&gt; of these)&#xA;&gt;&gt; &#xA;&gt;&gt; However I have not tried to download the blockchain on the&#xA;&gt;&gt; master os, just in virtulisation.  However, the dedicated&#xA;&gt;&gt; machines that I have been using for benchmarking the VM&#39;s against&#xA;&gt;&gt; is a q6600 8gb ram sata2 hdd - Win 7 (seems faster than&#xA;&gt;&gt; slackware...) to me it has always felt like network bandwidth was&#xA;&gt;&gt; the issue.  I might instrument the bitcoin-qt exe to only pick&#xA;&gt;&gt; low ping nodes (has someone already done this?)&#xA;&gt;&gt; &#xA;&gt;&gt; I guess it is time to start some benchmarking (like the gpu &#xA;&gt;&gt; comparison page)&#xA;&gt;&gt; &#xA;&gt;&gt; hte verification for the 5 past 5 days was negliglable. I am off&#xA;&gt;&gt; on a flight to australia tomorrrow, so I will set some&#xA;&gt;&gt; breakpoints and do some timings in a debugger.&#xA;&gt;&gt; &#xA;&gt;&gt; This will all happen on an e-450 (wonderful machine!)&#xA;&gt;&gt; &#xA;&gt;&gt; Thanks very much for your response. it would seem that I am&#xA;&gt;&gt; &#39;doing it wrong&#39; :/&#xA;&gt;&gt; &#xA;&gt;&gt; cheers mate,&#xA;&gt;&gt; &#xA;&gt;&gt; steve&#xA;&gt;&gt; &#xA;&gt;&gt; (this message isnt signed because I have forgotten my password.)&#xA;&gt;&gt; &#xA;&gt;&gt; On 24/07/2012 09:25, Michael Grønager wrote:&#xA;&gt;&gt;&gt; Hi Steve,&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; 45-90 minutes - note that its numbers from March/April, so a&#xA;&gt;&gt;&gt; bit longer today, but far, far away from the 12 hours.&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; I am using libcoin and the bitcoind build based on this.&#xA;&gt;&gt;&gt; Libcoin is based on the Satoshi client, but refactured to use&#xA;&gt;&gt;&gt; an async concurrency model. I also did a minor tweeks to the&#xA;&gt;&gt;&gt; db parameters. It has earlier been tested up against Satoshi&#xA;&gt;&gt;&gt; bitcoin where on some OS&#39;es it performs similarly (at least on&#xA;&gt;&gt;&gt; some linuxes) and on some faster (e.g. mac).&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; What is your CPU load during a block download ? (both &#xA;&gt;&gt;&gt; initially/up to the point where verification sets in and&#xA;&gt;&gt;&gt; after). The initial download is typically disk I/O bound, the &#xA;&gt;&gt;&gt; verification stage CPU bound, though I lean to believe that&#xA;&gt;&gt;&gt; even there it is disk I/O bound (at least on my system ~50% CPU&#xA;&gt;&gt;&gt; load). What should be better in libcoin is the concurrency&#xA;&gt;&gt;&gt; model. The Satoshi client uses a pure reentrant mutexes model,&#xA;&gt;&gt;&gt; that is not generally believed to motivate the best coding&#xA;&gt;&gt;&gt; practice nor performance, you might end up without the&#xA;&gt;&gt;&gt; concurrency you initially strived for *). As mentioned earlier&#xA;&gt;&gt;&gt; libcoin uses a pure async concurrency model (and so does&#xA;&gt;&gt;&gt; libbitcoin btw).&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; I would like to stress again that these numbers will depend &#xA;&gt;&gt;&gt; largely on the system running the test - I would call my laptop&#xA;&gt;&gt;&gt; a bit over the average today (MB Pro, 2.66Ghz i7 dual core,&#xA;&gt;&gt;&gt; 8GBRAM, 512GB SSD). But again 12 hours - I only reach such&#xA;&gt;&gt;&gt; numbers on some of my VPS&#39;es (linode 1024) that are known for&#xA;&gt;&gt;&gt; notoriously slow disk I/O. (here I have a few % CPU load during&#xA;&gt;&gt;&gt; the verification indicating indeed that the disk i/o is the &#xA;&gt;&gt;&gt; culprit).&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; Cheers,&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; Michael&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; *) I like this Dave Butenhof quote: &#34;The biggest of all the big&#xA;&gt;&gt;&gt;  problems with recursive mutexes is that they encourage you to&#xA;&gt;&gt;&gt;  completely lose track of your locking scheme and scope. This&#xA;&gt;&gt;&gt; is deadly. Evil. It&#39;s the &#34;thread eater&#34;. You hold locks for&#xA;&gt;&gt;&gt; the absolutely shortest possible time. Period. Always. If&#xA;&gt;&gt;&gt; you&#39;re calling something with a lock held simply because you&#xA;&gt;&gt;&gt; don&#39;t know it&#39;s held, or because you don&#39;t know whether the&#xA;&gt;&gt;&gt; callee needs the mutex, then you&#39;re holding it too long. You&#39;re&#xA;&gt;&gt;&gt; aiming a shotgun at your application and pulling the trigger.&#xA;&gt;&gt;&gt; You presumably started using threads to get concurrency; but&#xA;&gt;&gt;&gt; you&#39;ve just PREVENTED concurrency.&#34;&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; On 23/07/2012, at 17:54, steve wrote:&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; Hi Michael,&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; On 23/07/2012 10:00, Michael Grønager wrote:&#xA;&gt;&gt;&gt;&gt;&gt;&gt; I get a full blockchain from scratch in 45 minutes on my&#xA;&gt;&gt;&gt;&gt;&gt;&gt;  laptop, /M&#xA;&gt;&gt;&gt;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; Hang on a sec, in 45 minutes you can download the entire chain &#xA;&gt;&gt;&gt; from the genesis block?&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; I have been doing extensive testing in this area and would&#xA;&gt;&gt;&gt; love to know what is special about your setup (I have never had&#xA;&gt;&gt;&gt; the entire chain in under 12 hours, infact it is normally&#xA;&gt;&gt;&gt; closerto 24.) I have an extensive setup of test machines,&#xA;&gt;&gt;&gt; everything from e4300 to phenom2x6 to i5&#39;s.&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; as an example on an amd e-450 with 4gb ram, and approx 3gb/s &#xA;&gt;&gt;&gt; internet connection it took 2 hours to sync the last 5 days.&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; Maybe i am missing something important...&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; Any additional information that you could provide to help me&#xA;&gt;&gt;&gt; with testing would be really appreciated.&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; cheers,&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt; steve&#xA;&gt;&gt;&gt; &#xA;&gt;&gt;&gt;&gt; &#xA;&gt;&gt;&gt;&gt; ------------------------------------------------------------------------------&#xA;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt; &#xA;Live Security Virtual Conference&#xA;&gt;&gt;&gt;&gt; Exclusive live event will cover all the ways today&#39;s&#xA;&gt;&gt;&gt;&gt; security and threat landscape has changed and how IT managers&#xA;&gt;&gt;&gt;&gt; can respond. Discussions will include endpoint security,&#xA;&gt;&gt;&gt;&gt; mobile security and the latest in malware threats. &#xA;&gt;&gt;&gt;&gt; http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ &#xA;&gt;&gt;&gt;&gt; _______________________________________________ &#xA;&gt;&gt;&gt;&gt; Bitcoin-development mailing list &#xA;&gt;&gt;&gt;&gt; Bitcoin-development at lists.sourceforge.net &#xA;&gt;&gt;&gt;&gt; https://lists.sourceforge.net/lists/listinfo/bitcoin-development&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt;&gt;&gt;&#xA;&gt;&gt;&gt;&gt; &#xA;------------------------------------------------------------------------------&#xA;&gt;&gt; Live Security Virtual Conference Exclusive live event will cover &#xA;&gt;&gt; all the ways today&#39;s security and threat landscape has changed&#xA;&gt;&gt; and how IT managers can respond. Discussions will include&#xA;&gt;&gt; endpoint security, mobile security and the latest in malware&#xA;&gt;&gt; threats. &#xA;&gt;&gt; http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ &#xA;&gt;&gt; _______________________________________________&#xA;&gt;&gt; Bitcoin-development mailing list&#xA;&gt;&gt; Bitcoin-development at lists.sourceforge.net &#xA;&gt;&gt; https://lists.sourceforge.net/lists/listinfo/bitcoin-development&#xA;&gt;</html></oembed>