Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
where are you looking to find this statistic? remember that Linux uses caching memory, so your RAM WILL fill up of its own accord. this is a good thing. search google for Linux Memory Management
First question:
- Just used top. I use it as a workstation at work. It has 256 MB of ram plus 512 MB swap.... when I'm working I fill up the physical ram and take about 250 mb swap.... that makes my system rather slow in general..... but if I can make X use less ram I guess my system would move a little faster. That's why I want to know how tell it how much ram to take.
Second:
How is the nice value gonna change the amount of memory the process is taking? If I'm not wrong, it will only change the priority of execution of the given task..... and giving it a nice of 0 would make it real-time..... I have better things to do with the CPU machine cycles.
you can't say "use less ram" that's daft. you still haven't said what's making you think is using it.... the top contents is presumably using the cahced data too. try running "free" and see what it says there about how much of the "in use" memory is actually down to cache.
3. The difference among VIRT, RES, and SHR in top output
VIRT stands for the virtual size of a process, which is the sum of memory it is actually using, memory it has mapped into itself (for instance the video card's RAM for the X server), files on disk that have been mapped into it (most notably shared libraries), and memory shared with other processes. VIRT represents how much memory the program is able to access at the present moment.
RES stands for the resident size, which is an accurate representation of how much actual physical memory a process is consuming. (This also corresponds directly to the %MEM column.) This will virtually always be less than the VIRT size, since most programs depend on the C library.
SHR indicates how much of the VIRT size is actually sharable (memory or libraries). In the case of libraries, it does not necessarily mean that the entire library is resident. For example, if a program only uses a few functions in a library, the whole library is mapped and will be counted in VIRT and SHR, but only the parts of the library file containing the functions being used will actually be loaded in and be counted under RES.
I guess from your reply that X is accounting the Video Card's memory in the virt memory.
But that's kind of confusing for me right now. I've spent the morning working just like I normally do. I configured X to use the vesa driver... I have no hardware acceleration, but that's ok.... don't need it to work (just to impress my coworkers with rss screensavers ).... as I was saying.... I've spent the morning normally. This is top output right now:
Code:
top - 11:38:24 up 1:37, 0 users, load average: 0.16, 0.15, 0.15
Tasks: 85 total, 1 running, 83 sleeping, 0 stopped, 1 zombie
Cpu(s): 10.7% us, 1.0% sy, 0.0% ni, 83.3% id, 4.8% wa, 0.1% hi, 0.0% si
Mem: 247976k total, 245788k used, 2188k free, 2552k buffers
Swap: 538136k total, 182404k used, 355732k free, 83304k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2935 antoranz 15 0 14380 10m 7252 S 2.0 4.2 0:35.28 wish
1440 xfs 16 0 6244 2772 2512 S 0.0 1.1 0:00.21 xfs
1505 daemon 16 0 1616 392 1456 S 0.0 0.2 0:00.00 atd
1513 root 16 0 2684 416 2504 S 0.0 0.2 0:00.00 mdkkdm
1542 root 15 0 33604 12m 14m S 0.0 5.3 2:52.87 X
right now It's using 33 mb in virt, right? that would mean that the extra memory it was taking was from the video card memory. That makes sense... but I have noticed that my swap is about 100 MB or so lower than it was using the i810 driver.That makes me think the X server is using memory (not video memory) when It uses i810 driver.
I think that was taken before I started using the vesa driver.... and before I started working in my computer... I mean I didn't have any of my applications working.... just the graphical "login prompt." This is now:
anyway.... I think it's getting a little messy. So why don't we start all over again, ok? I'll refrase the problem to see if we can make it clearer:
Until Yesterday I was using the i810 driver for my video card. When My system was working it was using too much memory. I noticed that X was taking too much memory. So I decided to change the video driver and use vesa instead. Since then my system is using 100 mb or so less memory. That makes me think the module is somehow related to the amount of memory my system is using.
So far so good...... now something else:
I want to use the i810 driver... but I don't want the X server to grab those 100 or so mb it was using (in excess???).
The i810 is one of those "integrated" graphics chips. So it has to use the system memory - It doesn't have any dedicated. If you'd like to configure how much memory the driver uses I believe you can set it with VideoRam option in your X config file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.