Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo is less responsive than other distros.[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Mr_Shameless
Tux's lil' helper
Tux's lil' helper


Joined: 17 Sep 2006
Posts: 90
Location: sumwhere in Asia

PostPosted: Sat Oct 28, 2006 2:48 am    Post subject: Gentoo is less responsive than other distros.[SOLVED] Reply with quote

Hi,
I guess this is just my own problem. Everybody knows that gentoo is one of the most responsive distro, or at least better than bloated ones like SUSE or Ubuntu. But it's not true in my case.

The first time I installed gentoo, I set my CFLAGS like this:

CFLAGS="-mcpu=pentium2 -O3 -pipe"
CFLAGS="-march=pentium2 -O3 -pipe"


Well, the programs started a little faster than in other distros, but when they had started, their responsiveness was poor. For example in firefox, sometimes it took 2 seconds to switch from one tab to another, and it often took 1 second for a page to start scrolling when I scroll my mouse wheel. The same problem appeared in Gaim and the file managers. There's always some weird "latency".

I have non of these problems in windows or SUSE, slackware. In SUSE, though it took quite long to start a program, I never had any problem like this.

After reading some article in this forum about "How to fly with Gentoo" or something, I started out. I editted the scripts, used hdparm, but it didn't help.

I was a little frustrated so I installed FreeBSD, but it broke my windows box after it'd been installed. So I decided to make one more try and reinstalled Gentoo :lol:

Well, this time I change my make.conf file a bit (after reading articles on Gentoo wiki and this forum). This is how it is:

CHOST="i686-pc-linux-gnu"
#CFLAGS="-mcpu=pentium3 -O2 -pipe"
CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer -mmmx -msse"
CXXFLAGS="${CFLAGS}"

PORTAGE_TMPDIR=/var/tmp
PORTDIR=/usr/portage
DISTDIR=${PORTDIR}/distfiles
PKGDIR=${PORTDIR}/packages
PORT_LOGDIR=/var/log/portage
#PORTDIR_OVERLAY=/usr/local/portage

FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp \${URI} -P \${DISTDIR}"
RESUMECOMMAND="/usr/bin/wget -c -t 5 -T 60 --passive-ftp \${URI} -P \${DISTDIR}"

SYNC="rsync://rsync.asia.gentoo.org/gentoo-portage"
PORTAGE_RSYNC_RETRIES="3"
PORTAGE_RSYNC_EXTRA_OPTS=""

EMERGE_DEFAULT_OPTS=""
MAKEOPTS="-j2"

#PORTAGE_NICENESS=3
AUTOCLEAN="yes"
PORTAGE_TMPFS="/dev/shm"

#FEATURES="sandbox buildpkg ccache distcc userpriv usersandbox notitles noclean noauto cvs keeptemp keepwork autoaddcvs"
#FEATURES="sandbox ccache distcc distlocks autoaddcvs"
CCACHE_SIZE="2G"

DISTCC_DIR="${PORTAGE_TMPDIR}/.distcc"

PORTAGE_ELOG_CLASSES="warn error log"
PORTAGE_ELOG_SYSTEM="save"

#These lines are added by ME:
VIDEO_CARDS="i810"
INPUT_DEVICES="mouse keyboard"
LDFLAGS="-Wl,-O1"
CONFIG_PROTECT="-*"


But it seems like there's nothing different. I know it's me who is wrong, but I can't figure out how to make it. Please help me.

O, btw, this is my computer specs:
Celeron (coppermine) 667 MHz,
256MB RAM
i810 integrated graphic card

Thank you. :roll:


Last edited by Mr_Shameless on Wed Nov 08, 2006 4:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Sat Oct 28, 2006 3:06 am    Post subject: Re: Gentoo is less responsive than other distros. Please hel Reply with quote

Mr_Shameless wrote:
For example in firefox, sometimes it took 2 seconds to switch from one tab to another, and it often took 1 second for a page to start scrolling when I scroll my mouse wheel. The same problem appeared in Gaim and the file managers. There's always some weird "latency".

These hardly sound like issues related to not using the most extreme CFLAGS, LDFLAGS, etc.

Sounds like you might have another issue with your system. Is DMA enabled for the hard drives?
Code:
hdparm /dev/hdX

(Replace X with your harddrive, probably hda)
Back to top
View user's profile Send private message
Insanity5902
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1228
Location: Fort Worth, Texas

PostPosted: Sat Oct 28, 2006 5:20 pm    Post subject: Reply with quote

Quote:
After reading some article in this forum about "How to fly with Gentoo" or something, I started out. I editted the scripts, used hdparm, but it didn't help.


Apparently you missed this part?

I don't think it has anything to do with your HDD, otherwise you would have prolong load times, not latency issues. You might want to look in how your kernel is compiled, there are options which are put in there for Desktop systems. Enable Preemption and use the model for low-latency desktops. Also go to the Time Frequency and change it to 1000hz, that should help if there were set to something else. Let me know how this works and we will go from there.

Oh and FYI, both of those kernel options are under 'Processor type and features'
_________________
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Sat Oct 28, 2006 6:03 pm    Post subject: Reply with quote

Insanity5902 wrote:
Quote:
After reading some article in this forum about "How to fly with Gentoo" or something, I started out. I editted the scripts, used hdparm, but it didn't help.


Apparently you missed this part?

I never assume noobies did everything right just because they followed a thread. ;)

The reason I suggested HD issues is that initial application loading times may be fine, but it is when virtual memory is used for conditions like multiple tabs and directories with many files that these conditions would be more apparent. (Wasn't just DMA I was looking for.)

But the preemption and timing frequencies are a good thing to look at also.
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Sun Oct 29, 2006 2:06 pm    Post subject: Reply with quote

A few thoughts: A Celeron 667Mhz with 256mb is really a bit underpowered these days, so it might be related to frequent swapping out, and a slower cpu with a small cache. Maybe PORTAGE_NICENESS=3 needs to be 10, if he has more problems while emerging stuff in the background.

But I agree with Insanity5902, and it sounds more like a kernel config option problem. Let's see the emerge --info, hdparm -i /dev//hdx, and dmesg.

EDIT:
Forgot to mention: If your color depth is 24bit, try changing it to 16bit. This will not be visually noticable to most users, but significantly improve X performance, especially on lower powered systems like yours.

_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11


Last edited by wrc1944 on Mon Oct 30, 2006 12:04 pm; edited 3 times in total
Back to top
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 4185
Location: india

PostPosted: Sun Oct 29, 2006 2:14 pm    Post subject: Reply with quote

the slow kde behaviour is noted many times in other distros also
i dont remember exactly what but it has something in kde itself.
probably see the kdmrc setup.
i will look for it too
(try google}
fedora forum had a discussion on this. pclinuxos forum also.
the same problem has comeup here also once. i cant get the thread.
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
Mr_Shameless
Tux's lil' helper
Tux's lil' helper


Joined: 17 Sep 2006
Posts: 90
Location: sumwhere in Asia

PostPosted: Mon Oct 30, 2006 4:53 am    Post subject: Reply with quote

Hi,

Thank you all for your help.

Im quite busy lately. Im taking my TOEFL this Friday, so i dont have much time to do anything else.

Once i've finished it, i will check my linux box, promise :wink:

O, btw, i use blackbox. I never use KDE.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Mon Oct 30, 2006 1:04 pm    Post subject: Reply with quote

padoor wrote:
the slow kde behaviour is noted many times in other distros also
i dont remember exactly what but it has something in kde itself.

Sounds like your are referring to the DNS issues which can slow KDE down. The problem isn't KDE but the problem is visible in KDE.
I don't think his problems sound like this.
Back to top
View user's profile Send private message
DeepBass909
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 81
Location: Netherlands

PostPosted: Mon Oct 30, 2006 3:22 pm    Post subject: Reply with quote

Quote:
CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer -mmmx -msse"


The options -mmmx and -msse aren't necessary, they are included in the march=pentium3 option

It might be usefull to check with top what your average load is. If it's above 1 with a low cpu usage, it might explain the sluggischness of your system. I'm experiencing the same problems with a AMD Duron 1600 with 768MB of memory. Enough to run any OS (even M$ Windows XP) without a problem, but it also feels sluggisch. I'm not sure about the cause of it... propably a misconfigured service somewhere or some remains of software I tried... But I'm not intending to find the cause, because in about 1 week I'm replacing this machine for a AMD Athlon X2 4200+, so I will need to recompile my entire system.
Back to top
View user's profile Send private message
lma1980
Tux's lil' helper
Tux's lil' helper


Joined: 25 Sep 2005
Posts: 78

PostPosted: Tue Oct 31, 2006 12:58 pm    Post subject: Reply with quote

DeepBass909 wrote:
Quote:
CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer -mmmx -msse"


The options -mmmx and -msse aren't necessary, they are included in the march=pentium3 option...

-fomit-frame-pointer is supposed to be include from -O to -O3 so isn't mandatory, I would prefere let gcc take good care of activating the flags with the -march then doing it by hand : usefull when you use -march=i686...
_________________
"... before that, there was amoebas..."
Back to top
View user's profile Send private message
_droop_
l33t
l33t


Joined: 30 May 2004
Posts: 957

PostPosted: Tue Oct 31, 2006 1:21 pm    Post subject: Reply with quote

Hi,

Have you tried this ? (the MOZ_DISABLE_PANGO should help)

What option do you use in your kernel (preemption ? timer rate...)

(You should try LDFLAGS/prelink but it will not change the issue that you describe.)
Back to top
View user's profile Send private message
yngwin
Retired Dev
Retired Dev


Joined: 19 Dec 2002
Posts: 4572
Location: Suzhou, China

PostPosted: Tue Oct 31, 2006 2:50 pm    Post subject: Reply with quote

lma1980 wrote:
-fomit-frame-pointer is supposed to be include from -O to -O3

Only on architectures where it doesn't interfere with debugging. On x86 it does, so you do need to specify it.
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
zxy
Veteran
Veteran


Joined: 06 Jan 2006
Posts: 1160
Location: in bed in front of the computer

PostPosted: Wed Nov 01, 2006 4:18 pm    Post subject: Reply with quote

Did you configure X properly. It slowed down a machine of mine until I had it properly configured.

Another thing, try setting 1000MHz latency and preemptible kernel in kernel options.
Or you can try some of the unsupported kernels, like no-sources. They have cpu-shedulers that work great and latest ones have preemptible-rcu option included, too. This lowers latencies.
Gentoo-sources seemed quite slow to me, when I was using them.

For Celerons I would try -Os option for CFLAGS, as celerons have very small processor (L2) cache. It should make a difference.

And last, but not the least, search forums for hashstyle LDFLAG. There is a new way of linking and it's very quick. I think it's supported upstream too, but I'm not sure. You can find how to install it in nxty's overlay or in conrad install guide. Search the unsuported software in the forums.

Good luck.
_________________
Nature does not hurry, yet everything is accomplished.
Lao Tzu
Back to top
View user's profile Send private message
Mr_Shameless
Tux's lil' helper
Tux's lil' helper


Joined: 17 Sep 2006
Posts: 90
Location: sumwhere in Asia

PostPosted: Wed Nov 08, 2006 9:49 am    Post subject: Reply with quote

Hi, im back.

First, i tried the MOZ_DISABLE_PANGO thing, and that was awesum. Thank you :lol:

Then I had a look at my kernel settings and change it the way you guys told me to, i.e. enabling preemption using the model for low-latency desktops and changing time frequency to 1000Hz. Also, I noticed that my specific CPU type was not set correctly. It was set to Pentium Pro and I changed that into Pentium3/Celeron/Xeon PIII. Its amazing. Amazing!!! My problem has been solved now.

However, I have a few questions. Im just curious. What is 'preemption' and why is the setting for workstations/servers (i dont remember the word) yields more latency than the one for desktops? I thought a server would require more 'power' to do its jobs.
The second question is, why do I have to change the frequency to 1000Hz myself? Why isnt that default? Is there any risk of doing this?

Thank you. :wink:


Last edited by Mr_Shameless on Wed Nov 08, 2006 10:41 am; edited 1 time in total
Back to top
View user's profile Send private message
Mr_Shameless
Tux's lil' helper
Tux's lil' helper


Joined: 17 Sep 2006
Posts: 90
Location: sumwhere in Asia

PostPosted: Wed Nov 08, 2006 10:14 am    Post subject: Reply with quote

O, btw, my computer settings are quite a mess. So, now i should set my CFLAGS like this right?

CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer" (should it be O2 or Os, as someone suggested?

And then to rebuild the whole system, I do this right?

emerge --newuse world

Thank you all :D
Back to top
View user's profile Send private message
Mr_Shameless
Tux's lil' helper
Tux's lil' helper


Joined: 17 Sep 2006
Posts: 90
Location: sumwhere in Asia

PostPosted: Wed Nov 08, 2006 10:21 am    Post subject: Reply with quote

Well, from what i read on gentoo wiki, Os is faster but less safe than O2 right?

Ok, but to me its worth trying.
Back to top
View user's profile Send private message
Mr_Shameless
Tux's lil' helper
Tux's lil' helper


Joined: 17 Sep 2006
Posts: 90
Location: sumwhere in Asia

PostPosted: Wed Nov 08, 2006 11:43 am    Post subject: Reply with quote

Oops, the --newuse things are for USE flags right? So, I just need to do this right?
emerge --update world

Sorry, i've made 4 successing posts :lol:
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Wed Nov 08, 2006 12:43 pm    Post subject: Reply with quote

emerge --update world will only update those packages that are updatable.

To rebuild the entire system with your new settings, you need to use:

emerge --ep world (to check and see all the packages to be re-merged and/or updated).

Then just drop the p to actually do it. Be aware, this will take a LONG time, maybe 2-3 days with a Celeron 667mhz.

If a package fails (a few probably will), the emerge will stop, and you'll need to use emerge --resume --skipfirst each time, and then worry about fixing the failed packages later. It's no big deal, and normal procedure, and won't "uninstall" the failed packages.

There's a helpful script at https://forums.gentoo.org/viewtopic.php?p=3669312#3669312 to avoid having to do the --resume --skipfirst, manually, which avoids having the emege -e world quitting on you. Also avoids having to constantly monitor the huge and long emerge. Scroll down towards the end for the emerge -e world version.

Preemptible means that if you have a process running, and you wish to call another process, the kernel can do so without having to wait for the other one to finish. Lately, with more recent 2.6 kernels, this has become less of a problem in Linux, but most desktop users seem to find that setting the preemptible option is still best..

I wouldn't use -Os and select -O2 instead, as -Os is known to break some packages. However, with a low-cache cpu like yours, maybe zxy is correct and it's worth a shot. The only way to know is to try it. Bottom line, I'd use -O2, and not worry about it. Maybe some Celeron users can offer better advice on this one.

I'd also put mmx and sse in your USE flags, so any apps that can use them will compile with support for them.
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
batistuta
Veteran
Veteran


Joined: 29 Jul 2005
Posts: 1384
Location: Aachen

PostPosted: Wed Nov 08, 2006 1:08 pm    Post subject: Reply with quote

Quote:
The second question is, why do I have to change the frequency to 1000Hz myself? Why isnt that default? Is there any risk of doing this?

This means how often the scheduler tries to see if there is another process that should run. That is, how often it should attempt to interrupt what is currently running and perform a switch (if something else should run due to higher priority, or some "other" reason).

so more or less:
Advantages of high frequency timer:
- You check often if something else should run. So you "feel" that your system is responsive, because if this is the case, this something else will run right away (important for example with X, graphical things, and audio that affect your perception of responsiveness).
Dissadvantage:
- You spend more time checking if something else should run, rather than doing useful stuff

Advantages of lower frequency timers:
- If waiting a few extra milliseconds for something to finish is not crucial (like in a server), you don't waste so much time in scheduling things
Disadvantages:
- some things that affect your perception of responsiveness might be affected, like X drawing routines and the such

In general, for desktop systems you go for higher frequencies, for servers with lower. If this is important for you, you may wanna check for alternative kernels like ck-sources that are further optimized for higher responsiveness.

Notice that your system *does not* run any faster. It might actually *do less* in a given timeframe. It is just that things are scheduled in your system in such a way that you *perceive* that it is more responsive.
Back to top
View user's profile Send private message
Insanity5902
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1228
Location: Fort Worth, Texas

PostPosted: Wed Nov 08, 2006 1:42 pm    Post subject: Reply with quote

I am glad everything worked out for you. If you could put [SOLVED] in the subject line of the original post that will show others that find search for similar problems and fine this that we came to a solution that worked for you.

A very fast overview of way servers and desktops have different settings is b/c of how they are interacting. A server is a lot of internal interactions of scripts be executing and network connections being served. A desktop is all about user interaction. Those changes improve I/O with the user via keyboard, mouse and monitor output.


Again glad everything worked out , and throw that [SOLVED] in the title.
_________________
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
Mr_Shameless
Tux's lil' helper
Tux's lil' helper


Joined: 17 Sep 2006
Posts: 90
Location: sumwhere in Asia

PostPosted: Mon Nov 13, 2006 1:27 pm    Post subject: Reply with quote

Oh, well, just one more dum question :D

After I rebuilt my whole system (with the Os option, it didnt break anything), everything went well except my clock. It went 7 hours sooner than my local time. The clock in my windows box is still normal, so I guess my clock has been reset to display UTC time. How do I change it back to local time? I dont know where to look at, because I've always done this during installing linux.

Thank you so much, nice people :lol:
Back to top
View user's profile Send private message
batistuta
Veteran
Veteran


Joined: 29 Jul 2005
Posts: 1384
Location: Aachen

PostPosted: Mon Nov 13, 2006 3:19 pm    Post subject: Reply with quote

go here and look at the section Hardware clock
Back to top
View user's profile Send private message
Mr_Shameless
Tux's lil' helper
Tux's lil' helper


Joined: 17 Sep 2006
Posts: 90
Location: sumwhere in Asia

PostPosted: Mon Nov 13, 2006 4:02 pm    Post subject: Reply with quote

Thank you.
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Tue Nov 14, 2006 6:12 am    Post subject: Reply with quote

You also may want to take a look at your IO scheduler. I personally use CFQ which seems nice for a desktop. Deadline is nice for a server.

BTW - I realsed looking at my config that I'm running at 250Hz instead of 1000. I will have to make the switch and see how things feel.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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