# [SOLVED] Mini Freezes!

## ManDay

I'm fairly upset that in at least a half year I haven't managed to get rid of these mini freezes which interrupt practically everything. They are particularly annoying while typing. In the middle of typing the computer stops responding for the duration of say, 5 to 10 letters which then appear suddenly after the freeze ends. It's even worse when using backspace or delete, where I suddenly find myself having deleted way too many characters.

I don't see any point in describing my speculations. I've made ample effort to track this down and verbosely described my problem to a lot of people and ended up without any progress at all!

I want to get rid of this. I'm short before removing Gentoo in order to be able to type again, this becomes unbearable!Last edited by ManDay on Fri Mar 01, 2013 1:47 pm; edited 1 time in total

----------

## John R. Graham

 *ManDay wrote:*   

> ...I don't see any point in describing my speculations. I've made ample effort to track this down and verbosely described my problem to a lot of people and ended up without any progress at all!

 By all means, don't tell us anything about what you've tried. Make us lead you through all the avenues you've already explored. Make your volunteer, unpaid helpers work harder. That'll work.

- John

----------

## ManDay

 *John R. Graham wrote:*   

>  *ManDay wrote:*   ...I don't see any point in describing my speculations. I've made ample effort to track this down and verbosely described my problem to a lot of people and ended up without any progress at all! By all means, don't tell us anything about what you've tried. Make us lead you through all the avenues you've already explored. Make your volunteer, unpaid helpers work harder. That'll work.
> 
> - John

 

My only hope is that the description of mini freezes rings the bell for someone. I haven't tried anything definite. I played arround with the scheduler options in the kernel, tried pinning it down to a certain process, all of which failed. I require your help from scratch, everything else would be misleading to say.

----------

## Logicien

So, I suppose you tried to configure the timer to 1000 hz in the kernel (CONFIG_HZ_1000=y CONFIG_HZ=1000) to have the fastest response for desktop. It haven't help. 

When you type on keyboard when the system is idle, do you have those mini freezes? Is it only appen when the CPU usage is high? Does it appen in X or/and in console? What is the repeat rate and delay you use on keyboard? Is there some possibilities that the hardware is in fault?

According to what you said, you tried to renice the processes or something like that to give an higher priority to what you do. Tell us other conditions where mini freezes arrived than when typing on keyboard.

Mini freezes are not specific to Gentoo. They can come from bugs that force the kernel to loop due to hung tasks. You can configure the kernel to detect soft and hard lockups in the Kernel hacking section.

----------

## John R. Graham

Well, let's start somewhere. @ManDay, could you postThe output of

```
cat /proc/cpuinfo
```

The output of 

```
cat /proc/meminfo
```

The output of

```
swapon -s
```

please?

- John

----------

## Ant P.

Set timer to 1000Hz, disable tickless, disable transparent hugepages, disable C1E in BIOS.

----------

## ManDay

I can say with absolute certainty that the freezes occur on minimal CPU usage, in X and it TTY. However, it occured to me that I can't recall having seen them anywhere outside of VIM and GVIM (I originally said I had noticed them elsewhere - at least I can't reproduce that right now). So perhaps this is a vim issue? Though I don't have anything out of the ordinary in my VIM config and no scripts, whatsoever. Just

```
USE="-* +gpm +nls"
```

I've got the impression that this happens when the CPU is under little load.

.config has

```
CONFIG_HZ_1000=y

CONFIG_HZ=1000

# CONFIG_TRANSPARENT_HUGEPAGE is not set
```

cat /proc/cpuinfo

```
processor   : 0

vendor_id   : GenuineIntel

cpu family   : 6

model      : 42

model name   : Intel(R) Pentium(R) CPU 997 @ 1.60GHz

stepping   : 7

microcode   : 0x28

cpu MHz      : 1600.000

cache size   : 2048 KB

physical id   : 0

siblings   : 2

core id      : 0

cpu cores   : 2

apicid      : 0

initial apicid   : 0

fpu      : yes

fpu_exception   : yes

cpuid level   : 13

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave lahf_lm arat epb xsaveopt pln pts dtherm

bogomips   : 3192.63

clflush size   : 64

cache_alignment   : 64

address sizes   : 36 bits physical, 48 bits virtual

power management:

processor   : 1

vendor_id   : GenuineIntel

cpu family   : 6

model      : 42

model name   : Intel(R) Pentium(R) CPU 997 @ 1.60GHz

stepping   : 7

microcode   : 0x28

cpu MHz      : 800.000

cache size   : 2048 KB

physical id   : 0

siblings   : 2

core id      : 1

cpu cores   : 2

apicid      : 2

initial apicid   : 2

fpu      : yes

fpu_exception   : yes

cpuid level   : 13

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave lahf_lm arat epb xsaveopt pln pts dtherm

bogomips   : 3192.63

clflush size   : 64

cache_alignment   : 64

address sizes   : 36 bits physical, 48 bits virtual

power management:
```

cat /proc/meminfo

```
MemTotal:        3880264 kB

MemFree:         3041716 kB

Buffers:           13756 kB

Cached:           711716 kB

SwapCached:            0 kB

Active:           147512 kB

Inactive:         648544 kB

Active(anon):      71404 kB

Inactive(anon):    55024 kB

Active(file):      76108 kB

Inactive(file):   593520 kB

Unevictable:          68 kB

Mlocked:              68 kB

SwapTotal:       1999868 kB

SwapFree:        1999868 kB

Dirty:                 0 kB

Writeback:             0 kB

AnonPages:         70692 kB

Mapped:            42296 kB

Shmem:             55844 kB

Slab:              20984 kB

SReclaimable:      11456 kB

SUnreclaim:         9528 kB

KernelStack:         752 kB

PageTables:         3160 kB

NFS_Unstable:          0 kB

Bounce:                0 kB

WritebackTmp:          0 kB

CommitLimit:     3940000 kB

Committed_AS:     234308 kB

VmallocTotal:   34359738367 kB

VmallocUsed:      807564 kB

VmallocChunk:   34358927959 kB

DirectMap4k:       14336 kB

DirectMap2M:     4022272 kB
```

swapon -s

```
Filename                                Type            Size    Used    Priority

/dev/sda3                               partition       1999868 0       -1
```

----------

## ManDay

Owing to the fellas on #vim I (they) were able to figure this out. It's that vim forces flushing to the swap-file in the main thread with fsync( ) so it's blocking until the swap file is flushed. Disabling fswap with :set swapsync= will not make vim block and instead rely on the FS to do the flushing at a appropriate times.

----------

