黑基网 首页 资讯 IT业界 查看内容

为什么不能用CPU挖矿?

2018-2-2 10:51| 投稿: lofor |来自: 互联网

摘要: 没说CPU不能挖,最开始都是用CPU挖,但是随着对挖矿算法的深入研究,大家发现原来挖矿都是在重复一样的工作,而CPU作为通用性计算单元,里面设计了很多诸如分支预测单元、寄存单元等等模块,这些对于提升算力是根本 ...

没说CPU不能挖,最开始都是用CPU挖,但是随着对挖矿算法的深入研究,大家发现原来挖矿都是在重复一样的工作,而CPU作为通用性计算单元,里面设计了很多诸如分支预测单元、寄存单元等等模块,这些对于提升算力是根本没有任何帮助的。

另外,CPU根本不擅长于进行并行运算,一次最多就执行十几个任务,这个和显卡拥有数以千计的流处理器差太远了,显卡高太多了,因此大家慢慢针对显卡开发出对应的挖矿算法进行挖矿。

以BTC为例,它最基本的算法原理就是,把已有的10分钟内的所有交易作为一个输入,加上一个随机数,当10分钟内所有交易记录加上你的这个随机数计算出一个SHA256的hash。里面几乎都是整数运算,这个根本就像是为显卡特别打造一样,显卡非常适合这种无脑性算法,流处理器数目越多约占优势。

就Hash计算而言,它几乎都是独立并发的整数计算,GPU简直就是为了这个而设计生产出来的。相比较CPU可怜的2-8线程和长度惊人的控制判断和调度分支,GPU可以轻易的进行数百个线程的整数计算并发(无需任何判断的无脑暴力破解乃是A卡的强项)。

OpenCL可以利用GPU在片的大量unified shader都可以用来作为整数计算的资源。而A卡的shader(流处理器)资源又是N的数倍(同等级别的卡)

不过到了后来大家发现,显卡还是太弱了,直接上ASIC大规模堆ALU单元就能极大程度提升算力,巴掌大的算力板的算力已经是显卡的好几十倍,所以现在比特币不用专门的ASIC矿机根本挖不动。

尽管后期的币种LTC所使用的Scrypt算法还引入了大量相互依赖的、随机的访存指令,当Footprint足够大时,还会在GPU的L2级别、甚至TLB级别出现大量的缓存失效,从而产生更多的DRAM访问,以弱化矿机(ASIC/FPGA)相较于GPU在整数运算性能上的优势,但是依然被人针对性研发出矿机,目前也只有专门矿机才能挖。

不过像第二代虚拟货币(比如说是ETH、ZEC这种)由于吸取了前辈们被爆算法的经验,在挖掘算法上做了更加特别优化,防止出现无脑的运算,对于显存要求特别高,因此可以有效抵抗矿机的入侵。

也因为ETH这种只能靠显卡挖矿,造成了2017年下半年开始的显卡涨价潮、缺货潮,很多矿主都卖了成千张显卡回去组建矿机挖掘这些虚拟货币。

久而久之,大家都认为CPU不能挖矿,其实只是效率、效益太低了而已。

小编推荐:欲学习电脑技术、系统维护、网络管理、编程开发和安全攻防等高端IT技术,请 点击这里 注册黑基账号,公开课频道价值万元IT培训教程免费学,让您少走弯路、事半功倍,好工作升职加薪!

本文出自:http://www.cnbeta.com/articles/tech/695303.htm

免责声明:本文由投稿者转载自互联网,版权归原作者所有,文中所述不代表本站观点,若有侵权或转载等不当之处请联系我们处理,让我们一起为维护良好的互联网秩序而努力!联系方式见网站首页右下角。


鲜花

握手
1

雷人

路过

鸡蛋

刚表态过的朋友 (1 人)

相关阅读

发表评论

最新评论

引用 游客 2018-2-24 05:36
I precisely had to thank you so much again. I'm not certain the things I might have implemented without the actual smart ideas contributed by you directly on this topic. It absolutely was an absolute depressing condition in my view, however , discovering the specialized strategy you resolved it forced me to leap for contentment. I'm grateful for your assistance and then believe you comprehend what a great job you have been providing educating others through your site. More than likely you haven' ...
引用 游客 2018-2-24 00:46
very good publish, i definitely love this web site, keep on it
adidas outlet online http://www.adidasoutletonline.us.com
引用 游客 2018-2-22 22:39
The following time I learn a weblog, I hope that it doesnt disappoint me as much as this one. I mean, I know it was my option to read, however I actually thought youd have one thing interesting to say. All I hear is a bunch of whining about something that you could possibly repair in the event you werent too busy searching for attention.
moncler jackets http://www.monclerjacketsale.us
引用 游客 2018-2-22 08:38
I in addition to my friends were found to be studying the nice tips and hints on your site and so quickly got a horrible feeling I had not thanked the blog owner for those secrets. All of the men were definitely so happy to see all of them and have simply been loving them. We appreciate you indeed being indeed thoughtful and for getting such essential guides millions of individuals are really needing to understand about. My very own sincere regret for not expressing appreciation to  earlier.
ye ...
引用 游客 2018-2-21 21:22
I am typically to blogging and i actually recognize your content. The article has actually peaks my interest. I'm going to bookmark your site and maintain checking for brand spanking new information.
adidas tubular shadow http://www.adidastubular.co.uk
引用 游客 2018-2-20 18:22
Can I just say what a aid to find someone who really knows what theyre talking about on the internet. You definitely know find out how to deliver an issue to light and make it important. Extra folks need to read this and perceive this aspect of the story. I cant believe youre not more in style since you positively have the gift.
michael kors handbags http://www.michael-kors-handbags.com.co
引用 游客 2018-2-20 14:28
I simply wanted to thank you very much once more. I do not know the things that I would have made to happen in the absence of these advice shown by you about this theme. This has been a real hard matter in my circumstances, however , witnessing a specialized avenue you solved that made me to jump for gladness. Extremely happy for the guidance and then hope you know what a powerful job you are putting in instructing most people using your website. I am sure you haven't come across any of us.
adi ...
引用 游客 2018-2-19 18:46
Spot on with this write-up, I really think this web site wants far more consideration. I抣l most likely be again to learn much more, thanks for that info.
jordan 4 http://www.jordan4.us.com
引用 游客 2018-2-18 23:17
Thanks so much for providing individuals with an exceptionally wonderful chance to check tips from this website. It is always very fantastic and also jam-packed with a good time for me personally and my office colleagues to visit your web site at minimum three times in 7 days to study the new secrets you will have. Of course, I'm also actually satisfied for the dazzling creative ideas served by you. Some two ideas in this post are certainly the finest we have all ever had.
yeezy boost http://gt ...
引用 游客 2018-2-18 18:14
Your house is valueble for me. Thanks!?
adidas outlet http://www.adidasoutletonline.com
引用 游客 2018-2-17 20:31
You should participate in a contest for top-of-the-line blogs on the web. I will advocate this site!
gucci belt http://www.guccibelt.us.com
引用 游客 2018-2-17 08:31 (待审核)
I simply wanted to develop a small remark to express gratitude to you for all the great facts you are showing at this site. My extensive internet search has now been compensated with high-quality details to exchange with my neighbours. I would mention that many of us readers actually are undoubtedly blessed to exist in a fine network with so many wonderful individuals with valuable basics. I feel somewhat happy to have seen your entire webpage and look forward to tons of more awesome times readi ...
引用 游客 2018-2-17 05:47
When I originally commented I clicked the -Notify me when new comments are added- checkbox and now each time a comment is added I get four emails with the same comment. Is there any manner you can take away me from that service? Thanks!
Adidas NMD PK Runner China red http://www.adidas-nmds.us.com/adidas-nmd-pk-runner-china-red-p-23.html
引用 游客 2018-2-16 23:12
There are certainly a whole lot of details like that to take into consideration. That may be a nice point to carry up. I provide the thoughts above as general inspiration however clearly there are questions just like the one you carry up where an important factor can be working in honest good faith. I don?t know if finest practices have emerged round things like that, however I'm positive that your job is clearly recognized as a good game. Each girls and boys really feel the impact of just a mom ...
引用 游客 2018-2-16 03:36
Spot on with this write-up, I actually suppose this website wants much more consideration. I抣l most likely be again to read rather more, thanks for that info.
roshe run http://www.rosherun.us.com
引用 游客 2018-2-15 23:40
I simply wished to thank you so much once again. I do not know what I might have sorted out in the absence of these pointers documented by you on this topic. It had been the traumatic problem for me, but discovering your expert manner you treated the issue took me to jump for fulfillment. I'm thankful for this advice and hope you comprehend what a great job you're accomplishing instructing most people using a web site. More than likely you have never come across any of us.
yeezy shoes http://bi ...
引用 游客 2018-2-15 07:11
I am typically to running a blog and i actually respect your content. The article has really peaks my interest. I'm going to bookmark your website and preserve checking for brand new information.
yeezy shoes http://www.yeezy-shoes.org
引用 游客 2018-2-14 14:10
I wanted to post you this little bit of note to help say thanks a lot once again with the spectacular pointers you have discussed in this article. This has been really particularly generous with people like you giving openly what exactly many individuals might have made available for an e-book to earn some cash for their own end, most notably now that you might well have done it if you decided. The good ideas additionally served like a great way to be certain that some people have the identical  ...
引用 游客 2018-2-14 11:46
Aw, this was a very nice post. In idea I want to put in writing like this additionally ?taking time and actual effort to make a very good article?but what can I say?I procrastinate alot and under no circumstances seem to get something done.
bape clothing http://www.bape-hoodie.us.com
引用 游客 2018-2-13 14:13
Nice post. I be taught something more challenging on totally different blogs everyday. It should all the time be stimulating to read content material from different writers and follow a bit of one thing from their store. I抎 want to use some with the content material on my weblog whether or not you don抰 mind. Natually I抣l provide you with a link on your web blog. Thanks for sharing.
michael kors purses http://www.michael-kors-handbags.org.uk

查看全部评论(27)


新出炉

返回顶部