Author Topic: Begin with Memory Management.  (Read 2940 times)

Mol_Bolom

  • Member
  • *
  • Posts: 25
Begin with Memory Management.
« on: September 13, 2008, 08:58:47 pm »
After doing some test runs with this computer I guessed I should probably learn how to manage the memory on it first...I have plans to get a better computer soon, which by the way if anyone has any words of wisdom about which computer does best at less than 200, let me know...But I might as well learn about doing that anyway...I've always put it off...

I really have no idea where to start, so if anyone can guide me to sites that explain it in fairly good detail, please do...

Here's some curious problems I have been seeing on this computer...
When playing music while doing other things, the music stops.  While listening to candidates speeches, about every minute they will fast forward a bit.  While playing PPracer, the first game is fine, any more the computer slows down to a crawl...

I guess these problems could be a good place to start, too...Learn how to fix them...I really don't know where to start...

Anyway, thanks for anyones help...

Tla eli yigoliga nigada dejigoliyesgoi, vsehnv ganehldi...

hata_ph

  • Packager
  • Vectorian
  • ****
  • Posts: 3286
  • -- Just being myself --
Re: Begin with Memory Management.
« Reply #1 on: September 14, 2008, 07:27:06 am »
it would be helpful to provide your current hardware spec....

Mol_Bolom

  • Member
  • *
  • Posts: 25
Re: Begin with Memory Management.
« Reply #2 on: September 14, 2008, 08:56:50 am »
Ok...


Celeron 1.2 mhz CPU
256 Ram

i810 chip set containing:
Intel FW81801AA sound chip.
Intel 82810E Video chip

Perhaps I should have wrote this all down before, but I was hoping that maybe there was some way to see what the computer is saying I have for memory (video memory, etc.  I know how to find the RAM)...I have always shied away from getting into the hard core programming and maintenance of computers, and well, now I'd like to understand how memory is stored, how is it read by the OS, how is it used by the OS, what does the OS do with it, etc, etc, etc...

While running a game last night I noticed that the game didn't appear on screan.  When I ran gKrellm, the CPU was running at 99%...And since virtual stereo's run at about 70 to 80% of CPU, why?  I'm curious to understand why Windows would allow for multitasking than VL...What's the difference? 

 :-\...Eh, I don't like how I explained that...But hopefully it made sense...I have only an idea of what I'm talking about, not the vocabulary to explain it...

  Anyway...
Thanks...



Tla eli yigoliga nigada dejigoliyesgoi, vsehnv ganehldi...

hata_ph

  • Packager
  • Vectorian
  • ****
  • Posts: 3286
  • -- Just being myself --
Re: Begin with Memory Management.
« Reply #3 on: September 14, 2008, 10:28:04 am »
what version of VL you are using?

Quote
While running a game last night I noticed that the game didn't appear on screan.  When I ran gKrellm, the CPU was running at 99%...And since virtual stereo's run at about 70 to 80% of CPU, why?
maybe you can show us the result of ps -au or open htop to check what program is taking all the resources...

Quote
I'm curious to understand why Windows would allow for multitasking than VL...What's the difference? 
Some time we cannot compare linux with windows as windows have all the support from hardware manufacturer while linux don't....from my experience some hardware can perform way more better in windows compare to linux...

 
Quote
Celeron 1.2 mhz CPU
256 Ram

i810 chip set containing:
Intel FW81801AA sound chip.
Intel 82810E Video chip
You may need more RAM or maybe the video chipset run poor on linux

caitlyn

  • Packager
  • Vectorian
  • ****
  • Posts: 2921
    • The Linux Works
Re: Begin with Memory Management.
« Reply #4 on: September 14, 2008, 11:12:58 am »
Celeron 1.2 mhz CPU
256 Ram

i810 chip set containing:
Intel FW81801AA sound chip.
Intel 82810E Video chip

While running a game last night I noticed that the game didn't appear on screan.  When I ran gKrellm, the CPU was running at 99%...And since virtual stereo's run at about 70 to 80% of CPU, why?  I'm curious to understand why Windows would allow for multitasking than VL...What's the difference? 

I think you are probably comparing apples to oranges, or more likely apples to bricks.  The current version of Windows, which is Vista, won't even run on your hardware.  How can you claim Windows will allow for more multitasking when it won;t even run.  The version of VL you are using was undoubtedly released in 2007 or 2008.  (Which one is it, anyway?)  To compare Windows to Linux you need to compare builds from the same time period, and that means Vista.

From your description you are maxing out your CPU rather than your memory much of the time.  Those are two different things.  Yes, you can make some choices to reduce CPU cycles as well as memory usage.  I should also point out that the Intel chipset you have has been known to have issues with Linux -- issues that are fixable, but issues nonetheless.  Search the forum and you should find some suggestions on how to improve performance with the video chipset you have.  My systems don't have Intel video so I don't know the answers there without searching myself.

Some things you can do to reduce CPU usage:

1.  Disable unnecessary services.  Each Linux distribution starts some things by default at boot.  It is always a good idea to go through the list and disable ones you don't need or use.  That saves both CPU cycles and memory.  Go into vasmCC (a/k/a Control Center) and you'll see an icon labeled Service in the left-hand pane.  Click on that and you'll get a window with more icons.  If you click on hardware you'll see the support services for various devices.  If, for example, wireless is checked and you don't have wireless you can uncheck it.  acpi is for laptops.  If you have a desktop system you can uncheck that too.

There is another icon called services.  If you click on that you will be presented with a list of runlevels.  If you configured your system as a workstation and to boot directly to a GUI you want runlevel 4.  If something you don't need or use is checked you can uncheck it.

2.  Run VL-Hot instead of HAL.  HAL (Hardware Abstraction Layer) runs a daemon in the background that continually polls your hardware to see if something has changed.  If you insert a USB stick or a CD-ROM it's what pops up the new icon on your desktop.  VL-Hot is a lightweight alternative to HAL that works with udev triggers and it doesn't poll all the time so it saves CPU cycles.  It can popup icons on your desktop for removable devices (USB sticks, memory cards, PCMCIA cards, etc..) but uses a second icon to unmount those devices before removal.  In addition it doesn't detect things like a CD-ROM or DVD being inserted.  You'll have to mount those manually.  If you are running VL Standard you can use the mount applet on the Xfce panel to do that.  If you are running VL Light you already have a desktop icon for that purpose since Light uses VL-Hot by default.

3.  Don't use KDE for your desktop.  It keeps daemons running in the background all the time.  Other desktop environments don't.  Yes, KDE has more features and bells and whistles than any other DE.  You pay for them in performance.

Things you can do to reduce memory consumption:

1.  Close windows/applications you aren't using.  This seems like a no-brainer but some people are in the habit of just leaving a gazillion things open.

2.  Use a lightweight window manager instead of a full featured desktop environment.  KDE consumes more memory than GNOME, GNOME consumers more than Xfce, Xfce consumer more than LXDE, and LXDE consumer more than a simple window manager like JWM.  Less memory generally does mean fewer features but you may find that a lightweight environment has everything you need.  It depends on your personal tastes. Fewer resources consumed by the desktop means more resources left for applications.

In the end, though, you are running a pretty minimal system, particularly in terms of memory.  If you can upgrade to 512MB inexpensively I'd definitely do it.

HTH,
Cait
eMachines EL-1300G desktop, 1.6GHz AMD Athlon 2650e CPU, 4GB RAM, nVidia GeForce 6150 SE video
VL64 7.1

Toshiba Satellite A135-S4727,  Intel Pentium T2080 / 1.73 GHz, 2GB RAM, Intel GMA 950

HP Mini 110 netbook, 1.6GHz Intel Atom CPU, 2GB RAM, Intel 950 video, VL 7.1

Mol_Bolom

  • Member
  • *
  • Posts: 25
Re: Begin with Memory Management.
« Reply #5 on: September 14, 2008, 11:31:33 am »
Quote

I think you are probably comparing apples to oranges, or more likely apples to bricks.  The current version of Windows, which is Vista, won't even run on your hardware.  How can you claim Windows will allow for more multitasking when it won;t even run.  The version of VL you are using was undoubtedly released in 2007 or 2008.  (Which one is it, anyway?)  To compare Windows to Linux you need to compare builds from the same time period, and that means Vista.

Yikes...Well, this is what I get for having extremely bad problems with making sense lately...LOL...I don't know why, but I haven't been able to speak very clearly or coherently most of the time...Though, much of the reason is because I just don't know the correct vocabulary to use, having never learned that vocabulary before...

Quote
Don't use KDE for your desktop.  It keeps daemons running in the background all the time.  Other desktop environments don't.  Yes, KDE has more features and bells and whistles than any other DE.  You pay for them in performance.
I don't like bells and whistles... ;)...Which is why I'm using linux in the first place...I use only xfce and fluxbox...If it wasn't for my need of the fonts that the gui's have, I would still be using DOS 5, to be honest...I prefer the DosNavigator over any gui 1000%... ;D

Anyway...I do know the differences, I do understand the why...Let me try to express what I'm wanting to know in a different way...

I'm wanting to know how...Not why, how does a device driver, program, etc, use memory...I've never programmed or even bothered with learning about memory...I've always shied away from it...I'm just wanting to learn 'how' to read memory, 'how' to understand memory, and 'how' to adjust memory if at all possible...

Perhaps that's a little bit better... ;D...

Sorry for not speaking where it could be understood...Unfortunately, I've been having these problems for the past two years and it seems like it's getting worse...LOL...

But thanks...

hata_PH:

I ran htop and looked over a few things while running gmplayer and xine, it's mostly a problem with xine...gmplayer doesn't use even half the amount of memory that xine uses...gmplayer 4% maybe more, xine 22% and more...So I think the major problem might be more of a programming issue...Most of these programs are built for faster computers, so my slow comp just wont run them, or they wont run with both sound and video running at the same time...Like I said, it's not a problem, everything else runs just fine...

Yet I'd like to learn about memory...Maybe I'm just asking in the wrong place...I probably should ask these kinds of questions in programming forums...

Anyway, thanks Hata...I had always overlooked htop, but now I know how to read it...
« Last Edit: September 14, 2008, 11:35:50 am by Mol_Bolom »
Tla eli yigoliga nigada dejigoliyesgoi, vsehnv ganehldi...

bigpaws

  • Administrator
  • Vectorian
  • *****
  • Posts: 1897

Mol_Bolom

  • Member
  • *
  • Posts: 25
Re: Begin with Memory Management.
« Reply #7 on: September 14, 2008, 01:20:33 pm »
Thanks...
Tla eli yigoliga nigada dejigoliyesgoi, vsehnv ganehldi...

hata_ph

  • Packager
  • Vectorian
  • ****
  • Posts: 3286
  • -- Just being myself --
Re: Begin with Memory Management.
« Reply #8 on: September 14, 2008, 06:22:04 pm »
Quote
I'm wanting to know how...Not why, how does a device driver, program, etc, use memory...I've never programmed or even bothered with learning about memory...I've always shied away from it...I'm just wanting to learn 'how' to read memory, 'how' to understand memory, and 'how' to adjust memory if at all possible...

This is way out of my league then.....wish you all the best...

Mol_Bolom

  • Member
  • *
  • Posts: 25
Re: Begin with Memory Management.
« Reply #9 on: September 15, 2008, 02:34:16 pm »
Well, thanks anyway hata...You did help me learn about Htop...

Caitlyn, well, it looks like my VasmCC is not the correct version...Might have accidently overwritten the file when I downloaded a program, or something...I don't know...

Anyway, I found some help in this area on another forum, so I was wondering if anyone knew of a program that comes with VL5.9 that would allow me to view assembler code of programs, etc?

Thanks again...
Tla eli yigoliga nigada dejigoliyesgoi, vsehnv ganehldi...