skibler wrote: 
> Since installing LMS in newer distro's is becoming more of a pain, I
> have created a simple CentOS VM to host LMS 7.7. Without much thought I
> gave it 768MB ram and a single core of an Intel Q6600 and it runs great.
> The swap partition in the guest is 1.5GB, and I imagine I could probably
> shrink that? The smaller the VM image, the better. It is on an SSD,
> which can't hurt.
> 
> How low can I drop the ram before it will really affect the performance?
> My library.db is 44MB, my persist.db is 158MB, and the artwork.db is
> 520MB, if those matter.
You might try running this script in your VM and see what sort of
results you get.

memwatch:

Code:
--------------------
    
  #!/bin/bash
  
  # Regular expression process search string, e.g. 'perl.*squeeze'
  PROCRE="$1"
  
  if [ -z "$PROCRE" ]; then
        echo "sudo $(basename $0) 'pgrep_regex' [--pmap '2nd_regex']"
        exit 1
  fi
  
  MemDesc=('All memory the process uses, including all memory this process 
shares with other processes' \
  "Memory that this process shares with other processes" \
  "Private memory used by this process" \
  "Swap memory used by the process" \
  "Proportional Set Size, a good overall memory indicator" \
  "Virtual size, almost meaningless" \
  "Memory currently marked as referenced or accessed")
  
  # Find the processes, excluding this bash instance..
  PIDS=$(pgrep -f "$PROCRE" | egrep -v "$$")
  
  # Count of the processes we find..
  PCOUNT=0
  
  for PID in $PIDS
  do
  
        if [ -e "/proc/${PID}/smaps" ]; then
                let PCOUNT++
  
                PROC=$(pgrep -fl "$PROCRE" | egrep "^$PID")
  
                echo ' '
                echo "Memory usage for ${PROC}"
                echo 
"======================================================================================================================"
  
  
                # Alternate way, watching must SQLite.so:
                if [ "$2" = '--pmap' ]; then
                        if [ -z "$3" ]; then
                                pmap -x $PID
                        else
                                pmap -x $PID | egrep -i "^Address|${3}"
                        fi
                        exit 0
                fi
  
                COUNT=0
                for MEMTYPE in Rss Shared Private Swap Pss Size Referenced
                do
                        USAGE=`echo 0 $(cat "/proc/${PID}/smaps" | grep 
${MEMTYPE} | awk '{print $2}' | sed 's#^#+#') | bc`
                        printf "%10s usage: %'8d" $MEMTYPE $USAGE
                        echo "  ${MemDesc[$COUNT]}"
                        #COUNT=${COUNT}+1
                        #COUNT=$((${COUNT}+1))
                        let COUNT++
                done
                echo ' '
  
        fi      
  done
  
  if [ ${PCOUNT} -eq 0 ]; then
  echo "Error: can't find a running process that matches '${PROCRE}'"
  exit 1
  fi
  
  exit 0
  
--------------------

Try: 

# memwatch 'perl.*squeeze'

..and see what it has to say.  On my ubuntu 12.04 box with 8gb RAM (and
running UEML 10.01 from the git code), 

# memwatch 'perl.*slimserver.pl'

Code:
--------------------
    
  Memory usage for 32456 /usr/bin/perl /usr/share/lms/server/slimserver.pl 
--prefsdir /var/lib/lms/prefs --logdir /var/log/lms/ --cachedir 
/var/lib/lms/cache --charset=utf8 --norestart
  
======================================================================================================================
  Rss usage:  156,472  All memory the process uses, including all memory this 
process shares with other processes
  Shared usage:    1,572  Memory that this process shares with other processes
  Private usage:  154,900  Private memory used by this process
  Swap usage:        8  Swap memory used by the process
  Pss usage:  155,156  Proportional Set Size, a good overall memory indicator
  Size usage:  263,480  Virtual size, almost meaningless
  Referenced usage:  146,248  Memory currently marked as referenced or accessed
  
--------------------


------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=96540

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to