kernel-packages team mailing list archive
-
kernel-packages team
-
Mailing list archive
-
Message #06747
[Bug 620074] Re: Thrashing turns system unusable
** Tags removed: paging thrashing
** Tags added: latest-bios-r01-a0 lucid needs-upstream-testing
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/620074
Title:
Thrashing turns system unusable
Status in The Linux Kernel:
Fix Released
Status in “linux” package in Ubuntu:
Confirmed
Bug description:
Thrashing on Ubuntu seems to make it almost impossible to interact
with the system. It can be minutes before any interaction has an
effect, including remote connections. This means that if a program
either misbehaves or simply needs more memory than available RAM, it
might be hard or impossible to stop it, either locally or remotely.
This can be both an annoyance and a security threat (since a process
without elevated privileges can effectively hang the system).
It is not hard to make a system go into thrashing, especially if it is
low on memory (that's probably true in general, not only of Ubuntu).
On my ASUS netbook running Ubuntu 10.04, with only 1GB RAM, thrashing
can occur as easily as running both Chromium (which is a bit of a
memory hog) and the Resynthesizer plugin in the GIMP at the same time.
Running these programs plus another memory-intensive program like
Mathematica can generate thrashing even when 2GB or 4GB of physical
memory are available.
I am including a short C++ program that allocates and accesses a large
amount of memory, guaranteeing thrashing will occur on any system.
Using this or any other memory-intensive program, the steps required
to reproduce the condition I described are
1. Start one or more memory-intensive programs.
2. As RAM is filled, paging will start, and if the programs try to access the memory that has been swapped out, thrashing occurs.
What happens?
- Interactivity with the system drops to almost zero. Mouse barely
moves, keyboard interaction has huge delays (tens of seconds),
starting a terminal or switching to one if one is already open can
take minutes, as is the case with remote (e.g. SSH) connections.
What I would expect/want to happen?
- The system should keep interactivity levels high at all times. While
I'm not at all an expert on this, I would think this could be achieved
by either not allowing paging out of essential user-interface
elements, or more generally by giving processes that generate a lot of
page faults comparatively lower priority than other processes,
especially processes that are just starting, or are part of the user
interface.
To use the included program, compile with
g++ -o bug bug.cc
and run with
./bug <amount of memory>
where <amount of memory> is the amount of memory in MB to be
allocated. One can run several instances of the program at the same
time, to compete for memory. One can use top, free or the System
Monitor to check when RAM is completely filled, and thrashing starts.
PS: This seems to be a long-standing issue with Linux, it's not
limited to the current version of Ubuntu.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: linux-image-2.6.32-24-generic 2.6.32-24.39
Regression: No
Reproducible: Yes
ProcVersionSignature: Ubuntu 2.6.32-24.38-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-24-generic x86_64
NonfreeKernelModules: nvidia
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.21.
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/controlC0: tibi 1596 F.... pulseaudio
/dev/snd/pcmC0D0p: tibi 1596 F...m pulseaudio
/dev/snd/controlC1: tibi 1596 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
Card hw:0 'NVidia'/'HDA NVidia at 0xfe020000 irq 21'
Mixer name : 'Nvidia MCP78 HDMI'
Components : 'HDA:10ec0888,10250153,00100202 HDA:10de0002,10de0101,00100000'
Controls : 37
Simple ctrls : 20
Card1.Amixer.info:
Card hw:1 'U0x46d0x8da'/'USB Device 0x46d:0x8da at usb-0000:00:04.0-2, full speed'
Mixer name : 'USB Mixer'
Components : 'USB046d:08da'
Controls : 3
Simple ctrls : 2
Date: Wed Aug 18 13:01:30 2010
HibernationDevice: RESUME=UUID=9464cfb9-e39a-46ab-bf3a-01a7f2194ab1
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
IwConfig:
lo no wireless extensions.
eth0 no wireless extensions.
MachineType: eMachines EL1210-09
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-24-generic root=UUID=93f3d657-74ac-4853-acab-704f74ab4cd0 ro quiet splash
ProcEnviron:
PATH=(custom, user)
LANG=en_US.utf8
SHELL=/bin/bash
RelatedPackageVersions: linux-firmware 1.34.1
RfKill:
SourcePackage: linux
dmi.bios.date: 09/23/2008
dmi.bios.vendor: Phoenix Technologies, LTD
dmi.bios.version: R01-A0
dmi.board.name: WMCP78M
dmi.board.vendor: eMachines
dmi.chassis.asset.tag: 0000000000000000000000
dmi.chassis.type: 3
dmi.chassis.vendor: eMachines
dmi.modalias: dmi:bvnPhoenixTechnologies,LTD:bvrR01-A0:bd09/23/2008:svneMachines:pnEL1210-09:pvrR01-A0:rvneMachines:rnWMCP78M:rvr:cvneMachines:ct3:cvr:
dmi.product.name: EL1210-09
dmi.product.version: R01-A0
dmi.sys.vendor: eMachines
To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/620074/+subscriptions