Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
memory percentage
Results 1 to 5 of 5

Thread: memory percentage

  1. #1

    memory percentage

    This is the output of ps -A u.

    USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
    oot 5732 0.0 52.0 142600 134196 ? S May14 0:00 /usr/local/WSE/WebsenseEnterprise/openserverd
    root 5735 0.0 52.0 142600 134196 ? S May14 0:00 /usr/local/WSE/WebsenseEnterprise/openserverd
    root 5736 0.0 52.0 142600 134196 ? S May14 0:00 /usr/local/WSE/WebsenseEnterprise/openserverd

    It says that openserverd uses 52.0 ...of memory. I try to figure out what is this 52.0 is?
    52.0 mb (doubtful)
    52.K ?
    52 bites?

  2. #2
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    Re: memory percentage

    52 memory allocation units .....

    One memory allocation units can have different sizes. But majorly, there are only 4K per units. It also depends on the memory allocation size defined by the program but like I said the most majority of program codes call for 4K units.

    You have three processes so it's 3X4X52.

  3. #3

    Re: memory percentage

    Wow, don't they have some -h switch for human format? :-)
    And I guess top has it displayed in allocations units either under %MEM...

    When program request 1 allocation unit it doesn't actually need all 4K, it may need only 2K but it will request 4K anyway cause this is the size of memory allocation unit, right?
    In this case we van deal with a lot of 'fragmented' memory blocks. On Novell servers there is a porcess 'Garbage Collection' that runs once in a while and collects fragmented memory and rearrages it into contigious memory space, so other processes can use this freed memory.
    Is there any something like that on Linux? Otherwise the program can request 52 allocation units but in fact it will use only half of memory requested, right?
    Correct me if I'm wrong here....
    thx


  4. #4
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    Re: memory percentage


    Wow, don't they have some -h switch for human format? :-)
    No. Because memory is a dynamic units so it's very hard to do it in human readable formats. Unlike hard disk sizes ( which depends on only the file system ), memory allocation can be different from process to process and OS to OS.

    When program request 1 allocation unit it doesn't actually need all 4K, it may need only 2K but it will request 4K anyway cause this is the size of memory allocation unit, right?
    Correct. It is the base unit. There is no way to change it. It's also true for storage units such as files in your HDD. One file may need only 22K but your OS will reserve HDD units of 6 times with 4K space so it actually takes up 24K space to store 22K file.

    On Novell servers there is a porcess 'Garbage Collection' that runs once in a while and collects fragmented memory and rearrages it into contigious memory space, so other processes can use this freed memory.
    Is there any something like that on Linux?
    No need. Linux ( and most Unix OSes ) will do dynamic allocation of memories and update pointers only. The physical occupant of memory is not important to the OS. And also, since they are based on C code, C have some function calls that free up memory after not being used ( such as Calloc functions )...

    Otherwise the program can request 52 allocation units but in fact it will use only half of memory requested, right?
    Yes but it is still owned by the program process and OS have no way of taking it back unless your program give it up to the control of the OS. It all depends on how your program is designed. And that's what makes some programs superior than the others. It's all depends on the programmers behind the program and that's why open source programs are far more better in handling of your system resources than closed source ones since many programmers will combine thier ideas and select the best instead of a few programmers in commercial companies.

  5. #5

    Re: memory percentage

    Great , thanks.

Similar Threads

  1. USB memory
    By adison in forum Linux Distros
    Replies: 4
    Last Post: 08-31-2007, 03:09 AM
  2. How to fix my memory
    By in forum General Chat
    Replies: 12
    Last Post: 01-13-2005, 03:33 AM
  3. How can i tell what memory i have??
    By in forum General Chat
    Replies: 2
    Last Post: 04-20-2004, 12:31 AM
  4. Bad Memory
    By GhostDawg in forum Linux - General Topics
    Replies: 3
    Last Post: 05-20-2002, 07:16 PM
  5. More Memory
    By gmoreno in forum Linux - Hardware, Networking & Security
    Replies: 4
    Last Post: 02-22-2002, 09:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •