# 2.6 lags for me

## kitana_ann

Hi

I recently migrated to 2.6 on my server. I have a teamspeak server that runs on a separate machine. After the migration the teamspeak server lags so much you cant hardly log on to it. Also after about a day with 2.6 the lag got worse so that I hardly got out on the net. I had to reboot on 2.4 and it works again. 

This is what I did on the migration: I compiled the kernel manually not using genkernel. When I compiled I compared it with my old configuration and made it simulier to 2.4. I also activated udev and recompiled glibc. 

Does anybody have a tip off what I should do? I am thinking of strating over with genkernel. Any suggestions?

Thanx for any reply

----------

## frenkel

Is DMA enabled? Try running this command:

```

# hdparm /dev/hda

```

replacing hda with your harddrive.

----------

## kitana_ann

 *Frenkel wrote:*   

> Is DMA enabled? Try running this command:
> 
> ```
> 
> # hdparm /dev/hda
> ...

 

Here is the output.

```

# hdparm /dev/hda

/dev/hda:

 multcount    = 16 (on)

 IO_support   =  0 (default 16-bit)

 unmaskirq    =  0 (off)

 using_dma    =  0 (off)

 keepsettings =  0 (off)

 readonly     =  0 (off)

 readahead    =  8 (on)

 geometry     = 12161/255/63, sectors = 100030242816, start = 0

hda with your harddrive.
```

----------

## kloune

Hello,

I have the same problem. I never restart my server and sometimes it just lags so much that login over SSH times out. I didn't try 2.4 again, but I would be really happy if someone already found the problem. 

Processor usage is really low, mem usage too. I don't know where the problem is. 

Immediately after restart it always works well, but after some days .... dead

----------

## zieloo

Are you using one of those brand new 2.6.11 kernels? Which exactly?

----------

## codergeek42

 *kitana_ann wrote:*   

>  *Frenkel wrote:*   Is DMA enabled? Try running this command:
> 
> ```
> 
> # hdparm /dev/hda
> ...

 You should enable DMA on the device:

```
# hdparm -d 1 /dev/hda
```

----------

## fredgt

For a teamspeak server you might also want to try preemptible kernel option in "Processor type and features". Don't know it will help but it might help. This also helps with the lag on acpi events.

```
CONFIG_PREEMPT:                                                                                                                                    

 This option reduces the latency of the kernel when reacting to                                                                                     

 real-time or interactive events by allowing a low priority process to                                                                             

 be preempted even if it is in kernel mode executing a system call.                                                                                 

 This allows applications to run more reliably even when the system is                                                                              

 under load.                                                                                                                                                                                                                                                                                             

 Say Y here if you are building a kernel for a desktop, embedded                                                                                    

 or real-time system.  Say N if you are unsure.                                                                                                     

                                                                                                                                                    

 Symbol: PREEMPT [=y]                                                                                                                               

 Prompt: Preemptible Kernel                                                                                                                         

 Defined at arch/i386/Kconfig:508                                                                                                                

 Location:                                                                                                                                        

      -> Processor type and features
```

----------

## zieloo

Well, how blind I am:)

I though I'd direct the discussion towards a problem I'm experiencing on my gentoo desktop, related to this. Oh, hmm.

When it comes to no dma - check your kernel config to see whether you've enabled all the necessary options, in case hdparm -d 1 fails.

----------

## zieloo

 *fredgt wrote:*   

> For a teamspeak server you might also want to try preemptible kernel option in "Processor type and features". Don't know it will help but it might help. This also helps with the lag on acpi events.
> 
> ```
> CONFIG_PREEMPT:                                                                                                                                    
> 
> ...

 

DO NOT enable this if using Con Kolivas' kernel patchet. Will cause random and unexpected hangups.

----------

## bollucks

 *zieloo wrote:*   

> 
> 
> DO NOT enable this if using Con Kolivas' kernel patchet. Will cause random and unexpected hangups.

 

Where did you hear that? Most -ck users are using PREEMPT.

----------

## lavacano

im happy with my new ck  PREEMPT works.  so does nvidia-6111 its a win win

----------

## bollucks

If you're not getting dma enabled by default in 2.6 then you are missing your proper driver support being built into the kernel. Porting your config from 2.4 is not enough as the driver names have evolved since then and the generic options from 2.4 no longer work. Enabling it with hdparm if the kernel has refused to enable it by default will not give you correct performance choosing a compatibility dma mode, or no dma at all.

----------

## zieloo

 *bollucks wrote:*   

>  *zieloo wrote:*   
> 
> DO NOT enable this if using Con Kolivas' kernel patchet. Will cause random and unexpected hangups. 
> 
> Where did you hear that? Most -ck users are using PREEMPT.

 

Well, even on Con's web site he wrote not to enable it... But cannot see the entry know... Well, at least for 2.6.7 patched with -ck it caused awfull hangups, which went away as soon as I disabled preempt.

I'll check it with a newer kernel, anyway.

----------

## kitana_ann

THanx for youe replys  :Very Happy: 

I tried this: 

```

#hdparm -d 1 /dev/hda

/dev/hda:

 setting using_dma to 1 (on)

 HDIO_SET_DMA failed: Operation not permitted

 using_dma    =  0 (off)

```

But it wont work. Must I configure kernel?

*Edit: I forgot to run 2.6 first. I will try again  :Embarassed: 

And I forgot to add, my teamspeak server is running under windows.

----------

## zieloo

Did you try searching he forums? There's a number of threads on how to enable dma when a computer does not want to cooperate:P

It may be problem with your disk, bleh'ed bios settings, badly configured kernel or anything else you can think of.

----------

## bollucks

 *kitana_ann wrote:*   

> THanx for youe replys 
> 
> I tried this: 
> 
> ```
> ...

 

Read my comment above. If you don't have proper chipset compiled in hdparm won't help you.

----------

## kitana_ann

 *Quote:*   

> 
> 
> Read my comment above. If you don't have proper chipset compiled in hdparm won't help you.

 

Thank you for your comment. 

I am obviously not so good at kernel configuring, so I´m going to try genkernel and see if it works better for me.  :Smile: 

I am running linux-2.6.11-hardened-r13 by the way.

----------

## kitana_ann

 *bollucks wrote:*   

> If you're not getting dma enabled by default in 2.6 then you are missing your proper driver support being built into the kernel. Porting your config from 2.4 is not enough as the driver names have evolved since then and the generic options from 2.4 no longer work. Enabling it with hdparm if the kernel has refused to enable it by default will not give you correct performance choosing a compatibility dma mode, or no dma at all.

 

This was accuelly the case. I run though my configuration again and notice I forgot to compile in the chipset! So now everything works just fine  :Very Happy: 

Thank you.

----------

## bollucks

Welcome, and enjoy 2.6.

----------

## kitana_ann

This really sucks to bringing this topic upp again, but my 2.6 still makes the Teamspeak server lag. 

I dont get it, I have Bittornado on and it takes about 1.7% of the CPU then before witch was 45% CPU. So I thought all my issues were gone. But the guys on the teamspeak still says that it lags from time to time. Please observe that the teamspeak is running on a windows machine  :Embarassed: . 

I am just wondering if you guys know a way so I can run a test on my network, just to see how much bandtwidth the torrent is really taking. I have limited it to maximun download to 300kbps and upload to 100kbps. I have a total of 10MBps on my network. 

Or maby someone have any better idea of how I can find the source to the problem?

----------

