今天一边参加周会一边看完了《谁认识马云》,现在阅读速度越来越快了(也越来越粗糙)。看到最后,估计了一下书中介绍的细节 99% 都是在其他报刊杂志上看到过,现在给企业家写书真是越来越容易,什么时候技术作不下去了,也找企业家写传记去。
唯一有印象的书中的一句话:心有激雷而面如平湖者,可拜上将军。很有意思的一句话,也有作”胸有激雷而面如平湖者,可拜上将军”.
最近一直加班,搞得身心疲惫,瘦的直掉裤子,虽然还没掉链子,估计这么下去也快了。明天要去参加公司举办的网络工程师侠客行大会,估计能见到不少朋友,本来说上午还有体检的,幸好可以以后再去。
后天下午要去上海,周一能在上海停留一上午,难得休息一下。
–EOF–
导致 Oracle 10gR2 出现 ORA-39095 的另一种原因
Oracle 10g R2 的 Data Pump 是一个好工具,弥补了传统 export/import 工具的很多不足。相关信息可以参考一下我以前对 Data Pump 的介绍。
最近在 Linux 平台上经常遇到 ORA-39095 错误。这个错误。这个错误号,文档的解释:
ORA-39095:Dump file space has been exhausted: Unable to allocate string bytes
Cause: The Export job ran out of dump file space before the job was completed.
Action: Reattach to the job and add additional dump files to the job restarting the job.
这个解释只针对一般情况。我遇到的这个案例,目录的空间还有很多,可是也一样报错了。而且,一般在第 100 个 导出文件出错(更正:%U参数是2位,定长的,最大99)。开始以为是 Bug,可是遍查 Metalink,发现和 ORA-39095 错误有关只有两条信息,和我遇到的情况不符。
偶然在阅读 Oracle Database Utilities 手册的时候,发现了这一段话:
Because each active worker process or I/O server process writes exclusively to one file at a time, an insufficient number of files can have adverse effects. Some of the worker processes will be idle while waiting for files, thereby degrading the overall performance of the job. More importantly, if any member of a cooperating group of parallel I/O server processes cannot obtain a file for output, then the export operation will be stopped with an ORA-39095 error. Both situations can be corrected by attaching to the job using the Data Pump Export utility, adding more files using the ADD_FILE command while in interactive mode, and in the case of a stopped job, restarting the job.
真是孤陋寡闻了,我的并行度用的是 4 ,减小这个并行度,该错误不再出现。
You can supply multiple file_name specifications as a comma-delimited list or in separate DUMPFILE parameter specifications. If no extension is given for the filename, then Export uses the default file extension of .dmp. The filenames can contain a substitution variable (%U), which implies that multiple files may be generated. The substitution variable is expanded in the resulting filenames into a 2-digit, fixed-width, incrementing integer starting at 01 and ending at 99. If a file specification contains two substitution variables, both are incremented at the same time. For example, exp%Uaa%U.dmp would resolve to exp01aa01.dmp, exp02aa02.dmp, and so forth.
–EOF–
学习 Flickr 的 基于 LAMP 的容量规划经验
好久没怎么正式更新 Blog 了,快荒芜了,长满了 Spam 的荒草。
最近其实发现了不少可以和大家一起学习的好内容。Flickr 的 John Allspaw 在 MySQL Conf 2007 作了一个题为 Capacity planning for LAMP (下载PDF文件) 的技术报告,说起容量规划,多少有点空对空的意思,不过这个 PPT 还是介绍了不少 Flickr 的网站运维经验。
Flickr 的数据量的确越来越惊人了,根据文档中透漏的数据:
Squid Cache 中共有 3500 万张图片;
在 Squid RAM 中有 200 万张图片;
4.7亿的图片,每张图片有4到5种尺寸;
每秒钟 38000 个到 memcached 的请求;
2 PB 裸存储容量(周日需要消耗1.5T 的空间)
三个主要步骤:
计划
基于实际业务,而不是抽象的理论。John Allspaw 认为基准测试(Benchmark) 作用并不大,这一点我也很赞同。在业务频繁变化的环境中,Benchmark 根本不能与实际业务情况匹配。
部署
Flickr 使用SystemImager/SystemConfigurator(自动化安装、软件分发),CVSup(网络中的文件分发、更新),Subcon(配置管理工具)提高部署效率。
度量(图形化展现)
Flickr 使用了 Ganglia 来进行容量数据的展现。Ganglia 最初设计是用于高性能集群计算的监控上面,也是以 RRDTool 为基础来进行图形展示。Ganglia 最主要的优点还是管理的方便性: Client/Server 结构, 各自跑 Demon 进行数据交互(XML形式)。相比起来, Cacti + Collectd 需要进行很多手工配置,在面对大量需要监控的主机的时候的确不那么方便。
Web 2.0 站点的运维似乎大家都在摸索着走。期望这次阿里巴巴组织的侠客行大会上也有有朋友坐下来聊聊这个话题(Flickr 的架构师本来可以来的,因为时间的问题不能成行,挺遗憾的)。
–EOF–
睡不着
可能是最近太累,昨天一口气从一点睡到了18点,邻居家的装修都没能让我清醒。当然中午的时候还是清醒了一会儿吃了一点东西就接着睡的。
结果晚上无论如何也睡不着。干躺了几个小时,干脆还是起来算了。
清晨小区里的鸟叫的不是一般的欢。不知道是什么鸟,反正这种鸟杭州特别多。
–EOF–