Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Does amd64 use double the RAM?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
hnaparst
Apprentice
Apprentice


Joined: 27 Jul 2005
Posts: 236
Location: Norrköping, Sweden

PostPosted: Tue Nov 22, 2011 7:49 am    Post subject: Does amd64 use double the RAM? Reply with quote

Does Firefox use twice as much RAM with amd64 than with x86?

There are a few posts on the forums discussing the benefits of amd64 versus x86.
They usually boil down to this: AMD64 can use more than 4GB and the advanced features
of the processor, while the apps under x86 are better.

In my case, I have a Core 2 CPU and 3GB RAM. It doesn't take too much
before Firefox and Chrome start chewing up more than a Gig each and the system
starts swapping.

I wonder if a downgrade to x86 would help alleviate the problem.
_________________
Harold Naparst
Back to top
View user's profile Send private message
bjlockie
Veteran
Veteran


Joined: 18 Oct 2002
Posts: 1182
Location: Canada

PostPosted: Tue Nov 22, 2011 7:57 am    Post subject: Reply with quote

No.

Do you have anything else running besides firefox and chrome?

In firefox, go to edit->preferences->advanced->network and make "Limit cache" to 0.

How many tabs do you have open?
_________________
AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS
Back to top
View user's profile Send private message
hnaparst
Apprentice
Apprentice


Joined: 27 Jul 2005
Posts: 236
Location: Norrköping, Sweden

PostPosted: Tue Nov 22, 2011 8:09 am    Post subject: Reply with quote

Yeah, well I have a lot of tabs open. A typical situation is two firefox windows open,
one with 9 tabs, the other with five. And also a chrome session with five tabs open.
Looking at "top" shows Firefox and Chrome using more than a gig each.

What else is running and using space you ask? Gnome uses a bit. Nautilus is using more than
500 mb.

I am a pretty typical user, surfing the net. No gaming and so on.
So I think it is a relevant question.

The cache in preferences->advanced->network seems to refer to disk space,
not RAM, so I wonder if that would affect things. In any event, it is limited to 1024 MB
and is at the present time using 93 MB. So that isn't a huge problem.
But limiting it to zero..would that mean that every image has to be downloaded every time
a page is loaded?
_________________
Harold Naparst
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2643
Location: Slovenia

PostPosted: Tue Nov 22, 2011 10:57 am    Post subject: Reply with quote

Last time I've seen some measurements, amd64 uses about 25-30% more ram than the same apps running on a 32bit system. That said, your ram usage doesn't look ok. I can't imagine even on a 64bit install that Firefox would be using a gig. I'm on 32bit and top currently shows Firefox using 139MB of resident memory.

Oh, and about that "64bit had address more than 4GB of ram" thing? Well, on a 32bit install, even the 2GB I have are total overkill. So if that's the big advantage of 64bit, I can do without it. Which also saves me from needing certain libraries duplicated. There is one real advantage - x264 encoding is 10-15% faster on 64bit. But even that I can do without. Sorry for the mini-rant.
Back to top
View user's profile Send private message
hnaparst
Apprentice
Apprentice


Joined: 27 Jul 2005
Posts: 236
Location: Norrköping, Sweden

PostPosted: Tue Nov 22, 2011 11:21 am    Post subject: Reply with quote

Well, that's why I'm asking. What do you think could be causing Firefox to use so much memory?
_________________
Harold Naparst
Back to top
View user's profile Send private message
golagoda
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jun 2011
Posts: 105
Location: Australia

PostPosted: Tue Nov 22, 2011 11:59 am    Post subject: Reply with quote

hnaparst wrote:
Well, that's why I'm asking. What do you think could be causing Firefox to use so much memory?

Exactly how much memory are firefox and chrome using? In cases where 6+ tabs are being used chrome actually ends up using more RAM and CPU than firefox due to the sandboxing and having each tab and extension as a new process so high memory usage isn't exactly unheard of, there are a bunch of benchmarks around. Make sure your firefox is up to date also, the developers have put a lot more work into reducing memory usage recently.

If there is actually a problem, it may be a firefox extension producing memory leaks.
Back to top
View user's profile Send private message
hnaparst
Apprentice
Apprentice


Joined: 27 Jul 2005
Posts: 236
Location: Norrköping, Sweden

PostPosted: Tue Nov 22, 2011 12:58 pm    Post subject: Reply with quote

OK, now I can show my ignorance.

With five tabs on Firefox-7.0.1-r1, the Virtual image is 834 meg and the Resident size is 224 Meg.
I thought it was the Virtual image that was relevant.

Here is the output from ps, sorted by memory size in increasing (sorry) order.

root 26598 0.0 0.0 18120 1132 pts/1 R+ 14:08 0:00 ps auxww O k
root 35 0.0 0.0 0 0 ? S 13:48 0:00 [scsi_eh_1]
root 142 0.0 0.0 12916 1228 ? S<s 13:48 0:00 /sbin/udevd --daemon
root 5394 0.0 0.0 20940 2048 pts/1 Ss 13:49 0:00 -bash
root 1381 0.0 0.4 231288 13808 ? S 13:48 0:00 /usr/bin/gdm
102 1397 0.0 0.0 19588 1376 ? Ss 13:48 0:00 /usr/bin/dbus-daemon --system
root 1412 0.0 0.0 51832 2976 ? Ss 13:48 0:00 /usr/sbin/syslog-ng
harold 1510 0.0 0.1 169440 4392 ? Sl 13:48 0:00 /usr/bin/gnome-keyring-daemon --daemonize --login
root 1580 0.0 0.1 145556 4420 ? Sl 13:48 0:00 /usr/libexec/polkitd
harold 1606 0.0 0.0 20284 1424 ? Ss 13:48 0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 8 --session
root 5393 0.0 0.1 52260 4736 ? S 13:49 0:00 /usr/libexec/gconfd-2
harold 1685 0.0 0.9 225660 28096 ? Sl 13:49 0:00 /usr/libexec/polkit-gnome-authentication-agent-1
harold 25396 0.1 1.2 325568 38748 ? S 14:06 0:00 /opt/google/chrome/chrome --type=zygote
harold 1675 0.0 0.9 365200 30104 ? Sl 13:49 0:00 /usr/libexec/notification-area-applet
harold 1612 0.0 0.1 52464 4864 ? S 13:48 0:00 /usr/libexec/gconfd-2
harold 1648 0.0 0.1 76304 4796 ? S 13:49 0:00 /usr/libexec/gvfs-gdu-volume-monitor
harold 1684 0.0 0.9 245012 29852 ? S 13:49 0:00 /usr/libexec/gdu-notification-daemon
harold 25394 0.1 0.4 294916 14328 ? S 14:06 0:00 /opt/google/chrome/chrome --extra-plugin-dir=/usr/lib64/nsbrowser/plugins
harold 1590 0.0 0.9 328928 30576 ? Ssl 13:48 0:00 gnome-session
harold 1673 0.0 1.2 464548 37808 ? Sl 13:49 0:00 /usr/libexec/clock-applet
root 1651 0.0 0.1 123024 3800 ? Sl 13:49 0:00 /usr/libexec/udisks-daemon
harold 10783 0.0 1.1 97012 35908 ? Sl 13:52 0:00 /opt/google/talkplugin/GoogleTalkPlugin
harold 25482 0.3 1.1 939008 34528 ? Sl 14:06 0:00 /opt/google/chrome/chrome --type=renderer --lang=sv --force-fieldtest=ConnCountImpact/conn_count_6/ConnnectBackupJobs/ConnectBackupJobsEnabled/DnsImpact/default_enabled_prefetch/DnsParallelism/parallel_default/GlobalSdch/global_enable_sdch/HttpThrottlingEnabled/Default/IdleSktToImpact/idle_timeout_10/Instant/InstantControl1/Prefetch/ContentPrefetchPrerender1/ProxyConnectionImpact/proxy_connections_32/SpdyImpact/npn_with_spdy/SuggestHostPrefix/Default_Prefix/WarmSocketImpact/warm_socket/ --enable-crash-reporter=267EC1E448BC54271604694E58DD277B,Gentoo Base System release 2.0.3 --enable-print-preview --channel=25388.0x7fac7a652700.847137872
harold 10780 0.0 1.2 306296 37312 ? Sl 13:52 0:00 /usr/lib64/firefox/plugin-container /opt/google/talkplugin/libnpgoogletalk64.so -greomni /usr/lib64/firefox/omni.jar 4407 false plugin
harold 1624 0.0 0.8 373092 27580 ? Ssl 13:48 0:00 /usr/libexec/gnome-settings-daemon
harold 26552 1.9 1.3 340372 42656 ? Sl 14:07 0:00 /opt/google/chrome/chrome --type=plugin --plugin-path=/usr/lib64/nsbrowser/plugins/npwrapper.libflashplayer.so --lang=sv --channel=25388.0x7fac7b5e4000.396528332 --enable-crash-reporter=267EC1E448BC54271604694E58DD277B,Gentoo Base System release 2.0.3
harold 1659 0.0 1.3 490512 40736 ? Sl 13:49 0:00 nautilus
harold 1668 0.0 1.1 393860 35064 ? Sl 13:49 0:00 /usr/libexec/wnck-applet
harold 1657 0.0 1.2 440708 38720 ? Sl 13:49 0:00 gnome-panel
harold 5046 0.0 1.1 390840 34972 ? SLl 13:49 0:01 gksu /usr/bin/gnome-terminal
root 5344 0.0 1.1 392756 36168 pts/0 Sl+ 13:49 0:01 /usr/bin/gnome-terminal
harold 1634 0.1 1.0 304760 32896 ? Sl 13:49 0:01 /usr/bin/metacity
harold 26573 5.8 1.5 98756 46548 ? Sl 14:07 0:01 /usr/lib64/nspluginwrapper/i386/linux/npviewer.bin --plugin //opt/Adobe/flash-player32/plugin/libflashplayer.so --connection /org/wrapper/NSPlugins/libflashplayer.so/26552-2/644997746
harold 10735 0.4 1.2 306228 37676 ? Sl 13:52 0:04 /usr/lib64/firefox/plugin-container /usr/lib64/nsbrowser/plugins/npwrapper.libflashplayer.so -greomni /usr/lib64/firefox/omni.jar 4407 false plugin
harold 25388 3.2 2.8 1216824 87004 ? Sl 14:06 0:02 /opt/google/chrome/chrome --extra-plugin-dir=/usr/lib64/nsbrowser/plugins
harold 26542 5.7 2.0 958260 61680 ? Sl 14:07 0:02 /opt/google/chrome/chrome --type=renderer --lang=sv --force-fieldtest=ConnCountImpact/conn_count_6/ConnnectBackupJobs/ConnectBackupJobsEnabled/DnsImpact/default_enabled_prefetch/DnsParallelism/parallel_default/GlobalSdch/global_enable_sdch/HttpThrottlingEnabled/Default/IdleSktToImpact/idle_timeout_10/Instant/InstantControl1/Prefetch/ContentPrefetchPrerender1/ProxyConnectionImpact/proxy_connections_32/SpdyImpact/npn_with_spdy/SuggestHostPrefix/Default_Prefix/WarmSocketImpact/warm_socket/ --enable-crash-reporter=267EC1E448BC54271604694E58DD277B,Gentoo Base System release 2.0.3 --enable-print-preview --channel=25388.0x7fac7b400a80.484260951
harold 10756 1.0 1.4 95972 44652 ? Sl 13:52 0:09 /usr/lib64/nspluginwrapper/i386/linux/npviewer.bin --plugin //opt/Adobe/flash-player32/plugin/libflashplayer.so --connection /org/wrapper/NSPlugins/libflashplayer.so/10735-2/926780387
root 1385 1.9 3.3 186404 101736 tty7 Ss+ 13:48 0:22 /usr/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
harold 4407 7.4 7.4 856240 227244 ? Sl 13:49 1:23 firefox
^ ^
Virt Resident

So you can see that chrome and firefox are using a lot.
_________________
Harold Naparst
Back to top
View user's profile Send private message
hasufell
Developer
Developer


Joined: 29 Oct 2011
Posts: 247

PostPosted: Tue Nov 22, 2011 2:46 pm    Post subject: Reply with quote

i experience similar stuff. my firefox is eating up to 30% of 4gig ram depending on how many tabs i have open which can be up to 80.

but thats the way firefox works. its very responsive and site-rendering is extremely fast
thats a general behavior of firefox, imo.
Back to top
View user's profile Send private message
hnaparst
Apprentice
Apprentice


Joined: 27 Jul 2005
Posts: 236
Location: Norrköping, Sweden

PostPosted: Tue Nov 22, 2011 2:54 pm    Post subject: Reply with quote

It is even worse with Chrome. Is there a browser that doesn't use up so much RAM?
_________________
Harold Naparst
Back to top
View user's profile Send private message
hasufell
Developer
Developer


Joined: 29 Oct 2011
Posts: 247

PostPosted: Tue Nov 22, 2011 2:56 pm    Post subject: Reply with quote

midori, rekonq, arora or even k-meleon under wine
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2454
Location: Silver City, NM

PostPosted: Tue Nov 22, 2011 10:14 pm    Post subject: Reply with quote

IMO RES is more important than VIRT. link:
Quote:
The difference among VIRT, RES, and SHR in top output

VIRT stands for the virtual size of a process, which is the sum of memory it is actually using, memory it has mapped into itself (for instance the video card's RAM for the X server), files on disk that have been mapped into it (most notably shared libraries), and memory shared with other processes. VIRT represents how much memory the program is able to access at the present moment. RES stands for the resident size, which is an accurate representation of how much actual physical memory a process is consuming. (This also corresponds directly to the %MEM column.) This will virtually always be less than the VIRT size, since most programs depend on the C library.
Back to top
View user's profile Send private message
golagoda
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jun 2011
Posts: 105
Location: Australia

PostPosted: Tue Nov 22, 2011 10:19 pm    Post subject: Reply with quote

hnaparst wrote:
OK, now I can show my ignorance.

With five tabs on Firefox-7.0.1-r1, the Virtual image is 834 meg and the Resident size is 224 Meg.
I thought it was the Virtual image that was relevant.

Here is the output from ps, sorted by memory size in increasing (sorry) order.

root 26598 0.0 0.0 18120 1132 pts/1 R+ 14:08 0:00 ps auxww O k
root 35 0.0 0.0 0 0 ? S 13:48 0:00 [scsi_eh_1]
root 142 0.0 0.0 12916 1228 ? S<s 13:48 0:00 /sbin/udevd --daemon
root 5394 0.0 0.0 20940 2048 pts/1 Ss 13:49 0:00 -bash
root 1381 0.0 0.4 231288 13808 ? S 13:48 0:00 /usr/bin/gdm
102 1397 0.0 0.0 19588 1376 ? Ss 13:48 0:00 /usr/bin/dbus-daemon --system
root 1412 0.0 0.0 51832 2976 ? Ss 13:48 0:00 /usr/sbin/syslog-ng
harold 1510 0.0 0.1 169440 4392 ? Sl 13:48 0:00 /usr/bin/gnome-keyring-daemon --daemonize --login
root 1580 0.0 0.1 145556 4420 ? Sl 13:48 0:00 /usr/libexec/polkitd
harold 1606 0.0 0.0 20284 1424 ? Ss 13:48 0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 8 --session
root 5393 0.0 0.1 52260 4736 ? S 13:49 0:00 /usr/libexec/gconfd-2
harold 1685 0.0 0.9 225660 28096 ? Sl 13:49 0:00 /usr/libexec/polkit-gnome-authentication-agent-1
harold 25396 0.1 1.2 325568 38748 ? S 14:06 0:00 /opt/google/chrome/chrome --type=zygote
harold 1675 0.0 0.9 365200 30104 ? Sl 13:49 0:00 /usr/libexec/notification-area-applet
harold 1612 0.0 0.1 52464 4864 ? S 13:48 0:00 /usr/libexec/gconfd-2
harold 1648 0.0 0.1 76304 4796 ? S 13:49 0:00 /usr/libexec/gvfs-gdu-volume-monitor
harold 1684 0.0 0.9 245012 29852 ? S 13:49 0:00 /usr/libexec/gdu-notification-daemon
harold 25394 0.1 0.4 294916 14328 ? S 14:06 0:00 /opt/google/chrome/chrome --extra-plugin-dir=/usr/lib64/nsbrowser/plugins
harold 1590 0.0 0.9 328928 30576 ? Ssl 13:48 0:00 gnome-session
harold 1673 0.0 1.2 464548 37808 ? Sl 13:49 0:00 /usr/libexec/clock-applet
root 1651 0.0 0.1 123024 3800 ? Sl 13:49 0:00 /usr/libexec/udisks-daemon
harold 10783 0.0 1.1 97012 35908 ? Sl 13:52 0:00 /opt/google/talkplugin/GoogleTalkPlugin
harold 25482 0.3 1.1 939008 34528 ? Sl 14:06 0:00 /opt/google/chrome/chrome --type=renderer --lang=sv --force-fieldtest=ConnCountImpact/conn_count_6/ConnnectBackupJobs/ConnectBackupJobsEnabled/DnsImpact/default_enabled_prefetch/DnsParallelism/parallel_default/GlobalSdch/global_enable_sdch/HttpThrottlingEnabled/Default/IdleSktToImpact/idle_timeout_10/Instant/InstantControl1/Prefetch/ContentPrefetchPrerender1/ProxyConnectionImpact/proxy_connections_32/SpdyImpact/npn_with_spdy/SuggestHostPrefix/Default_Prefix/WarmSocketImpact/warm_socket/ --enable-crash-reporter=267EC1E448BC54271604694E58DD277B,Gentoo Base System release 2.0.3 --enable-print-preview --channel=25388.0x7fac7a652700.847137872
harold 10780 0.0 1.2 306296 37312 ? Sl 13:52 0:00 /usr/lib64/firefox/plugin-container /opt/google/talkplugin/libnpgoogletalk64.so -greomni /usr/lib64/firefox/omni.jar 4407 false plugin
harold 1624 0.0 0.8 373092 27580 ? Ssl 13:48 0:00 /usr/libexec/gnome-settings-daemon
harold 26552 1.9 1.3 340372 42656 ? Sl 14:07 0:00 /opt/google/chrome/chrome --type=plugin --plugin-path=/usr/lib64/nsbrowser/plugins/npwrapper.libflashplayer.so --lang=sv --channel=25388.0x7fac7b5e4000.396528332 --enable-crash-reporter=267EC1E448BC54271604694E58DD277B,Gentoo Base System release 2.0.3
harold 1659 0.0 1.3 490512 40736 ? Sl 13:49 0:00 nautilus
harold 1668 0.0 1.1 393860 35064 ? Sl 13:49 0:00 /usr/libexec/wnck-applet
harold 1657 0.0 1.2 440708 38720 ? Sl 13:49 0:00 gnome-panel
harold 5046 0.0 1.1 390840 34972 ? SLl 13:49 0:01 gksu /usr/bin/gnome-terminal
root 5344 0.0 1.1 392756 36168 pts/0 Sl+ 13:49 0:01 /usr/bin/gnome-terminal
harold 1634 0.1 1.0 304760 32896 ? Sl 13:49 0:01 /usr/bin/metacity
harold 26573 5.8 1.5 98756 46548 ? Sl 14:07 0:01 /usr/lib64/nspluginwrapper/i386/linux/npviewer.bin --plugin //opt/Adobe/flash-player32/plugin/libflashplayer.so --connection /org/wrapper/NSPlugins/libflashplayer.so/26552-2/644997746
harold 10735 0.4 1.2 306228 37676 ? Sl 13:52 0:04 /usr/lib64/firefox/plugin-container /usr/lib64/nsbrowser/plugins/npwrapper.libflashplayer.so -greomni /usr/lib64/firefox/omni.jar 4407 false plugin
harold 25388 3.2 2.8 1216824 87004 ? Sl 14:06 0:02 /opt/google/chrome/chrome --extra-plugin-dir=/usr/lib64/nsbrowser/plugins
harold 26542 5.7 2.0 958260 61680 ? Sl 14:07 0:02 /opt/google/chrome/chrome --type=renderer --lang=sv --force-fieldtest=ConnCountImpact/conn_count_6/ConnnectBackupJobs/ConnectBackupJobsEnabled/DnsImpact/default_enabled_prefetch/DnsParallelism/parallel_default/GlobalSdch/global_enable_sdch/HttpThrottlingEnabled/Default/IdleSktToImpact/idle_timeout_10/Instant/InstantControl1/Prefetch/ContentPrefetchPrerender1/ProxyConnectionImpact/proxy_connections_32/SpdyImpact/npn_with_spdy/SuggestHostPrefix/Default_Prefix/WarmSocketImpact/warm_socket/ --enable-crash-reporter=267EC1E448BC54271604694E58DD277B,Gentoo Base System release 2.0.3 --enable-print-preview --channel=25388.0x7fac7b400a80.484260951
harold 10756 1.0 1.4 95972 44652 ? Sl 13:52 0:09 /usr/lib64/nspluginwrapper/i386/linux/npviewer.bin --plugin //opt/Adobe/flash-player32/plugin/libflashplayer.so --connection /org/wrapper/NSPlugins/libflashplayer.so/10735-2/926780387
root 1385 1.9 3.3 186404 101736 tty7 Ss+ 13:48 0:22 /usr/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
harold 4407 7.4 7.4 856240 227244 ? Sl 13:49 1:23 firefox
^ ^
Virt Resident

So you can see that chrome and firefox are using a lot.

200 megs or so of physical RAM being used by FF is honestly pretty normal if you have a few extensions and a few tabs, I suggest upgrading to FF8 to make sure you've got the latest update since as aforementioned mozilla has been working on reducing memory usage heavily.
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1300
Location: Mississippi USA

PostPosted: Wed Nov 23, 2011 12:21 am    Post subject: Reply with quote

I still have a older x86 rig that I use on occasion. I also have a nice shiny new amd64 bit rig. My old rig has a AMD 2500+ CPU, 2Gbs of ram and runs KDE 4.7.*. My new rig is a AMD Phenom 3.2Ghz X4 CPU with 16Gbs of ram and also runs KDE 4.7.* as well. It's in my sig below too I think. I wouldn't go as far to say double the ram but I have noticed it does use a good bit more on amd64. I read where someone said about 20 to 30% and I wouldn't disagree with that tho it could be a bit more in certain cases. I think mine uses a little more than that is why I say that but it could depend on a lot of variables too.

One thing I have also noticed, things seem to use more memory where there is more available. With me having 16Gbs of ram on the new rig, maybe it just saves a bit more since there is plenty of room.

I have not specifically measured this with the exact same versions of software and the exact same tabs open but I do keep both fairly up to date and frequent the same sites regularly. I may be a little off here and there but should be pretty close, even tho I don't work for any government. :lol:

:D :D

Edit: my bad spelling corrected. :oops:
_________________
My rig: Gigabyte GA-770T-USB3 mobo AMD Phenom II X4 955 3.2GHz ZALMAN CNPS10X Performa CPU cooler
G.SKILL 16GB DDR3 PC3 12800 Memory Nvidia GT-220 video card LG W2253 Monitor
WD1600AAJS & WD2502ABYS hard drives
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
Suicidal
l33t
l33t


Joined: 30 Jul 2003
Posts: 940
Location: /dev/null

PostPosted: Wed Nov 23, 2011 2:18 am    Post subject: Reply with quote

golagoda wrote:
I can't imagine even on a 64bit install that Firefox would be using a gig.


It depends on the web page, I have seen several fark.com threads crash browsers on computers with less than 2GB of ram. It got common enough it led to a redesign of how many threads are displayed by default on fark.
_________________
Who controls the past now, controls the future
Who controls the present now, controls the past.
Back to top
View user's profile Send private message
golagoda
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jun 2011
Posts: 105
Location: Australia

PostPosted: Wed Nov 23, 2011 3:06 am    Post subject: Reply with quote

Suicidal wrote:
golagoda wrote:
I can't imagine even on a 64bit install that Firefox would be using a gig.


It depends on the web page, I have seen several fark.com threads crash browsers on computers with less than 2GB of ram. It got common enough it led to a redesign of how many threads are displayed by default on fark.

I don't know what's happened there but you've somehow quoted me with something Gusar said that I didn't.. lol :p
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1300
Location: Mississippi USA

PostPosted: Wed Nov 23, 2011 3:08 am    Post subject: Reply with quote

Suicidal wrote:
It depends on the web page, I have seen several fark.com threads crash browsers on computers with less than 2GB of ram. It got common enough it led to a redesign of how many threads are displayed by default on fark.


I agree. I mostly use Seamonkey but also have Firefox. If I have been watching movies or something that use flash, java etc then Seamonkey or Firefox uses a good bit of ram. I have seen mine approach a Gb but usually close then reopen to clear out some. Having lots of tabs open really causes this. I try to limit my number of open tabs when I can.

I think the problem may not be the browser itself but some plugins and such that are used. I know my local weather radar makes it go up a good bit sometimes and I have to close the browser to make it turn the ram loose. It uses java since it shows the storms in motion and such.

Glad to know this isn't just me tho.

:D :D
_________________
My rig: Gigabyte GA-770T-USB3 mobo AMD Phenom II X4 955 3.2GHz ZALMAN CNPS10X Performa CPU cooler
G.SKILL 16GB DDR3 PC3 12800 Memory Nvidia GT-220 video card LG W2253 Monitor
WD1600AAJS & WD2502ABYS hard drives
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
hnaparst
Apprentice
Apprentice


Joined: 27 Jul 2005
Posts: 236
Location: Norrköping, Sweden

PostPosted: Wed Nov 23, 2011 6:11 am    Post subject: Reply with quote

Is it the Virtual memory or the Resident size that is relevant to performance?
_________________
Harold Naparst
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1300
Location: Mississippi USA

PostPosted: Wed Nov 23, 2011 6:41 am    Post subject: Reply with quote

hnaparst wrote:
Is it the Virtual memory or the Resident size that is relevant to performance?


The only place I know that describes the differences is in

Code:
man top


and scroll down to section 2. This is a snippet of what it says:

Quote:
n: %MEM -- Memory usage (RES)
A task's currently used share of available physical memory.


o: VIRT -- Virtual Image (kb)
The total amount of virtual memory used by the task. It includes all code, data and shared libraries plus pages that have been swapped out and
pages that have been mapped but not used.


p: SWAP -- Swapped size (kb)
Memory that is not resident but is present in a task. This is memory that has been swapped out but could include additional non-resident mem‐
ory. This column is calculated by subtracting physical memory from virtual memory.


q: RES -- Resident size (kb)
The non-swapped physical memory a task has used.


r: CODE -- Code size (kb)
The amount of virtual memory devoted to executable code, also known as the 'text resident set' size or TRS.


s: DATA -- Data+Stack size (kb)
The amount of virtual memory devoted to other than executable code, also known as the 'data resident set' size or DRS.


t: SHR -- Shared Mem size (kb)
The amount of shared memory used by a task. It simply reflects memory that could be potentially shared with other processes.


There may be better information in another place tho. Meantime, maybe that will help.

:D :D
_________________
My rig: Gigabyte GA-770T-USB3 mobo AMD Phenom II X4 955 3.2GHz ZALMAN CNPS10X Performa CPU cooler
G.SKILL 16GB DDR3 PC3 12800 Memory Nvidia GT-220 video card LG W2253 Monitor
WD1600AAJS & WD2502ABYS hard drives
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
hnaparst
Apprentice
Apprentice


Joined: 27 Jul 2005
Posts: 236
Location: Norrköping, Sweden

PostPosted: Wed Nov 23, 2011 7:06 am    Post subject: Reply with quote

I am noticing that for many processes, the Virtual size is five to ten times the size
of the Resident size. So this raises some questions.

Can I think of the Virtual size like a hotel or rental car company that is
placing a hold on my credit card? The amount hasn't been used (yet),
but no one else can use it either? What happens if another process comes along
and needs some space?
_________________
Harold Naparst
Back to top
View user's profile Send private message
Goverp
Guru
Guru


Joined: 07 Mar 2007
Posts: 346

PostPosted: Wed Nov 23, 2011 9:56 am    Post subject: Reply with quote

hnaparst wrote:
I am noticing that for many processes, the Virtual size is five to ten times the size
of the Resident size. So this raises some questions.

Can I think of the Virtual size like a hotel or rental car company that is
placing a hold on my credit card? The amount hasn't been used (yet),
but no one else can use it either? What happens if another process comes along
and needs some space?

No, it's not like a hold on your credit card. If you want to follow that analogy, and it's a bit strained, it's like cash you put in the bank 'cos you have enough in your wallet.

Virtual memory technology dates back to the late 1960's, when core memory was phenomenally expensive (though still cheaper than the CPU registers). Experiments showed that at any one time most programs only referenced about 1/3rd of the total memory they had allocated. That 1/3rd would change over the course of the program's execution - initialization typically has loads of definitions and parameters and files to process, creating various data structures; the main operation then uses only those tables, and perhaps some other files; occasionally, something unusual happens and some exception code runs, and accesses new stuff.

Now the other problem in those days was keeping that expensive CPU busy; a program would often wait for disk I/O or user input, so the system builders realized you needed more programs ready to run, so you could switch to another while waiting. If you moved the unused 2/3rd of a program's memory to disk, you could use it for another program. So in general, a 1Mb memory could hold the active memory for about 3Mb of programs. (Actually, even 1Mb was a lot then, a big computer was anything above 128 Kb.)

You say you're seeing rations of virtual:resident of 5:1. That's high, but you're probably including the daemon tasks that only wake up once every few seconds to take a few checks and then go back to sleep; they tend to have almost no resident code. The system automatically tends to keep the relevant memory residnet, provided you've enough RAM. If you don't, you get "thrashing", where the system keeps robbing one active task for memory for the next axtive task. That's called "overcommitting" memory, and the cure is to either run fewer programs, or to force memory hogs to use less (for example, a program may reserve a large amount for a lookup table, and then scatter a few entries thinly across it; a smaller table would just use it more efficiently), if they are configurable.

As to which of virtual or resident memory has most effect on performance, the answer is neither. Provided your system isn't overcommitted, you should barely notice the difference. If it is overcommitted, it's the ratio of the total memory being actually referenced by the active tasks to the total available RAM in your computer.
_________________
Greybeard
Back to top
View user's profile Send private message
hnaparst
Apprentice
Apprentice


Joined: 27 Jul 2005
Posts: 236
Location: Norrköping, Sweden

PostPosted: Wed Nov 23, 2011 10:08 am    Post subject: Reply with quote

How can I monitor whether my system is overcommitted or close to it?
_________________
Harold Naparst
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 7841
Location: Somewhere over Atlanta, Georgia

PostPosted: Thu Nov 24, 2011 9:56 am    Post subject: Reply with quote

Moved from Gentoo Chat to Gentoo on AMD64.

- John
_________________
This space intentionally left blank.
Back to top
View user's profile Send private message
Goverp
Guru
Guru


Joined: 07 Mar 2007
Posts: 346

PostPosted: Thu Nov 24, 2011 9:59 am    Post subject: Reply with quote

If your system is overcommitted, it has to keep moving pages from RAM to disk. You can see this in vmstat output, where the "SO" column is the average rate at which the system swapped out pages during the last period. Note that the first line contains average data for all time. For example, the display below shows that overall, my system has been swapping about 10 pages/second, but over the four 10 second periods it ran, there was no swap out activity.
Code:
vmstat 10
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 0  0 315608 289344  32988 404960    3   10    63    22  668  517 12  3 82  3
 0  0 315460 280408  33148 414048   13    0    24    74 3490 2776 21  6 69  4
 5  0 315460 273324  33176 416648    0    0   172    27 3777 3068 27  9 60  5
 1  0 315444 278492  33408 414288    0    0   661   112 4165 4003 45 15 34  6
 0  0 315444 285928  33424 406936    0    0     0   576 3684 2850 15  6 73  7
I suspect my swap out activity is related to "hibernating" my machine (a netbook).

Your next question will be "how much paging is too much". I'm not sure; in part it will be affected by how may I/O operations your hardware can support. In some respects, it's swapping in that's bad, as that causes the process to wait until the swap completes, but the purpose of swapping out is to make space for swapping in another page. So on that basis, any swap activity is bad. But the occasional swap is little problem; a constant level of swap of a few per second is probably OK. I'd guess single disk systems will grind to a halt at something like 50/sec but that is a guess.

The question after that is "which process is causing the swapping". Sorry, I've not yet worked out how to answer that!
_________________
Greybeard
Back to top
View user's profile Send private message
michelle778
n00b
n00b


Joined: 19 Mar 2005
Posts: 73

PostPosted: Sun Dec 25, 2011 8:01 pm    Post subject: Reply with quote

I compiled seamonkey with
Code:
www-client/seamonkey -mailclient -composer -chatzilla
and I have the subjective impression that it is a lot easier on RAM and CPU than firefox - but I never really checked in a compareable way? Anyone with the same feelings?
_________________
Nothing is easier than being busy - and nothing more difficult than being effective.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum