黑基网 首页 资讯 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-3-19 11:13
Thanks for your own work on this website. My niece takes pleasure in engaging in internet research and it is ** to grasp why. Most of us learn all of the dynamic tactic you provide invaluable secrets on this web blog and even encourage participation from others on that theme and our own princess is undoubtedly starting to learn a great deal. Have fun with the rest of the year. You're performing a tremendous job.
Adidas NMD Men Women Mesh Su**ce Sanddle Brown http://www.adidas-nmds.us.com/a ...
引用 游客 2018-3-19 10:41
Would you be occupied with exchanging hyperlinks?
yeezy boost http://u.to/YPw6Dw
引用 游客 2018-3-18 09:18
You made some first rate points there. I regarded on the internet for the difficulty and located most people will associate with with your website.
adidas ultra boost http://ux.nu/AhLz9
引用 游客 2018-3-17 06:56
This web site is mostly a stroll-by way of for all of the info you wanted about this and didn抰 know who to ask. Glimpse here, and also you抣l undoubtedly discover it.
adidas nmd http://cbi.as/8ig0s
引用 游客 2018-3-14 16:50
That is the best weblog for anyone who desires to seek out out about this topic. You realize so much its nearly arduous to argue with you (not that I really would want匟aHa). You definitely put a brand new spin on a topic thats been written about for years. Great stuff, simply great!
adidas nmd http://ux.nu/qh9ca
引用 游客 2018-3-14 08:57
I simply wanted to send a  comment to be able to appreciate you for all the magnificent tips and hints you are sharing at this site. My time-consuming internet lookup has at the end of the day been rewarded with reliable points to talk about with my good friends. I 'd mention that many of us visitors actually are extremely blessed to exist in a remarkable network with very many perfect people with insightful advice. I feel truly grateful to have encountered your entire webpage and look forward t ...
引用 游客 2018-3-13 19:04
I simply wanted to write down a ** note to express gratitude to you for those superb information you are posting on this site. My time intensive internet lookup has at the end of the day been honored with excellent insight to write about with my friends. I would say that most of us website visitors are unquestionably lucky to dwell in a fine community with  many wonderful professionals with great methods. I feel very much happy to have come across your entire website and look forward to some ...
引用 游客 2018-3-13 08:07
You made some respectable points there. I seemed on the internet for the issue and found most people will go along with with your website.
adidas nmd http://gtiny.me/nmds
引用 游客 2018-3-12 01:02
This site is mostly a stroll-by way of for the entire info you needed about this and didn抰 know who to ask. Glimpse right here, and also you抣l undoubtedly uncover it.
adidas ultra boost http://ux.nu/RzB2o
引用 游客 2018-3-10 18:22
Hello! I just would like to give a huge thumbs up for the good data you've right here on this post. I will likely be coming back to your blog for extra soon.
adidas yeezy boost http://urlr.be/short/yzyboost
引用 游客 2018-3-9 17:54
The subsequent time I read a weblog, I hope that it doesnt disappoint me as much as this one. I imply, I know it was my choice 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 possibly can repair when you werent too busy looking for attention.
yeezy boost 350 http://qrurl.it/r/1ikn4
引用 游客 2018-3-9 04:01
I am glad for commenting to let you understand what a helpful encounter my princess went through checking your web page. She even learned several pieces, which included what it's like to possess an awesome teaching style to let other individuals completely gain knowledge of some complex issues. You undoubtedly did more than our expectations. I appreciate you for churning out such productive, trustworthy, informative and as well as unique tips on the topic to Julie.
Mens Originals NMD Beige http ...
引用 游客 2018-3-8 19:26
That is the appropriate blog for anybody who needs to find out about this topic. You realize a lot its almost onerous to argue with you (not that I truly would need匟aHa). You definitely put a brand new spin on a topic thats been written about for years. Nice stuff, simply nice!
adidas ultra boost 3.0 http://catb.in/rzrE
引用 游客 2018-3-7 20:27
Hiya! I just want to give a huge thumbs up for the good info you've got right here on this post. I will likely be coming again to your blog for extra soon.
ultra boost 3.0 http://ix.sk/kMuam
引用 游客 2018-3-7 05:03
I wish to get across my gratitude for your generosity supporting all those that have the need for help on in this subject matter. Your special dedication to passing the solution across has been amazingly good and has surely permitted regular people like me to achieve their dreams. Your entire warm and friendly facts indicates a great deal a person like me and substantially more to my office workers. Thanks a ton; from all of us.
asics gel kayano http://www.asicsgelkayano.us.com
引用 游客 2018-3-6 11:52
You made some decent factors there. I regarded on the web for the problem and located most individuals will go together with along with your website.
yeezy boost 350 http://onj.me/yeezy
引用 游客 2018-3-6 09:42
I'm typically to blogging and i really respect your content. The article has really peaks my interest. I am going to bookmark your website and keep checking for brand spanking new information.
nike cortez men http://www.nikecortez.us.com
引用 游客 2018-3-6 05:56
My wife and i were very delighted when John could carry out his investigation through the entire precious recommendations he grabbed through your blog. It's not at all simplistic to just possibly be ** a gift of guidance which often many people may have been trying to sell. We really do know we need the website owner to thank because of that. Those explanations you've made, the easy blog menu, the friendships you will help to foster - it's got everything extraordinary, and it's really leadin ...
引用 游客 2018-3-5 07:46
Your home is valueble for me. Thanks!?
yeezy boost 350 http://www.yeezyboost-350.com.co
引用 游客 2018-3-4 04:14
There are definitely plenty of particulars like that to take into consideration. That is a nice point to bring up. I supply the ideas above as general inspiration but clearly there are questions just like the one you carry up where the most important thing will probably be working in trustworthy good faith. I don?t know if greatest practices have emerged round things like that, but I am positive that your job is clearly recognized as a fair game. Both boys and girls feel the impression of only a ...

查看全部评论(57)


新出炉

返回顶部