Bug 209424

Summary: processing packages file needs a huge amount of memory, making install on 256mb systems impossible
Product: [openSUSE] openSUSE 10.3 Reporter: Olaf Hering <ohering>
Component: libzyppAssignee: Michael Andres <ma>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: thomas.nielsen
Version: Final   
Target Milestone: ---   
Hardware: PowerPC   
OS: Linux   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: bug209424.tar.bz2

Description Olaf Hering 2006-10-02 13:56:55 UTC
I tried the current factory tree from nfs://dist.
yast downloads all these metadata files, at some point it will be busy with 'processing packages file'. This leeds to OOM and YaST2.call and the Xorg progrocess get killed by the kernel. I'm sure this worked better a few weeks ago.

After enabling 512MB swap I get a 154MB/107MB/24MB y2base process and 100MB in swap:

 3094 root      18   0  154m 107m  24m S  0.0 43.2   1:41.84 y2base                                                                                                   

Tasks:  41 total,   1 running,  40 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.6%us,  0.0%sy,  0.0%ni, 98.4%id,  0.0%wa,  0.0%hi,  0.0%si, 0.0%st
Mem:    254692k total,   242608k used,    12084k free,     2776k buffers
Swap:   514040k total,   104740k used,   409300k free,    88148k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                 
 3094 root      18   0  154m 107m  24m S  0.0 43.2   1:41.84 y2base                                                                                                   
 2939 root      15   0 30736  10m 3572 S  0.0  4.1   0:05.76 Xorg                                                                                                     
 2951 root      20   0 11240 4476 3376 S  0.0  1.8   0:02.72 fvwm2                                                                                                    
    1 root      18   0  5984 3244 2172 S  0.0  1.3   0:15.32 init                                                                                                     
 2282 root      15   0  8200 3052 2336 S  0.0  1.2   0:00.72 sshd                                                                                                     
 1204 root      25   0  5728 2012 1648 S  0.0  0.8   0:00.05 bash                                                                                                     
 1207 root      25   0  5728 2012 1648 S  0.0  0.8   0:00.03 bash                                                                                                     
 1210 root      25   0  5728 2012 1648 S  0.0  0.8   0:00.01 bash                                                                                                     
 2384 root      15   0  3960 1988 1608 S  0.0  0.8   0:00.04 bash                                                                                                     
 2373 root      25   0  5856 1940 1512 S  0.0  0.8   0:00.38 YaST2.call                                                                                               
 1300 root      25   0  5724 1848 1500 S  0.0  0.7   0:00.45 yast                                                                                                     
 3139 root      21   0  5724 1716 1448 S  0.0  0.7   0:00.02 ag_fvwm2_setlan                                                                                          
  879 root      25   0  3604 1676 1388 S  0.0  0.7   0:00.01 lsh                                                                                                      
 1213 root      25   0  5984 1620  548 S  0.0  0.6   0:00.00 init                                                                                                     
 1214 root      18   0  3828 1612 1352 S  0.0  0.6   0:00.06 inst_setup                                                                                               
 1290 root      18   0  7744 1444 1000 S  0.0  0.6   0:00.55 sshd                                                                                                     
 2950 root      15   0  3004 1320 1064 R  1.6  0.5   0:05.19 top                                                                                                      
 1223 messageb  17   0  5236 1052  824 S  0.0  0.4   0:00.02 dbus-daemon                                                                                              
 1253 root      24   0  2124  704  376 S  0.0  0.3   0:00.01 klogd                                                                                                    
  386 root      12  -4  2168  680  492 S  0.0  0.3   0:00.56 udevd                                                                                                    
 1248 root      18   0  1880  484  404 S  0.0  0.2   0:00.03 syslogd.bin                                                                                              
 3048 root      15   0  1852  468  404 S  0.0  0.2   0:00.00 FvwmCommandS                                                                                             
 1182 nobody    18   0  2036  456  360 S  0.0  0.2   0:00.00 portmap                                                                                                  
 1180 root      15   0  1884  236  156 S  0.0  0.1   0:00.00 dhcpcd
Comment 1 Olaf Hering 2006-10-02 14:01:10 UTC
Created attachment 100040 [details]
bug209424.tar.bz2
Comment 2 Olaf Hering 2006-10-02 14:08:05 UTC
find /var/ -xdev -type f -print0 | xargs -0 ls -Sharl

This shows that all files get copied into local RAM. But they are available via the local filesystem, so nfs,smb,harddisk and CD install do not need to copy them because they are always reachable.
Comment 3 Thomas Fehr 2006-10-04 11:25:52 UTC
Reassigned to packagers.
Comment 4 Stefan Schubert 2006-10-17 09:05:20 UTC
Duncan, can you help here ?
Comment 5 Duncan Mac-Vicar 2007-02-07 17:15:28 UTC
Is a CD, nfs, smb always reachable? no they are not.

The problem here is that we create a local cache always, and verify its consistency.

Michael, how can we avoid doing this?

A source doesnt need to be cached, but we cache them for reboot and 2nd stage I guess.
Comment 6 Michael Andres 2007-02-08 17:12:30 UTC
We could indeed think about running directly from nfs/smb/dir. CD must be changeable, so we need the copy.

YaST had to make sure that all these media stay mounted until inst_rpmcopy copied the data to the system. 

Ask Stano. I don't know whether a 10.2 fix is needed. And for 10.3. it might be completely different if we get the DB.
Comment 7 Stanislav Visnovsky 2007-02-13 14:32:40 UTC
I don't see a way to fix 10.2. Please, look into this for 10.3. I believe a configurable behavior would be the best.
Comment 8 Duncan Mac-Vicar 2007-10-03 15:51:13 UTC
Moving to 10.3. Here much less memmory is used at parsing, but metadata is also copied. I don't see a feasible way to fix this. May be allowing the downloaders to create symlinks?
Comment 9 Thomas Nielsen 2008-05-20 12:38:56 UTC
what about detecting if system memory is low, and if so suggest to installer to reboot after partitioning to benefit from swap partition. Yellow dog does this on Playstation 3, and it makes a huge difference.
Try f.ex to install OpenSUSE 11 on PS3 from no existing partitions - then try again to install OpenSUES 11 when a swap partition exists. Makes the installer blast by. About copying the files as above - not a big difference, but the point is that the install will be done quicker - ALSO for the file handling part - of which Olaf is concerned
Comment 10 Michael Andres 2008-07-10 09:13:43 UTC
I think this can be closed with 11.0.