当前位置: 首页 > news >正文

网站建设项目软件开发招标文件做网站要几个人 要多少钱

网站建设项目软件开发招标文件,做网站要几个人 要多少钱,最便宜网站,制作企业网站页面实训报告一#xff1a;背景1. 讲故事昨天继续还技术债#xff0c;优化一轮后的程序拉到线上后内存继续忽高忽低#xff0c;低的时候20G#xff0c;高的时候30G#xff0c;过了一会又下降了几个G#xff0c;毫无疑问#xff0c;程序中有什么集合或者什么操作占用了大量内存#… 一背景1. 讲故事昨天继续还技术债优化一轮后的程序拉到线上后内存继续忽高忽低低的时候20G高的时候30G过了一会又下降了几个G毫无疑问程序中有什么集合或者什么操作占用了大量内存所以准备在2829G的时候抓dump分析分析。二解决思路从快照中找问题就像看病一样根据病象猜测都有一套经验可循。1. 把托管堆中10M的对象找出来通常应对大集合从托管堆入手最简单看哪个类型占用空间大基本就是它出问题了为了避免把所有类型都打出来,这里设置一下过滤把小于10M都踢掉 可以用 !dumpheap -stat -min 10240把敏感对象脱敏掉。 0:000 !dumpheap -stat -min 10240 Statistics:MT Count TotalSize Class Name 00007ffe094e6fc0 4 523776 System.Object[] 00007ffe094e6948 6 7179822 System.String 00007ffe0780da08 33 46514160 System.Collections.Generic.Dictionary2Entry[[System.Int32, mscorlib],[System.Collections.Generic.HashSet1[[System.Int32, mscorlib]], System.Core]][] 00007ffe09f95f40 250 188739344 System.Collections.Generic.Dictionary2Entry[[System.Int32, mscorlib],[System.Int32, mscorlib]][] 00007ffe094ec988 18 540828823 System.Byte[] 00007ffe07802da8 1620 622578672 System.Linq.Set1Slot[[System.Int32, mscorlib]][] 000001bc0452e600 1389 1038494910 Free 00007ffe094baf50 68 1128274800 System.Collections.Generic.Dictionary2Entry[[System.Int32, mscorlib],[System.DateTime, mscorlib]][] 00007ffe094e9220 2224 1513951832 System.Int32[] 00007ffe07819df8 2232 1668042480 System.Collections.Generic.HashSet1Slot[[System.Int32, mscorlib]][] 00007ffe094c8510 226 1672164568 System.Int64[] 00007ffdab8676e8 1137 1901228880 System.Collections.Generic.HashSet1Slot[[System.Int64, mscorlib]][] 00007ffdab89b3b0 136 1986723840 System.Linq.Set1Slot[[System.Int64, mscorlib]][] Total 13321 objects 2. 找出堆中可疑的对象因为程序启动后作为内存数据库所以有包含指定类的大集合对象很正常倒数第7行有一个Dictionaryint,Datetime 占用空间挺大的1128274800/1024/10241G这个貌似不是基础数据应该是中间变量方法表地址为00007ffe094baf50, 通过它可以找到这68个集合的内存地址。 0:028 !dumpheap -mt 00007ffe094baf50Address MT Size 000001c2f262a708 00007ffe094baf50 69438000 000001c1bb8e1020 00007ffe094baf50 16147872 000001c1bce04760 00007ffe094baf50 33486336 000001c37e8f1020 00007ffe094baf50 143987328 000001c44e8f1020 00007ffe094baf50 287974800 000001c3c419b268 00007ffe094baf50 16147872 000001c3f6b9ac28 00007ffe094baf50 16147872 000001c467336fa0 00007ffe094baf50 33486336 000001c46f3fa760 00007ffe094baf50 69438000 000001c489df3668 00007ffe094baf50 16147872 000001c494166828 00007ffe094baf50 33486336 000001c4a68f1020 00007ffe094baf50 69438000 000001c4d4c5c290 00007ffe094baf50 16147872 000001c4da8f1058 00007ffe094baf50 33486336 000001c4de8f1020 00007ffe094baf50 69438000 000001c5028f1058 00007ffe094baf50 33486336 000001c5068f1020 00007ffe094baf50 33486336 ... 下一步挑几个大的 Dictionary 看看比如这一行 000001c44e8f1020 00007ffe094baf50 287974800计算一下size279M。3. 寻找集合所在的代码块字典占用279M我是知道了但怎么知道这个字典是在哪一个代码块呢要寻找答案也容易通过!gcroot 找到它的引用根通过引用链就可以找到它的代码区块简直不要太实用????????????。 0:000 !gcroot 000001c4de8f1020 Thread 2da8:00000017f4c7e5d0 00007ffdab758ca1 xxxx.xxxx.xxxx.GetFlowAwayCustomer(Int32, System.String, System.Collections.Generic.Dictionary2System.String,System.Collections.Generic.List1xxxx)rbp-238: 00000017f4c7e628- 000001c3d5c1bdf0 System.Collections.Generic.Dictionary2[[System.String, mscorlib],[System.Collections.Generic.Dictionary2[[System.Int32, mscorlib],[System.DateTime, mscorlib]], mscorlib]]- 000001c3d8de7d10 System.Collections.Generic.Dictionary2Entry[[System.String, mscorlib],[System.Collections.Generic.Dictionary2[[System.Int32, mscorlib],[System.DateTime, mscorlib]], mscorlib]][]- 000001c3d8d58630 System.Collections.Generic.Dictionary2[[System.Int32, mscorlib],[System.DateTime, mscorlib]]- 000001c4de8f1020 System.Collections.Generic.Dictionary2Entry[[System.Int32, mscorlib],[System.DateTime, mscorlib]][] 从上面引用链可以看到三点信息1 当前字典在 2da8 线程上2 字典在 GetFlowAwayCustomer 方法中大概可以看出是计算流失客户的。3 调用链顶部是最大的集合 Dictionarystring,ditionary address000001c3d5c1bdf0/string,ditionary4. 寻找更多信息1 挖字典内容有了最大的字典我们来看看最大字典Dictionarystring,Ditionaryint,DateTime 占用的内存大小。 0:000 !objsize 000001c3d5c1bdf0 sizeof(000001c3d5c1bdf0) 340008256 (0x14441d40) bytes (System.Collections.Generic.Dictionary2[[System.String, mscorlib],[System.Collections.Generic.Dictionary2[[System.Int32, mscorlib],[System.DateTime, mscorlib]], mscorlib]]) 根据sizeof(000001c3d5c1bdf0) 340008256 (0x14441d40) bytes 计算一下324M尼玛这都是其中一个字典难怪内存忽高忽低现在大家肯定特别想知道里面有啥东西可以用 da - !do 去内部集合看一下。 0:000 !da -length 1 -start 1 -details 000001c3d8de7d10 Name: System.Collections.Generic.Dictionary2Entry[[System.String, mscorlib],[System.Collections.Generic.Dictionary2[[System.Int32, mscorlib],[System.DateTime, mscorlib]], mscorlib]][] MethodTable: 00007ffdab940650 EEClass: 00007ffdab9405b8 Size: 192(0xc0) bytes Array: Rank 1, Number of elements 7, Type VALUETYPE Element Methodtable: 00007ffdab940520 [1] 000001c3d8de7d38Name: System.Collections.Generic.Dictionary2Entry[[System.String, mscorlib],[System.Collections.Generic.Dictionary2[[System.Int32, mscorlib],[System.DateTime, mscorlib]], mscorlib]]MethodTable: 00007ffdab940520EEClass: 00007ffe08e92920Size: 40(0x28) bytesFile: C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dllFields:MT Field Offset Type VT Attr Value Name00007ffe094e9288 4003474 10 System.Int32 1 instance 58671583 hashCode00007ffe094e9288 4003475 14 System.Int32 1 instance -1 next00007ffe094ebf10 4003476 0 System.__Canon 0 instance 000001c2cec43610 key00007ffe094ebf10 4003477 8 System.__Canon 0 instance 000001c3d7b45370 value 0:000 !do 000001c3d7b45370 Name: System.Collections.Generic.Dictionary2[[System.Int32, mscorlib],[System.DateTime, mscorlib]] MethodTable: 00007ffe094b9ec8 EEClass: 00007ffe08e9d528 Size: 80(0x50) bytes File: C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll Fields:MT Field Offset Type VT Attr Value Name 00007ffe094e9220 4001858 8 System.Int32[] 0 instance 000001c46e8f1020 buckets 00007ffe094baf50 4001859 10 ...ime, mscorlib]][] 0 instance 000001c46f3fa760 entries 00007ffe094e9288 400185a 38 System.Int32 1 instance 2512598 count 00007ffe094e9288 400185b 3c System.Int32 1 instance 3194430 version 00007ffe094e9288 400185c 40 System.Int32 1 instance -1 freeList 00007ffe094e9288 400185d 44 System.Int32 1 instance 0 freeCount 00007ffe094dabb8 400185e 18 ...Int32, mscorlib]] 0 instance 000001bc06272ab8 comparer 00007ffe0a0463e0 400185f 20 ...eTime, mscorlib]] 0 instance 0000000000000000 keys 00007ffe0a046258 4001860 28 ...eTime, mscorlib]] 0 instance 0000000000000000 values 00007ffe094e6f28 4001861 30 System.Object 0 instance 0000000000000000 _syncRoot 可以看到大字典中7个元素然后我挑了一个内嵌Dictionary可以看到这个内嵌字典的count251w里面的details我就不输出了。2 挖线程栈有了字典内容大家继续看一下此时这个线程 [2da8] 在做什么? 0:028 ~~[2da8]s ntdll!NtWaitForSingleObject0x14: 00007ffe28646124 c3 ret 0:028 !clrstack OS Thread Id: 0x2da8 (28)Child SP IP Call Site 00000017f4c7e4f0 00007ffe09e48e52 System.Collections.Generic.Dictionary2[[System.Int32, mscorlib],[System.DateTime, mscorlib]].Resize(Int32, Boolean) 00000017f4c7e560 00007ffe09316c65 System.Collections.Generic.Dictionary2[[System.Int32, mscorlib],[System.DateTime, mscorlib]].Insert(Int32, System.DateTime, Boolean) 我靠这个集合正在做扩容。。。大家应该知道有扩容就有虚占内存。三总结到这里肯定有人问找出大集合了解决方案是什么因为是昨天才发现的何况代码不是我写的你问我哈准备从两方面入口, 业务逻辑上优化 ➕ 定制化集合(HashSet,Dictionary),毕竟这两个集合虚占内存太可怕了下一篇我们来分析一下他们的扩容机制。
http://www.yutouwan.com/news/91315/

相关文章:

  • 厦门网站建设设计网站备案幕布
  • 金泉网站建设开发哪些网站可以医生做兼职
  • 公司网站的留言板怎么做网站开发编码选择一般是
  • 做网站店铺装修的软件如何建设一个博客网站
  • 网站开发找公司好还是个人阳谷聊城做网站
  • 可以建网站的公司cms影视建站系统
  • 免费的奖励网站有哪些铜山徐州网站开发
  • 便利的微网站建设vi视觉识别系统设计
  • 如何用一个域名做多个网站wordpress整合问答系统
  • 网站建设工作标准南京网站设计哪家公司好
  • 设计网站页面要多少钱网站为什么被百度k了
  • 表格做的网站影响收录天津哪家做企业网站
  • 做流程图用什么网站最近几年做电影网站怎么样
  • 云南专业做网站多少钱做网站的时候字体应该多大
  • 静态网站添加到织梦项目计划书的六大要素
  • 网站建设公司 优势代做网站推广的公司
  • 阿里巴巴网站建设教程视频长春网站推广优化
  • 东莞服饰网站建设哪家好上海网站优化推广
  • 网站首页被k 不恢复建设银行网站怎么查工资明细
  • 做网站最下面写什么做网站感觉挣不到钱啊
  • 深圳房产网站建设国外手机网站模板
  • dede网站首页加悬浮广告路桥区商用营销型网站建设
  • 一般网站建设好多久被收录vi设计模板源文件
  • 天津网站设计怎样自学开网店
  • 建设广告联盟网站让百度收入 wordpress
  • 帮中介做网站赚钱吗衡阳网站制作公司
  • 网站开发公司需要什么资质简单网页制作工具
  • 泾川网站建设电子商务网站建设包括哪些内容
  • 注册了网站之后怎么设计免费网站源码
  • 赢展网站建设访问不到自己做的网站