# laptop w/1gb ram and shared vram-how much to assign [SOLVED]

## downer

Hi,

I am fiddeling with the BIOS settings on my laptop (HP dv6500). It has 1gb RAM which it shares with the nvidia integrated graphics. What would be recommended setting for ammount of vram to assign? 

The options are 32, 64, 128 and 256mb. When I first got it I set it up to maximum, but then "free -m" showed that all my ram was in use and it had started using swap also, now I run it on 32 and see no real difference in performance, tho I still have free ram and no used swap. Basically the only thing that puts strain on the GPU is Compiz-Fusion, especially the flame effects lags a bit (disregarding of mem setting) if a full screen app gets flamed. (Yes I use random effects  :Wink: )

What I guess I am after is if there is any recomendation on which setting to use, or if it is a trial and error thing..?

Will I even notice if a few 100 mb's gets swapped out performance vice?

TIA 

//D

----------

## Keruskerfuerst

I would assign 128MB RAM to the graphics card.

```
top 
```

 shows the ammount of RAM really used by the programs.

----------

## downer

 *Quote:*   

> I would assign 128MB RAM to the graphics card.

 

Yeah, I think that was the default so it is probably a good idea.

 *Quote:*   

> 
> 
> ```
> top
> ```
> ...

 

Nothing seems to use more than 0.5% mem or so, so I guess its OK;

```

top - 14:48:58 up  6:55,  2 users,  load average: 0.00, 0.00, 0.00

Tasks:  77 total,   1 running,  76 sleeping,   0 stopped,   0 zombie

Cpu(s):  0.2%us,  0.0%sy,  0.0%ni, 99.8%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st

Mem:    963120k total,   877776k used,    85344k free,   247352k buffers

Swap:  1004052k total,    20048k used,   984004k free,   172844k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  SWAP COMMAND

 5927 gdm       16   0  115m 4572 3508 S    0  0.5   0:01.22 110m gdmgreeter

19604 root      18   0  5288 2064  336 S    0  0.2   0:00.00 3224 hddtemp

 4385 haldaemo  16   0 22408 1752 1136 S    0  0.2   0:00.47  20m hald

 5556 root      15   0 51440 1696 1488 S    0  0.2   0:02.69  48m Xorg

10330 downer    15   0 16692 1668 1348 S    0  0.2   0:00.26  14m bash

19799 downer    15   0 16768 1284  960 R    0  0.1   0:00.41  15m top

.

.

.

```

Thanks for the input!  :Smile: 

//D

----------

## Keruskerfuerst

Please post

```
emerge --info
```

and 

/etc/portage/package.use, too.

----------

## downer

 *Quote:*   

> Please post 
> 
> ```
> emerge --info 
> ```
> ...

 

```
sudo emerge --info

Portage 2.1.3.9 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.22-gentoo-r5 x86_64)

=================================================================

System uname: 2.6.22-gentoo-r5 x86_64 AMD Athlon(tm) 64 X2 Dual-Core Processor TK-53

Timestamp of tree: Wed, 24 Oct 2007 05:20:01 +0000

app-shells/bash:     3.2_p17

dev-java/java-config: 1.3.7, 2.0.33-r1

dev-lang/python:     2.4.4-r5

dev-python/pycrypto: 2.0.1-r6

sys-apps/baselayout: 1.12.9-r2

sys-apps/sandbox:    1.2.17

sys-devel/autoconf:  2.13, 2.61-r1

sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10

sys-devel/binutils:  2.18-r1

sys-devel/gcc-config: 1.3.16

sys-devel/libtool:   1.5.24

virtual/os-headers:  2.6.22-r2

ACCEPT_KEYWORDS="amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=k8 -msse3 -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb 

/usr/share/config"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-march=k8 -msse3 -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ ftp://trumpetti.atm.tut.fi/gentoo/ ftp://ftp.du.se/pub/os/gentoo http://ftp.du.se/pub/os/gentoo http://ds.thn.htu.se/linux/gentoo "

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/portage/local/layman/xeffects"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="X aac acl acpi alsa amd64 berkdb bitmap-fonts cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox flac fortran gdbm gif glitz gnome gpm gstreamer gtk hal iconv ipv6 isdnlog java jpeg kerberos ldap logrotate mad midi mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre pdf perl png pppd python qt3support quicktime readline reflection sdl session sound spell spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode vorbis wma xml xorg xv zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa"

Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
```

 *Quote:*   

> and 
> 
> /etc/portage/package.use, too.

 

```

cat /etc/portage/package.use

sys-power/cpufreqd lm_sensors nvidia

gnome-extra/sensors-applet nvidia lm_sensors hddtemp libnotify

media-video/vlc dvd ffmpeg mpeg mad wxwindows aac dts a52 ogg flac theora oggvorbis matroska freetype bidi xv svga gnutls stream vlm httpd cdda vcd cdio live

x11-libs/libX11 xcb

```

What are you looking for?

//D

----------

## Keruskerfuerst

```
CFLAGS="-march=k8 -msse3 -O2 -pipe" 
```

should be replaced with

```
CFLAGS="-mtune=k8 -march=k8 -msse3 -O2 -pipe" 
```

and

you  should add to /etc/portage/package.use the following lines:

```
sys-devel/gcc d mudflap objc objc++ objc-gc: compiles GCC correctly

sys-libs/glibc userlocales
```

----------

## RaceTM

 *Keruskerfuerst wrote:*   

> 
> 
> ```
> CFLAGS="-march=k8 -msse3 -O2 -pipe" 
> ```
> ...

 

could you explain what those use flags do?

----------

## Keruskerfuerst

http://www.gentoo.org/dyn/use-index.xml

----------

## Monkeh

 *Keruskerfuerst wrote:*   

> 
> 
> ```
> CFLAGS="-march=k8 -msse3 -O2 -pipe" 
> ```
> ...

 

For what reason?

----------

## RaceTM

 *Keruskerfuerst wrote:*   

> http://www.gentoo.org/dyn/use-index.xml

 

erm thanks,

I was thinking more along the lines that if you feel the need to ask someone to change their use flags for certain packages, perhaps you could explain your reasoning and why you made the suggestion so the thread started and anyone else who stumbles across this thread would understand  :Smile: 

----------

## Keruskerfuerst

-mtune enables ABI and scheduling for a specific processor.

----------

## Monkeh

 *Keruskerfuerst wrote:*   

> -mtune enables ABI and scheduling for a specific processor.

 

-march implies -mtune..

----------

## Keruskerfuerst

 *Quote:*   

> -march implies -mtune..

 

No. 

GCC documentation is not correct in this case.

d: enables support for the D language

mudflap: enables support for pointer checking library. (garbage collector).

objc objc++ objc-gc: enables support for Object c, c++ und gc.

You can check this out by using 

```
quse -D <flag>
```

.

----------

## Monkeh

 *Keruskerfuerst wrote:*   

>  *Quote:*   -march implies -mtune.. 
> 
> No. 
> 
> GCC documentation is not correct in this case.

 

Your source please?

 *Quote:*   

> d: enables support for the D language
> 
> mudflap: enables support for pointer checking library. (garbage collector).
> 
> objc objc++ objc-gc: enables support for Object c, c++ und gc.

 

mudflap is default. I doubt most people will need d, objc, objc++, or objc-gc.

----------

## Keruskerfuerst

 *Quote:*   

> No.
> 
> GCC documentation is not correct in this case.
> 
> 

 

 *Quote:*   

> Your source please? 

 

Sourcecode of GCC.

----------

## jexxie

You don't need to have so much vram, if you're just using a normal resolution.

If you're using a 1280x800 pixel display at 32bit color (like you probably are), you need:

1280*800*32 = 32768000 bytes, or 31.25MB of vram.  If you want a doublebuffer, it would be double that number -- 64MB is the most you could need.

----------

## downer

 *jexxie wrote:*   

> You don't need to have so much vram, if you're just using a normal resolution.
> 
> If you're using a 1280x800 pixel display at 32bit color (like you probably are), you need:
> 
> 1280*800*32 = 32768000 bytes, or 31.25MB of vram.  If you want a doublebuffer, it would be double that number -- 64MB is the most you could need.

 

Yeah, I'm running 1280x800 on it, so I guess that is why I never saw any performance improvement when going up to 256 or decrease when going down to 32mb, right?

Is this also true when running games (if I ever decide to run anything other than e-uae  :Wink: )? 

Thanks,

//D

----------

## Keruskerfuerst

I have forgotten:

some good LDFLAGS are missing:

LDFLAGS="-Wl,-O4"

LDFLAGS="${LDFLAGS} -Wl,--as-needed"

LDFLAGS="${LDFLAGS} -Wl,--enable-new-dtags"

LDFLAGS="${LDFLAGS} -Wl,--hash-style=both"

LDFLAGS="${LDFLAGS} -Wl,--sort-common"

LDFLAGS="${LDFLAGS} -Wl,-z,now"

----------

## Monkeh

 *Keruskerfuerst wrote:*   

> I have forgotten:
> 
> some good LDFLAGS are missing:
> 
> LDFLAGS="-Wl,-O4"
> ...

 

Please don't advise people to do things which will render them unsupported.

----------

## Merlin-TC

 *Keruskerfuerst wrote:*   

>  *Quote:*   -march implies -mtune.. 
> 
> No. 
> 
> GCC documentation is not correct in this case.
> ...

 

So does that mean the gentoo wiki is wrong too?

Up until now I've read everywhere that march implies mtune.

----------

## Keruskerfuerst

Everything you read is completly correct...

----------

## ksp7498

 *jexxie wrote:*   

> You don't need to have so much vram, if you're just using a normal resolution.
> 
> If you're using a 1280x800 pixel display at 32bit color (like you probably are), you need:
> 
> 1280*800*32 = 32768000 bytes, or 31.25MB of vram.  If you want a doublebuffer, it would be double that number -- 64MB is the most you could need.

 

no, the amount of ram required is far less than this.  It is 32768000 bits, not bytes, so it's 1/8 of the space that you quoted.  That would be a 4mb buffer, or 8mb double buffered.

----------

## Monkeh

 *Keruskerfuerst wrote:*   

> Everything you read is completly correct...

 

... So does -march imply -mtune or not?

----------

## jexxie

 *ksp7498 wrote:*   

> no, the amount of ram required is far less than this.  It is 32768000 bits, not bytes, so it's 1/8 of the space that you quoted.  That would be a 4mb buffer, or 8mb double buffered.

 

Thanks for the correction =)

----------

## downer

 *ksp7498 wrote:*   

>  *jexxie wrote:*   You don't need to have so much vram, if you're just using a normal resolution.
> 
> If you're using a 1280x800 pixel display at 32bit color (like you probably are), you need:
> 
> 1280*800*32 = 32768000 bytes, or 31.25MB of vram.  If you want a doublebuffer, it would be double that number -- 64MB is the most you could need. 
> ...

 

So basically anything over 32MB is a waste of RAM unless I use some texture heavy game or something like that?

//D

----------

## jexxie

Exactly right.

----------

## downer

Thanks, [SOLVED] coming up!   :Very Happy: 

//D

----------

