Monday, May 25, 2009

I/O stream buffer

最近作项目时觉得写大数据量写入时性能不行.  于是研究了 I/O stream buffer.

iso c中规定了standard io stream interface.  这部分实现在 glibc 中,于是研究了一下.
stream buffer 的分配不在fopen里.  是在第一次对文件写的时候. 大小为fstat得到的st_blksize(见_IO_file_doallocate).

fwrite逻辑为:  先往stream buffer 填, 如果填满了以后还有数据要写,则先flush一下, 然后判断剩余数据大小,   如果大于buffer 大小,  则以buffer 大小为倍数,  把整倍数的数据直接使用write写入.   最后剩下的数据才写入到 buffer  里( 见_IO_new_file_xsputn).

故如果以64k为单位写入ext3文件系统(st_blksize=4k), 则每次写入都对应两次write操作.  一次为4k , 一次为 60k.


Anonymous said...

pozyczki bez bik kielce
kredyt bez bik
6 pożyczki narodowej
pożyczki bez bik
szybka chwilówka
kredyt pożyczka

Anonymous said...

Free Proxy Servers are utilized for anonymous browsing. Most frequent use of free proxy server is to bypass the higher education/workplace or any other place's protection constraints and accessibility unrestricted websites. But [url= ]proxies Buy Proxies Org [/url] servers really should be used with caution. If utilised with no safety actions, it can result in huge loss as in contrast to edge of browsing the internet anonymously. There are two techniques through which you can hide your identity (your IP address) when surfing the world wide web. 1st and the most cheap way is to use free proxy server. There are many windows and linux proxy internet sites offered on the net which allows you use their companies totally free of charge. The other choice for hiding your identity is to use compensated computer software. The IP hiding computer software, modifications your IP address repeatedly to enable you browse net anonymously.

There are couple of critical items you need to keep in thoughts when making use of cost-free proxy servers.

one.) Look at out for your security

Do not give out any delicate details this sort of as your login specifics or credit card info when utilizing diverse proxy servers simply because when you use totally free proxy server, all the data you supply on any internet site is initial sent to cost-free proxy server and then to the site server. So all the details go via the free of charge proxy server and most of the time it is unencrypted, exposing your delicate details for potential misuse.

Compensated computer software are considerably better in terms of protection. There systems are designed to conceal your IP and then discard all your information with out any human involvement.

2.) Balance and Availability

There are numerous free proxy server websites but most of them are not secure and are not obtainable every time you check out them. This issue is not really considerable with compensated computer software.

3.) Velocity of Searching

When you use any proxy server for hiding your IP, you can sense the gradual velocity of searching instantaneously. However there are very good websites accessible for anonymous browsing but they are really difficult to discover. Also, speed is not constant it relies upon mainly on load on their servers. At times you do get good browsing velocity but it truly is not consistent. Once more, compensated computer software for hiding IP are significantly greater at searching speed. As they charge for their solutions, they ensure that the user encounter is better and you do not get slow velocity even though browsing the web through their software.

They are also fantastic when you find a quality a single that masks your place of origin. When searching for a On the web Proxy make confident it has Java set up so you can watch movies. As you can often have your place of origin cloaked but if java does not perform it is not a lot use.

chenlina said...

jordan 6
ray ban eyeglasses
christian louboutin shoes
abercrombie store
jordan 6s
mont blanc pens
michael kors outlet
michael kors outlet
gucci bags
chanel outlet
oakley sunglasses
longchamp handbags
chi flat iron
louis vuitton outlet
louis vuitton outlet
christian louboutin outlet
true religion jeans
abercrombie and fitch
abercrombie & fitch
air max 90
ray ban sungalss
jordan 8s
hollister clothing store
christian louboutin outlet
louis vuitton outlet
gucci outlet online
christian louboutin sale
louis vuitton outlet
louis vuitton
michael kors
coach factorty outlet
jordan 5
longchamp handbags
lululemon sale
jordan retro 4