Re: TCP gurus: compile and time measure
From: Kasper Dupont (kasperd_at_daimi.au.dk)
Date: Sun, 14 Sep 2003 23:24:33 +0200
Stephan Absmeier wrote:
> I do some resarches on TCP. I use gcc1.96, Linux Red Hat 7.2 and x86
> 1. I modified the TCP code. Must I compile the whole kernel or is it
> enough to compile only the modifed file? tcp.c for example.
If you have the object files from the previous compile and didn't
change any major compile time configuration options, it is enough
to compile the modified files. A relinking is obviously necesarry,
but that doesn't take nearly as much time as compiling. You will
probably only have the object files, if you compiled the kernel
If you didn't compile your own kernel, you have to compile the
entire kernel. If you only changed a kernel module, it should be
possible to recompile just that module (at least in theory). It
works for me as long as the module I attempt to recompile doesn't
export any symbols.
> 2. What options must I use for compiling? What makros?
To just compile the kernel use "make bzImage", it will figure out
which files to recompile. If you are building a kernel for the
first time, you have to find or create a .config file, then you
will probably want to use "make dep bzImage modules" to find
dependencies and compile both kernel and modules. To install the
compiled kernel execute "make modules_install install" as root.
The config files used for the default Red Hat kernels can be found
> 3. I want to measure the time used for transport. I want to see the
> effects of using the tcp options. For example turning nagle algorithm
> off. I did something like
> I thought that all the data has been send, befor the socket is closed.
> But it's too fast. I have a 100MBit ethernet, I send 80000 bytes, and I
> need 0.003195 sek! But (8*80000)/100,000,000 = 0.0064 is a theoretical
> upper bound ( and no overhead). I filled the buffer with chars, produced
> wit rand(). So it isn't regular.
Possibly data is being buffered and is still being transmitted
after the second call of gettimeofday()?
-- Kasper Dupont -- der bruger for meget tid paa usenet. For sending spam use mailto:email@example.com Their business was zero and it was shrinking.