Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
should I enable highmem?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
sparks
Guru
Guru


Joined: 05 Mar 2003
Posts: 329
Location: Nashville, TN

PostPosted: Fri Feb 06, 2004 7:06 am    Post subject: should I enable highmem? Reply with quote

I just bought another stick of 512 DDR to add to my system, which was already running with 512; total now 1024mb. The first thing that came to mind was that I needed to enable highmem support in the kernel, but then I started reading around and stumbled on an article that states you actually take a performance hit when enabling highmem (by performance hit I guess he means responsiveness?...or latency?). I actually read this from Con Kolivas' homepage (the kernel developer) and he recommended just sacrificing the last 100mb's or so because the performance hit would negate the increased memory size. It is too bad that I could not find the article to link to, but it was interesting reading. So, in other peoples opinions is there really a "performance hit" when enabling highmem?
_________________
True trade is honest, but not merciful. Politics is dishonest, no matter how merciful... and war is neither honest nor merciful.... therefore, choose trade above politics, but politics above war.
Back to top
View user's profile Send private message
ectospasm
l33t
l33t


Joined: 19 Feb 2003
Posts: 711
Location: Mobile, AL, USA

PostPosted: Fri Feb 06, 2004 8:14 am    Post subject: Reply with quote

IIRC, highmem is only used >= 4GB, so at 1GB you should be OK.
_________________
Join the adopt an unanswered post initiative today
Join the EFF!
Join the Drug Policy Alliance!
Back to top
View user's profile Send private message
sparks
Guru
Guru


Joined: 05 Mar 2003
Posts: 329
Location: Nashville, TN

PostPosted: Fri Feb 06, 2004 1:31 pm    Post subject: Reply with quote

From dmesg:
Code:
Warning only 896MB will be used.
Use a HIGHMEM enabled kernel.
896MB LOWMEM available.


Well, you can set different values. If you do not enable highmem, you can use up to 896mb, but the next step up is to set a 4gb barrier, then you are able to use up to 4 gb. There is an even higher setting for extremely large ammounts of RAM, for server use I guess. But, to answer your question yes you do need highmem if you want to enable all 1024mb of memory in a one gig RAM system
_________________
True trade is honest, but not merciful. Politics is dishonest, no matter how merciful... and war is neither honest nor merciful.... therefore, choose trade above politics, but politics above war.
Back to top
View user's profile Send private message
terets
n00b
n00b


Joined: 14 Aug 2003
Posts: 4

PostPosted: Fri Feb 06, 2004 8:26 pm    Post subject: Reply with quote

I read a similar article to what you read about this.

Basically, according to the author (I apologize for not recalling his name) if your kernel is compiled with HIGHMEM you run into a problem with the kernel having to reserve space for the kernel itself in memory.

He stated at 1024 MB you would not gain anything because the kernel will allocate the the gained RAM for addressing....or something like that...and additionaly, because of this, your performance will degrade.

I have the same ordeal, and I just use a lowmem kernel. If you have a kernel developer saying not to do it, well, that kind of speaks highly.
Back to top
View user's profile Send private message
dogshu
Apprentice
Apprentice


Joined: 22 Jun 2003
Posts: 173
Location: New Haven, CT, USA

PostPosted: Sat Feb 07, 2004 3:55 pm    Post subject: Reply with quote

I use highmem on my machine with 1 GB of memory and it works fine, there are no performance problems with it that I know of.

I looked at Con Kolivas' homepage and I didn't see anything recommending turning off highmem support for 1GB systems... didn't turn up anything on google either... can you provide a link?
Back to top
View user's profile Send private message
sparks
Guru
Guru


Joined: 05 Mar 2003
Posts: 329
Location: Nashville, TN

PostPosted: Sun Feb 08, 2004 3:19 am    Post subject: Reply with quote

dogshu wrote:
I use highmem on my machine with 1 GB of memory and it works fine, there are no performance problems with it that I know of.

I looked at Con Kolivas' homepage and I didn't see anything recommending turning off highmem support for 1GB systems... didn't turn up anything on google either... can you provide a link?


That's the reason my first post was so vague. Con Kolivas' website is more of a blog of his new patchset instead of a static repertoire of kernel documentation. I had originally read the article on highmem support almost year ago which is obviously before I purchased my second stick of 512; and was wondering if what he stated was still valid with a modern 2.6 kernel. I was also looking for some others users input on their take about highmem and what experiences they have had with it. So, far I have not enabled it but on my next kernel upgrade which will probably be mm-2.6.2 I'll try highmem and see how it goes.
_________________
True trade is honest, but not merciful. Politics is dishonest, no matter how merciful... and war is neither honest nor merciful.... therefore, choose trade above politics, but politics above war.
Back to top
View user's profile Send private message
allucid
Veteran
Veteran


Joined: 02 Nov 2002
Posts: 1314
Location: atlanta

PostPosted: Sun Feb 08, 2004 4:59 am    Post subject: Reply with quote

a problem that significant may have been resolved by now. Over 896MB of memory is not uncommon in desktops anymore.
Back to top
View user's profile Send private message
dogshu
Apprentice
Apprentice


Joined: 22 Jun 2003
Posts: 173
Location: New Haven, CT, USA

PostPosted: Tue Feb 24, 2004 5:36 pm    Post subject: Reply with quote

Just thought I'd let you guys know, Con Kolivas has said its OK to enable highmem for systems with 1 GB of RAM under 2.6, but not under 2.4.

http://kerneltrap.org/node/view/2450

Scroll down to the bottom to see Con Kolivas's comment:
Quote:
I would recommend not using high mem support with 1Gb ram and sacrifice 128Mb unless you are running 2.6. If you are running 2.6 it is fine to enable high mem with 1Gb ram.
Back to top
View user's profile Send private message
sparks
Guru
Guru


Joined: 05 Mar 2003
Posts: 329
Location: Nashville, TN

PostPosted: Tue Feb 24, 2004 8:52 pm    Post subject: Reply with quote

dogshu wrote:
Just thought I'd let you guys know, Con Kolivas has said its OK to enable highmem for systems with 1 GB of RAM under 2.6, but not under 2.4.

http://kerneltrap.org/node/view/2450

Scroll down to the bottom to see Con Kolivas's comment:
Quote:
I would recommend not using high mem support with 1Gb ram and sacrifice 128Mb unless you are running 2.6. If you are running 2.6 it is fine to enable high mem with 1Gb ram.


Good reading thanks for the link.
_________________
True trade is honest, but not merciful. Politics is dishonest, no matter how merciful... and war is neither honest nor merciful.... therefore, choose trade above politics, but politics above war.
Back to top
View user's profile Send private message
helmers
Guru
Guru


Joined: 16 Sep 2002
Posts: 548
Location: Oslo, Norway

PostPosted: Thu Mar 04, 2004 8:43 am    Post subject: Reply with quote

But I still don't get it. Would it be okay if I did the 2G/2G split instead? Does someone know HOW much performance is lost?

And how does Windows (XP) manage this so well? The kernel seems like such a well thought-through project, there must be a reason it slows down Linux, but I have heard no such thing about Windows? :wink:
_________________
C is for Cookies!
Back to top
View user's profile Send private message
brewt
n00b
n00b


Joined: 10 Mar 2003
Posts: 9

PostPosted: Thu Mar 04, 2004 9:56 am    Post subject: Reply with quote

If you're using a 2.4 kernel, with 1GB of memory, then the benefit of the extra memory is not more than the performance lost from the kernel having to manage that extra memory. The code/data structures used in 2.4 were not particularly efficient, causing a slight performance hit when highmem was enabled. With 2.6 kernels, this has been optimized, so it's not a problem anymore (ie. go ahead and turn on highmen).

For 2.4 kernels, one way around this performance hit is to get the patch which changes the split. The downside to this is that your maximum process size is smaller, but this fortunately won't be a problem for most people.
Back to top
View user's profile Send private message
radulucian
Apprentice
Apprentice


Joined: 05 Jan 2004
Posts: 151
Location: Bucharest Romania

PostPosted: Tue Mar 16, 2004 7:13 pm    Post subject: Reply with quote

ok. i've read this thread before enabling highmem so i decided to do it.
unfortunately, in about 30 minutes my gentoo was already requesting swap (and i have 1 Gb of RAM), and NO PROCESSES where listed that would eat that amount of RAM.

i went back to a NON highmem enabled kernel and now my (heavy loaded) server is at 400Mb memory load.

i am running gentoo-dev-sources with kernel 2.6.4 and i have web, email, sql and some other smaller services.

so my answer is NO. DO NOT ENABLE HIGHMEM.
i will subscribe and follow this thread in case anyone requires some more details.
_________________
--------------------------
i am gen2 fan too
noone clicks links in the signature :D
--------------------------
Back to top
View user's profile Send private message
nmcsween
Guru
Guru


Joined: 12 Nov 2003
Posts: 381

PostPosted: Wed Mar 17, 2004 6:40 am    Post subject: Reply with quote

Ummm I have have Highmem enabled and right now with 20 tabs and mplayer and blender and gimp going my memory usage is 184 megs I highly doubt that Highmem is an evil thing.
Back to top
View user's profile Send private message
radulucian
Apprentice
Apprentice


Joined: 05 Jan 2004
Posts: 151
Location: Bucharest Romania

PostPosted: Wed Mar 17, 2004 9:02 am    Post subject: Reply with quote

yeap. sorry for the previous post but i was kinda upset on the matter :-)

apparently there was no bug and no memory leak in the highmem enabled kernel, but rather the optimization that linux does in order to speed things up, and it was normal behaviour.
the extra memory used was probably used by the caching and buffers, so enabling highmem might be safe.

just thought i had to clarify this.
_________________
--------------------------
i am gen2 fan too
noone clicks links in the signature :D
--------------------------
Back to top
View user's profile Send private message
bombcar
Guru
Guru


Joined: 08 Apr 2003
Posts: 446
Location: Lincoln Acres, CA

PostPosted: Wed Mar 17, 2004 5:34 pm    Post subject: Reply with quote

If anyone wants dirty details they will have to learn the secrets of virtual memory.

Remember back in the old days of DOS? If you wanted to access memory above 1 MB, you had to "page" it into low memory. This is what things like EMM386 and what not did.

Well, 32 bits didn't prevent that problem, just moved it. And the kernel uses virtual addresses, but 2.4 only deals with 4 GB total of virtual memory. The default split is 1GB for real memory/ 3 GB for virtual addresses. Well, if you have more than 1GB (minus some room for device drivers, etc), then the real addresses overlap the virtual addresses.

So the kernel has to be able to page requests. Each paging request causes a memory copy, which is a performance hit. So for small amounts of memory, it just isn't worth it.

But you can make the split 2GB / 2GB, or enable the HIGHMEM directive (which does page).

So if you have gobs of RAM, highmem is still OK.

And the 64 bit processors will have a problem someday too, around 9223372036854775808 bytes of RAM..... ;)
Back to top
View user's profile Send private message
F.Ultra
Apprentice
Apprentice


Joined: 17 Mar 2004
Posts: 169
Location: Sweden

PostPosted: Thu Mar 18, 2004 10:44 am    Post subject: Reply with quote

Quote:
And how does Windows (XP) manage this so well?
And how do you know that it does 8O. In fact XP has "highmem" enabled all the time so you wouldn't notice any performance changes since there was no way to test it with a "lomem" setting.

Reading stuff that kernel hackers write sometimes makes me feel that the Linux system is a very unstable and unfinished project but then I have to really pinch myself really hard and understand that the reason why I'm feeling like this is that the other OS:es like Microsofts does not have this openess so that is why I will never hear of such problems etc with them. So never assume that other OS:es do not have problems just because you have never heard of them!
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1249
Location: C.C.A.A., Germania

PostPosted: Sun Jul 11, 2004 4:27 pm    Post subject: Reply with quote

I did this (http://www.uwsg.iu.edu/hypermail/linux/kernel/0402.1/1506.html) and it seems to work nicely w/o using highmem.
Back to top
View user's profile Send private message
sparks
Guru
Guru


Joined: 05 Mar 2003
Posts: 329
Location: Nashville, TN

PostPosted: Tue Dec 14, 2004 6:55 am    Post subject: Reply with quote

There is also now the 1gig_low_mem patch available in Con's CK patch set if anyone is still following this thread.
_________________
True trade is honest, but not merciful. Politics is dishonest, no matter how merciful... and war is neither honest nor merciful.... therefore, choose trade above politics, but politics above war.
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1249
Location: C.C.A.A., Germania

PostPosted: Tue Dec 14, 2004 10:19 am    Post subject: Reply with quote

Yes, Con obviosly put above findings into that patch. ;)
Back to top
View user's profile Send private message
TheCoop
Veteran
Veteran


Joined: 15 Jun 2002
Posts: 1814
Location: Where you least expect it

PostPosted: Tue Dec 14, 2004 10:40 am    Post subject: Reply with quote

ive got the patch myself if anyone wants it
_________________
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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