mkinitrd: initrd got 2GB of my 4GB RAM (slackware 14.0)
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
mkinitrd: initrd got 2GB of my 4GB RAM (slackware 14.0)
Hi: by advice of volkerdi (CHANGES_AND_HINTS.TXT) I change the huge kernel used to install to the generic one, and as a result I had to make an initrd, where I followed the instructions in /boot/README.initrd. I've just made a df, and see that the RAM disk takes 1.9G. But I was happy because my machine has 4GB RAM! This is more of a complain than a question, for the question would be how to make it smaller, but if it is too complicated then I'll switch back to the huge.
and thought tmpfs is the RAM disk. But if tmpfs is on the hard disk, then I am wrong, am I?
The tmpfs which is mounted on /dev/shm takes up exactly 50% of your available physical RAM - that is 1.9 GB in your case. However, that 1.9 GB is not actually used until some program starts writing files into the tmpfs filesystem.
See "man mount":
Code:
Mount options for tmpfs
size=nbytes
Override default maximum size of the filesystem. The size is
given in bytes, and rounded up to entire pages. The default is
half of the memory. The size parameter also accepts a suffix %
to limit this tmpfs instance to that percentage of your physical
RAM: the default, when neither size nor nr_blocks is specified,
is size=50%
For Slackware 14.0, the generic kernel is about 3 MB in size. On my system, the initrd is about 4.4 MB. I use the following command to create the initrd:
With that said, your reference to df and "RAM disk" implies that perhaps you are referring to tmpfs. If you are using shared RAM for your video, then the amount of RAM available to the system is a tad less then 4 GB. For example, alloting 256 MB of RAM to the on-board video leaves about 3.75 GB.
By default, the amount of RAM allocated to tmpfs is 1/2 the available RAM in the system. In that case, the 1.9 GB amount you report sounds reasonable. The amount allocated to tmpfs can be controlled by using parameters in fstab.
The amount of RAM allocated to tmpfs does not mean the RAM is not usable or that the amount is "set aside." The amount allocated only means how much tmpfs could use. For example, after your computer has been powered on for many hours, you might notice with the free command the system is using all 4 GB of RAM. Most often that usage is from disk caching. The Linux kernel routinely releases memory used by the caching process whenever needed by apps and other processes.
Edit: Looks like others already posted a similar response. Never check another web page while editing a response.
I see. Now, initrd is a RAM disk not anymore used after finishing booting, am I right? Only curious. MOre interesting to me is, how do I know if the video card has its own RAM on the chip or it is sharing it with the system? The motherboard manual does not say.
Yes, the initrd is just a small RAM disk image that is used by the kernel to access the harddrive and to continue booting process from there. Just a temporary place to keep the drivers.
About video card RAM. If you are using onboard video card then 95% probability, you have a shared VRAM using system memory. That is not a problem however because first you have plenty of RAM to give a little for the video vcard and second, your video card is slow enough that the slow system RAM does not make a difference. Thats why low-end video cards use system memory in a first place. Putting on dedicated memory would only increase the price without a single bit of performance benefit. You are not going to run demanding graphics programs on it anyway like gaming or such like.
For video performance you want to have separate dedicated video card preferrably from NVidia as their linux drivers are simply better. As Linux graphics is all about OpenGL and I've been dealing about 5 years with X-Plane - the most complicated and demanding OpenGL program out there, the best OpenGL performance is delivered by NVidia.
Only a youtube concert once in a while (more than once, to be honest). In fact my video card is onboard, part of it in the PCH (my machine has one) and part in some other chip I think. The chipset is H61M-S1.
EDIT: The motherboard manual says: Onboard graphics: integrated graphics processor - 1 x D-sub port. I has to be within the H61.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.