Re: Kernel read/write Blocksize

Glynn Clements <[email protected]>
Newsgroups gmane.linux.admin
Message-ID <[email protected]>
Neal Morrison wrote:

> some of my colleagues told me that the internel Buffsize ist 4k.
> Yesterday I saw in the Kernelconfigurations that the default value for
> the stacksize is 8k and you can set it to 4k.
> 
> Kernel hacking -> Use 4Kb for kernel stacks instead of 8Kb   

Note that this is for the kernel stack, not the user-space stack.

> So my question is: Is the stacksize simular to the read/write size? 

What do you mean by "read/write size"?

Various operations either require or will be more efficient when
dealing with sizes which are multiples of some block size. Different
operations may involve different block sizes; e.g. the RAM page size
isn't necessarily the same as the disk block size, so operations which
involve copying data between disk and RAM should ideally use values
which are a multiple of both (i.e. a multiple of the larger of the
two).

Also, the RAM page size may vary between CPU architectures, while the
disk block size may vary between different filesystem types or even
between different partitions using the same type of filesystem.

Any relevant sizes can normally be obtained either via a standard
macro, or from sysconf() or [f]pathconf().

> And what ist the best read/write size when I build my
> own networkingprogramms?

Networking doesn't operate in blocks, so it doesn't really matter.

-- 
Glynn Clements <[email protected]>
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.