* memory usage between kernel versions
@ 2017-11-14 17:42 Mike Harless
2017-11-14 18:04 ` valdis.kletnieks at vt.edu
0 siblings, 1 reply; 3+ messages in thread
From: Mike Harless @ 2017-11-14 17:42 UTC (permalink / raw)
To: kernelnewbies
Hi,
I've got an embedded product that is currently using a 3.14 kernel, with
all user apps compiled with gcc 4.9 against that kernel. When I replace
the 3.14 kernel with a 4.9 kernel, and leave everything else the same on the
product, I see my memory available drop by over 10MB when looking at
/proc/meminfo. The size difference between the 3.14 and 4.9 kernels is
only about 1MB, so I'm trying to figure out where the rest went, and if
I've possibly configured somehting in the 4.9 kernel differently that's
causing the change.
Looking at smaps files for various processes, I'm seeing some Rss
differences when some common libraries are loaded and I'm wondering if
it's really different, or just different accounting/fetching. For
instance, with libc and the same process with both kernels:
3.14 kernel:
4c010000-4c0d0000 r-xp 00000000 00:0e 1177 /lib/libc-2.20-2014.11.so
Size: 768 kB
Rss: 416 kB
Pss: 12 kB
4.9 kernel:
4c010000-4c0d0000 r-xp 00000000 00:0e 1177 /lib/libc-2.20-2014.11.so
Size: 768 kB
Rss: 768 kB
Pss: 12 kB
Is this difference in Rss something to keep looking into, or are there
other thoughts or suggestions on where to look? Thanks!
--Mike
^ permalink raw reply [flat|nested] 3+ messages in thread
* memory usage between kernel versions
2017-11-14 17:42 memory usage between kernel versions Mike Harless
@ 2017-11-14 18:04 ` valdis.kletnieks at vt.edu
2017-11-14 18:28 ` Mike Harless
0 siblings, 1 reply; 3+ messages in thread
From: valdis.kletnieks at vt.edu @ 2017-11-14 18:04 UTC (permalink / raw)
To: kernelnewbies
On Tue, 14 Nov 2017 09:42:33 -0800, Mike Harless said:
> 3.14 kernel:
> 4c010000-4c0d0000 r-xp 00000000 00:0e 1177 /lib/libc-2.20-2014.11.so
> Size: 768 kB
> Rss: 416 kB
> Pss: 12 kB
>
> 4.9 kernel:
> 4c010000-4c0d0000 r-xp 00000000 00:0e 1177 /lib/libc-2.20-2014.11.so
> Size: 768 kB
> Rss: 768 kB
> Pss: 12 kB
>
> Is this difference in Rss something to keep looking into, or are there
> other thoughts or suggestions on where to look? Thanks!
Looks identical to me except for the RSS - which is the amount of resident
memory consumed. And *that* can be an artifact of when the process was started,
what order processes were started, how many of its pages had been referenced,
whether the kernel does read-ahead of .so text segments, and any number of
other things. It may be as simple as "you checked the 3.14 system when it had
been up for several days/weeks/months and all the useless parts of libc had
been freed (to be re-fetched from disk if referenced), and you checked the
bright shiny new 4.9 kernel right after boot, before memory pressure had caused
page frees to happen.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20171114/a001f6d5/attachment.bin
^ permalink raw reply [flat|nested] 3+ messages in thread
* memory usage between kernel versions
2017-11-14 18:04 ` valdis.kletnieks at vt.edu
@ 2017-11-14 18:28 ` Mike Harless
0 siblings, 0 replies; 3+ messages in thread
From: Mike Harless @ 2017-11-14 18:28 UTC (permalink / raw)
To: kernelnewbies
valdis.kletnieks at vt.edu wrote:
> On Tue, 14 Nov 2017 09:42:33 -0800, Mike Harless said:
>
> > 3.14 kernel:
> > 4c010000-4c0d0000 r-xp 00000000 00:0e 1177 /lib/libc-2.20-2014.11.so
> > Size: 768 kB
> > Rss: 416 kB
> > Pss: 12 kB
> >
> > 4.9 kernel:
> > 4c010000-4c0d0000 r-xp 00000000 00:0e 1177 /lib/libc-2.20-2014.11.so
> > Size: 768 kB
> > Rss: 768 kB
> > Pss: 12 kB
> >
> > Is this difference in Rss something to keep looking into, or are there
> > other thoughts or suggestions on where to look? Thanks!
>
> Looks identical to me except for the RSS - which is the amount of resident
> memory consumed. And *that* can be an artifact of when the process was started,
> what order processes were started, how many of its pages had been referenced,
> whether the kernel does read-ahead of .so text segments, and any number of
> other things. It may be as simple as "you checked the 3.14 system when it had
> been up for several days/weeks/months and all the useless parts of libc had
> been freed (to be re-fetched from disk if referenced), and you checked the
> bright shiny new 4.9 kernel right after boot, before memory pressure had caused
> page frees to happen.
These were both checked right at startup once the product got to
"idle", and have been consistent in a number of tests. Is there a
configuration for read-ahead of .so text segments in the 4.9 kernel?
That sure seems to be what I'm seeing here in this case with Rss. That
could explain some of the difference in memory available too.
--Mike
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-14 18:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-14 17:42 memory usage between kernel versions Mike Harless
2017-11-14 18:04 ` valdis.kletnieks at vt.edu
2017-11-14 18:28 ` Mike Harless
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).