Find the answer to your Linux question:
Results 1 to 4 of 4
Hello everyone, I am working with a gumstix XScale 255 processor. Here are the specs: 400Mhz 64MB RAM 16MB Flash SD Card Slot My Goal: Run Java applications without kernel ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2010
    Posts
    2

    Embedded Linux Virtual Memory Help


    Hello everyone,

    I am working with a gumstix XScale 255 processor. Here are the specs:
    400Mhz
    64MB RAM
    16MB Flash
    SD Card Slot

    My Goal: Run Java applications without kernel crashes
    Currently: Java runs for a few frames of my application, then the kernel crashes due to the inability to read a specific virtual memory address. I have monitored the system resources using the command 'top' in the process and the program reports 200% RAM usage before the kernel dies.

    I know that 64MB is very small for java to run, which is why I put an extra partition on the SD card(which also contains my FS) for swap to add additional virtual memory. I added the support to the kernel and edited fstab to initialize the partition as swap space. It does show up when using the 'free' command but not in the 'top' command. In addition 'free' never reports it being used what-so-ever.

    I guess my question is: Is this even possible to do? or is the amount of RAM on the gumstix just too overcommited?
    If this is possible to get this going, can I force the swap partition to be used? and If so, can I tell Java to specifically use the swap partition as RAM?

    Any direction would be helpful,
    Sproon

  2. #2
    ved
    ved is offline
    Linux User ved's Avatar
    Join Date
    Jan 2008
    Location
    New Delhi
    Posts
    309

    Smile

    As i know you can't force a program to us swap space .But if add some swap space it can be use as ram by system automatically. What's your disk disk space ?
    can you post the output of
    Code:
    free
    here


    read this
    PHP Code:
    http://www.linuxforums.org/forum/newbie/57918-all-new-users-read-first.html 

  3. #3
    Just Joined!
    Join Date
    Sep 2010
    Posts
    2
    The output of free is:
    total used free shared buffers
    Mem: 61788 23160 38628 0 1532
    Swap: 168676 0 168676
    Total: 230464 23160 207304

    before I run the java program. During execution, the free memory drops below 16MB before the kernel crashes.

  4. $spacer_open
    $spacer_close
  5. #4
    ved
    ved is offline
    Linux User ved's Avatar
    Join Date
    Jan 2008
    Location
    New Delhi
    Posts
    309

    Smile

    hi i got some useful for you it may help : you can increase the default value of swap used by system as
    Code:
    Using sysctl to Change Values
    It is also possible to use the virtual /proc filesystem to change how the kernel behaves.
    The value of some files can be changed by redirecting data into it such as echo 1 >
    /proc/sys/net/ipv4/ip_forward to enable IP forwarding. However, these values are not
    persistent after a reboot.
    To modify the values of the virtual files in /proc/sys/, the sysctl command can also be
    used by the root user to modify and test the values. Again, these changes are only used
    until the system is rebooted. To make the values persist between reboots, modify the
    /etc/sysctl.conf file as root. Changes to this file do not take place immediately. Either
    use the sysctl -p command to enable all changes in the file or echo the new values into
    the appropriate /proc file for the changes to take place immediately.
    To retrieve a list of all values that can be modified in this manner, execute the sysctl -a
    command. Notice that the type of value each parameter is set to differs. Be extremely
    careful to set these parameters to proper values and test them before setting them on
    production systems. It is possible to lock up the system or cause severe system perfor-
    mance issues if incorrect values are given to them.
    To map the parameters listed with the sysctl -a command to the virtual file locations,
    replace each dot (.) with a forward slash (/) and pre-pend the results with /proc/sys/.
    For example, the kernel.exec-shield parameter maps to the /proc/sys/kernel/
    exec-shield file.
        TIP
        To list the /proc/sys/ tunables for a specific function such as virtual memory, use
        grep to only show those options and redirect it into a file:
               systctl -a | grep vm > vm-tunables.txt
    To use the sysctl command-line utility to assign values to these kernel parameters, use
    the following syntax as the root user:
    sysctl -w <parameter>=<value>
    Changes can be saved for subsequent reboots by adding them to the /etc/sysctl.conf
    file with the following syntax:<parameter> = <value>
    For example, the following command increases how much the system should use its swap
    space from the default value of 60% to 70%:
    sysctl -w vm.swappiness=70
    This command enables the change immediately. To save the setting so that it is remem-
    bered even if the system is rebooted, add the following line to /etc/sysctl.conf:
    vm.swappiness = 70
    If you add the change to /etc/sysctl.conf without executing the sysctl -w vm.
    swappiness=70 command, the change will not go into effect unless the sysctl
    -p command is also executed as root.

Posting Permissions

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