Performance

共 105 篇文章。

FreeBSD 7的TSO特性

• Kernel

因为我用的网卡多数都是em(4),所以在最近的升级中也就利用了它提供的TSO功能。TSO是一项减少服务器负载的技术,其原理是将TCP相关的一部分计算交给网卡去做。

阅读全文… ( 本文约 213 字,阅读大致需要 1 分钟 )

mailman vs postfix

• Networking

以前一直觉得mailman与postfix的VERP支持配合的很不好,今天把它patch掉了。需要注意一点即 postfix 的smtpd_authorized_verp_clients默认设置为$authorized_verp_clients,这个值没有意义,需要自己改成合适的值。

阅读全文… ( 本文约 224 字,阅读大致需要 1 分钟 )

tmpfs开发告一段落

• Kernel

pointyhat集群的kris老大前天发来了tmpfs的初步测试结果,很振奋。目前,tmpfs的性能在测试用例的环境下已经达到了md+ufs最佳性能的2-2.5倍,并且,得益于在向FreeBSD移植过程中增加的细粒度上锁,tmpfs在多CPU的环境下表现出了非常好的可伸缩性。

阅读全文… ( 本文约 641 字,阅读大致需要 2 分钟 )

ULE 3.0

• Kernel

Jeff提交了ULE调度器的3.0版(sched_ule.c,v 1.200,巧合?:) 这个版本对调度器本身的上锁进行了细化,从而带来了性能改善(最上面那根黄线,之前是下面那根青色的线)。

参与评论

测试了一下ZFS

• Data Management

这周找了些公司淘汰的设备来测试ZFS。用14块SCSI盘的傻盘阵搭了一个RAID-Z2(可以掉两块盘的RAID-Z,1块盘作为热备)。测试机为2GB内存、双CPU(Xeon 5140双核、amd64模式)。

阅读全文… ( 本文约 587 字,阅读大致需要 2 分钟 )

两天会议的一些收获

• Development

周六、周日两天的AsiaBSDCon正式报告会,内容非常充实,以致于我都没有时间去整理和把一些感想写出来。今天终于准备离开了,现在是当地时间早上1点半。

说说我比较关注的几个presentation。

Brooks Davis做的关于FreeBSD高性能计算集群的报告,讲到了他们在选型方面遇到的一些问题。计算集群主要考虑的成本是能源消耗与性能之比,因此他们采购了一批Intel机器之后,选择了AMD的产品,而新一代集群也许又要选择Intel的产品;早期Alpha的节点,已经基本被x86的取代。另一方面,他讲述了相当长时间的关于高性能计算为何有很多人使用Linux的问题,由于很多人使用Linux,导致很多做高性能计算的人有这样一种概念,如果那不是超级计算机,就一定是Linux——然而,这样一来,FreeBSD的集群就会遇到一些问题,因此,他们完成了一系列MPI及相关的支持系统的支持,并制作了port。总体而言,高性能计算集群中更倾向于采用自动化的任务分配,以降低管理成本;他们对SGE(Sun Grid Engine)和监控工具进行了一系列修改,使其在FreeBSD上运行的效果与Linux相当甚至更好。

从某种意义上说,超级计算中的开发人员和系统管理员,会朝着两个完全不同的方向去思考问题。如何调和两者之间的矛盾呢?其实,这也正是在其他计算系统中经常碰到的问题。

阅读全文… ( 本文约 1417 字,阅读大致需要 3 分钟 )

给tarsier增加了1GB内存

• Hardware

前一阵观察发现tarsier的负载主要来自于对内存的过度使用。遂为其增加了1GB内存,目前做压力测试中。

压力测试工具为make -j4 universe

参与评论

诡异的freetype2问题

• Development

今天帮同事调一个程序。

问题:服务器,FreeBSD 6.2上,某程序速度是一台配置较低的笔记本上的Ubuntu的大约1/10。

折腾许久,手工改了一堆port,发现没作用。遂祭出ktrace,发现那个程序十分不理性地mmap一个中文ttf文件;将字体改为英文的,则速度一样。另一个诡异的问题是,使用中文字体会疯狂吃内存。

然后改了freetype2,令其不使用mmap,发现不再出现不理性的内存占用了,速度提高10倍。

阅读全文… ( 本文约 356 字,阅读大致需要 1 分钟 )

ULE 2.0 hits -HEAD

• Kernel

Today, Jeff Roberson has committed his version 2.0 ULE scheduler. This new version has addressed several design issues as well as several bugs.

The new scheduler has adopted a circular queue, instead of the double-queue structure which is also found in the Linux O(1) scheduler. The latter has lead to difficulty implementing nice correctly.

For uniprocessor case, ULE is now faster.

MP algorithm has been simplified a bit.

A lot of bugfixes, etc.

To quote the original commit message:

ULE 2.0:

  • Remove the double queue mechanism for timeshare threads. It was slow due to excess cache lines in play, caused suboptimal scheduling behavior with niced and other non-interactive processes, complicated priority lending, etc.
  • Use a circular queue with a floating starting index for timeshare threads. Enforces fairness by moving the insertion point closer to threads with worse priorities over time.
  • Give interactive timeshare threads real-time user-space priorities and place them on the realtime/ithd queue.
  • Select non-interactive timeshare thread priorities based on their cpu utilization over the last 10 seconds combined with the nice value. This gives us more sane priorities and behavior in a loaded system as compared to the old method of using the interactivity score. The interactive score quickly hit a ceiling if threads were non-interactive and penalized new hog threads.
  • Use one slice size for all threads. The slice is not currently dynamically set to adjust scheduling behavior of different threads.
  • Add some new sysctls for scheduling parameters.

Bug fixes/Clean up:

  • Fix zeroing of td_sched after initialization in sched_fork_thread() caused by recent ksegrp removal.
  • Fix KSE interactivity issues related to frequent forking and exiting of kse threads. We simply disable the penalty for thread creation and exit for kse threads.
  • Cleanup the cpu estimator by using tickincr here as well. Keep ticks and ltick/ftick in the same frequency. Previously ticks were stathz and others were hz.
  • Lots of new and updated comments.
  • Many many others.

Tested on: up x86/amd64, 8way amd64.

阅读全文… ( 本文约 506 字,阅读大致需要 3 分钟 )