Hi,
I had attended an interview and i was not able to answer this question.
Please let help on the answer.
Q>>
After patching - the ram decreased from 10 Gb to 2 GB ?
A>> I informed that i will log in with old kernel and check if the ram shows fine.
He informed if you log in with old kernel then it shows 10 GB but with the new kernel it shows as 2 GB. There is no hardware issue.
If i face this question next time what should be my answer ?
What tooling is used to report the amount of "ram" ?
Thanks for the reply.
In Linux OS we would be using top and cat /proc/meminfo we would find the ram size.
Yes, but did they mean actual ram or free ram?
Yes, remember that "Cached" counts as "free".
They informed the total memory (used + free ) was 2 GB after patching but before patching it was 10 GB.
I was thinking if next time i get this question, How best do i answer
Yes that what Corona688 and I mean, on Linux used + free does not equal total memory, the rest is tied up in buffers and cache. But that will be freed immediately if it is needed, so in fact cache and buffers should be added to see what memory is free...
If the question had memory switching between 4GB or 10GB instead of 2GB and 10 GB, I'd say someone loaded a 32-bit kernel non-PAE kernel instead of a 32-bit PAE-enabled or 64-bit kernel.
IIRC, a standard 32-bit Linux kernel can use 4 GB and a 32-bit PAE-enabled Linux kernel can use 16 GB.
I don't know of anything in Linux that limits memory to 2 GB. Though there might be something in older versions.
I had something of this sort when upgrading an AIX server to latest TL (as it was then)
AIX is very good at keeping real memory full, so there's not much to see there. Paging space was not very full, but the server was only just grinding along.
New functionality was automatically included and the deamons used up the memory. We tracked them down with:-
ps -el|sort -bn +9
..... and then could deal with them. There was a change for them to use pinned memory, but for us, we just turned them off as they were unnecessary services.
Robin