贸易条件人渣经济笔记 » 车东's shared items in Google Reader

中国出口什么,什么东西价格就跌,中国进口什么,什么东西价格就涨,这是一个很多人都知道的事情,虽然这个语言并不是很精确,这里不去深究。

需要区别的一点是,这和8亿件衬衫换1架飞机不完全是一件事情。换哪个国家出口衬衫,估计都得一大堆才能换回来一架飞机。这里的问题是:过去中国可能出口4亿件衬衫就能换回一架飞机,但是过了两年就得6亿件才够(因为衬衫价格相对于飞机价格跌了),再过两年就要8亿件才行了。

当然,光比较衬衫和飞机的价格并不一定具有代表性,毕竟中国出口很多东西,也进口很多东西。一个比较常用的指标是所谓的贸易条件—简单的说就是出口商品的平均价格相对于进口产品的平均价格。这个指标越低,说明一个国家出口的东西相对于进口的东西越便宜。我这里根据海关总署公布的数据作了一个简单的中国贸易条件的图,红线是中国1990-2007年的贸易条件,大家不用管具体的数值(因为这些数取决于怎么对数据进行标准化和基年如何选取),只用关心这条线的走势就行了。蓝色的虚线只是帮助大家看明白,我们的贸易条件在整体上,在这十几年的时间里,是在恶化的。换句话说,在整体上,我们出口的东西相对于进口的东西而言,越来越便宜。也就是说,我们必须出口越来越多的东西来换回越来越少的东西。

clip_image002

在理论上,贸易条件的恶化不一定就是坏事。从纯粹理论上说,假设中国人突然都变成了三头六臂,然后衬衫的产量一下增加到了三倍,但是衬衫的价格只下降了一半,所以虽然中国出口的东西变得更便宜了,但是从实际收入上说,中国人的收入还是上升的。这就像虽然摩尔定律可以让芯片越来越便宜,但这不代表Intel越来越不赚钱一样。

但是中国的故事恐怕不是上面的这个故事,至少不全部是。中国的劳动生产率虽然有着长足的提高,但是中国出口的增长中很大的一部分,特别是在一些低端产业,还是靠很原始的方式进行的:原来一条生产线200个工人,过两年两条生产线400个工人,然后600个,800个,通过不断的增加投入,特别是人力投入来增加产出的。然后从出口市场上说,出口一点的时候价格还不是问题,但是像中国这样给全世界做鞋子,做衣服,做家具的国家,量上去了,价格就得下来。刚开始价格下来一点,厂家还有利润,慢慢的利润被吃光了,就要开始补贴—工人工资是不能涨的,否则没有竞争力;汇率是不能升值的,否则没有竞争力;退税是要越来越多的,否则没有竞争力。可是这样的竞争力真的是我们想维持下去的吗?即便我们一厢情愿的想维持,又能维持多久呢?

靠吊着输液管维系的“竞争力”是难以持续的,中国在这上面曾经经历过的教训可不是一点两点。

06:25 When to use Hardware upgrade instead of Software Optimization » MySQL Performance Blog

One typical question which frequently pops up is whenever it is better to use hardware upgrade or optimize software more. I already wrote about it, for example here.

Today I’ll look at the same topic from the consultants view. When consultant should suggest hardware upgrade and when it is not in a simple checklist form.

How good is hardware ? Sometimes people use so crappy hardware it would be much cheaper for them to upgrade before purchasing much of professional services. Though in some cases people like their system to be optimal and so they want to run it on some old box even if it costs them more to optimize it. It may be valid choice allowing to take a hardware boost later down the road when you need a major performance increase and do not have a time for big application changes.

Is current hardware usage balanced ? Say you have 10 servers one of them is overloaded and 8 are almost idle. In this case proper balancing is the answer rather than getting more hardware. Of course not all of the applications can be easily balanced but it is also surprising how many cases of people with reasonable sharded or replicated architecture suffer from wrong balance. Balancing can be simple operations act or require application changes which is another variable.

Are there any spikes in hardware use ? Often performance problems happen only Sometimes….. for example nightly when you do a backup or at 15 minutes off hour when you have some cron job running. In such cases evening out the usage is often better choice than hardware upgrade and it also can be done easily.

Is MySQL, Queries, Architecture optimized well enough ? Do not advice hardware upgrade as the first thing when you can triple performance by simple my.cnf change. Well enough is a tricky term though. You need to balance things and see what can be easily done by consultant or the customer and what is not. Adding the indexes is easy. Changing the query in your own application is easy but is hard for third party application, especially if it is close source. Big schema changes, caching, sharding can be even more complication - it depends. The bigger your application is going to be the more optimal you want to be on application level to be efficient.

What is exactly your goal with hardware upgrade ? Same as with software optimizations and changes you do should have a goal. You add the index to avoid full table scan and make given query faster. You add memory to avoid disk IO and make lookups faster. The goal in the application performance - making throughput better, query faster should lead you to goals in hardware (faster random IO, better caching, faster execution) which you can use to understand what needs to be done (gettings SSD, upgrading memory, upgrading CPUs). There are number of balancing questions you have to solve too such as SSD may not need so good in memory caching any more etc. There is no such thing as better hardware really, just hardware which serves application needs better. Many of us probably remember as moving from 4 Core systems to 8 Core reduced performance for many MySQL systems even though hardware itself was superior.

There are surely more things you can look at but these are simple obvious things you can keep in mind. Do you think I should add something else ?


Entry posted by peter | No comment

Add to: delicious | digg | reddit | netscape | Google Bookmarks


^==Back Home: www.chedong.com

^==Back Digest Home: www.chedong.com/digest/

<== 2008-12-05
  十二月 2008  
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
==> 2008-12-07