[Bug 1178943] Re: /etc/cron.daily/apt is holding memory while "sleep"

Daniel Hartwig mandyke at gmail.com
Sun May 12 00:52:05 UTC 2013


On 12 May 2013 02:37, Jérôme <1178943 at bugs.launchpad.net> wrote:
> Below is the output of ps :
> ---
> j at lt:~$ ps axlf
> F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND
> (...)
> 1     0   812     1  20   0   2392   840 rt_sig Ss   ?          0:00 anacron -s
> 0     0  1615   812  20   0   2232   520 wait   S    ?          0:00  \_ /bin/sh -c nice run-parts --report /etc/cron.daily
> 0     0  1616  1615  30  10   2140   520 poll_s SN   ?          0:00      \_ run-parts --report /etc/cron.daily
> 0     0  1622  1616  30  10   2232   560 wait   SN   ?          0:00          \_ /bin/sh /etc/cron.daily/apt
> 0     0  1672  1622  30  10   2148   280 hrtime SN   ?          0:00              \_ sleep 1307
> (...)
> ---
>
> This makes 11 MB of virtual memory and 3 MB of physical memory.
>
>

Virtual size (VSZ) and Resident Set Size (RSS) are not accurate
measures of the _unique_ memory consumed by a process.  Processes
share memory e.g. for the executable image.  Use a tool such as the
mem_usage script at
<http://www.elinux.org/Runtime_Memory_Measurement>.  See also
<http://lwn.net/Articles/230975/>.

The unique memory size of that process tree is more on the order of
1–2 MB, and a system has any number of /bin/sh processes and all
sharing the same executable image.  Further, a sleeping and nice
process is never a significant contributor to swapping, whose data is
swapped out and rarely in.

If this is causing measurable harm on your system you have many more
problems than one tiny, sleeping process.  Submit a patch or dont, I
would not waste my time.

 status invalid


** Changed in: apt (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1178943

Title:
  /etc/cron.daily/apt is holding memory while "sleep"

Status in “apt” package in Ubuntu:
  Invalid

Bug description:
  The "random_sleep" function is calling "sleep". Thus the memory used
  by anacron, the /etc/cron.daily/apt script is frozen for minutes when
  the "random_sleep" blocks until the "sleep" program completes.

  Maybe an implementation of a delayed system call back would save
  memory. For example the script could register a call-back with "at"
  utility instead of using sleep.

  I think this problem is important, especially during a few minutes
  after the system startup. The desktop has to be responsive while many
  desktop tasks are temporarily using more memory for initialization
  during the first hour.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: apt 0.8.16~exp12ubuntu10.10
  ProcVersionSignature: Ubuntu 3.2.0-41.66-generic 3.2.42
  Uname: Linux 3.2.0-41-generic i686
  ApportVersion: 2.0.1-0ubuntu17.2
  Architecture: i386
  Date: Sat May 11 11:00:38 2013
  InstallationMedia: Xubuntu 12.04.2 LTS "Precise Pangolin" - Release i386 (20130213)
  MarkForUpload: True
  ProcEnviron:
   LANGUAGE=fr:en
   TERM=xterm
   PATH=(custom, no user)
   LANG=fr_FR.UTF-8
   SHELL=/bin/bash
  SourcePackage: apt
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1178943/+subscriptions




More information about the foundations-bugs mailing list