Schedulers in FreeBSD 7.0

Higher performance has been found with the new scheduler SCHED_ULE in FreeBSD 7.0. This requires selecting SCHED_ULE as the scheduler instead of the default 4BSD scheduler (SCHED_4BSD) in the Kernel configuration file (GENERIC or the custom one) prior to Kernel build. You can find more details on building FreeBSD Kernel here and here.

As in the src/sys/conf/NOTES, SCHED_4BSD is the historical, proven, BSD scheduler. It has a global run queue and no CPU affinity which makes it suboptimal for SMP. It has very good interactivity and priority selection. SCHED_ULE provides significant performance advantages over 4BSD on many workloads on SMP machines. It supports cpu-affinity, per-cpu runqueues and scheduler locks. It also has a stronger notion of interactivity which leads to better responsiveness even on uniprocessor machines. This will eventually become the default scheduler.

Some pointers:

Read More...
Bookmark and Share
Your Ad Here

TCP Window

In a connection between a server and a client; both of them share the maximum number of bytes they can receive at a time. This maximum number of bytes is called the Window size. Client's receive window size will be the server's send window size and vice versa.

Internally, the receive window size of a client or a server is the size of the receive buffer for that connection in the network device in it.

In other way, a window size is the amount of data that can be sent through a connection till the receipt of acknowledgement for the sent data.

TCP uses this window concept to achieve good performance and to avoid congestion (bottleneck). A congestion can result in a case where the sender sends data in a higher rate than the receiving rate of the other end (sender window > receiver window).

In most operating systems, TCP send and receive socket buffer sizes are set before setting up a connection. In UNIX and Linux, for example, they are set through sysctls.

Finding appropriate Window size

Theoretically, the window size is the bandwidth delay product calculated as the product of bottleneck bandwidth and the roundtrip time.

Suppose, if we have a connection between two different networks; one is a Gigabit Ethernet (1000Mbps) and the other is a fast Ethernet (100Mbps). The bottleneck bandwidth is that of fast Ethernet.

We can find that connection's roundtrip time by running a ping. In a normal operation, the ping command sends an ICMP request to the destination and waits for the acknowledgement. The destination sends ICMP reply to the source. The ping command prints the roundtrip time for the ICMP request/reply combination. Let's assume that the roundtrip time for that connection was 20ms.

Window size = 100Mbps * 20ms
            = 100 * 10^6 * 20 * 10^(-3)
            = 2000 * 10^3 bits
            = (2 * 10^6 )/8 bytes
            = 250KB

For more details, you can refer to the below pages

Read More...
Bookmark and Share
Your Ad Here