Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo optimization for ASUS K50C
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
iurii
n00b
n00b


Joined: 19 Jan 2020
Posts: 38
Location: Crimea

PostPosted: Thu Feb 13, 2020 4:42 pm    Post subject: Gentoo optimization for ASUS K50C Reply with quote

Hello,
I installed Gentoo on the ASUS K50C laptop with the sole purpose of making it possible to view videos on YouTube. But after installation
default/linux/amd64/17.1/desktop/gnome(stable) & gnome-base/gnome & www-client/firefox & www-plugins/adobe-flash

the YouTube videos are played in jerks and with delays.
ASUS K50C is
Code:

processor   : 0
vendor_id   : GenuineIntel
cpu family   : 6
model      : 22
model name   : Intel(R) Celeron(R) D CPU        220  @ 1.20GHz
stepping   : 1
cpu MHz      : 1500.339
cache size   : 512 KB
physical id   : 0
siblings   : 1
core id      : 0
cpu cores   : 1
apicid      : 0
initial apicid   : 0
fpu      : yes
fpu_exception   : yes
cpuid level   : 10
wp      : yes
flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm lahf_lm pti dtherm
bugs      : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips   : 3000.67
clflush size   : 64
cache_alignment   : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:
-------------------------
MemTotal:        3066284 kB


My /etc/portage/make.conf is:
Code:

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

# NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C

GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/"

USE="X a52 aac acl acpi alsa amd64 asm berkdb bindist bluetooth branding bzip2 cairo cdda cdr clang cli colord crypt cups custom-cflags custom-optimization cxx dbus device-mapper dri dts dvd dvdr eds elogind emboss eme-free encode evo exif flac fortran gdbm geckodriver gif gmp-autoupdate gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk hardened hwaccel ibus iconv icu introspection ipv6 jack jpeg lcms ldap libnotify libsecret libtirpc lto mad mng mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl nsplugin ogg opengl openmp pam pango pbkdf2 pcre pdf pgo png policykit ppds pulseaudio readline screenshot sdl seccomp spell split-usr ssl startup-notification  svg system-av1 system-icu system-jpeg system-libevent system-libvpx system-sqlite system-webp tcpd tiff tracker truetype udev udisks unicode upower usb vorbis wifi wxwidgets x264 xattr xcb xml xorg xv xvfb xvid zlib -dmx -doc -kde -kdrive -libglvnd -libressl -livecd -make-symlinks -math -mdev -savedconfig  -sep-usr -syslog -systemd -qt4 -qt5 -wayland -unwind -xcsecurity -xephyr -xnest"
ABI_X86="(64) 64"
META_USE="videocodecs audiocodecs web"
#PYTHON_SINGLE_TARGET="python3_6"
#PYTHON_TARGETS="python2_7 python3_6"
VIDEO_CARDS="sis"
#source /var/lib/layman/make.conf
PORTDIR_OVERLAY="/usr/local/portage"
ACCEPT_LICENSE="*"

Please explain how I can optimize Gentoo on my K50C?


Last edited by iurii on Fri Feb 21, 2020 4:47 pm; edited 2 times in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9696
Location: almost Mile High in the USA

PostPosted: Thu Feb 13, 2020 10:03 pm    Post subject: Reply with quote

I don't know about how fast the SiS chipset is...this may be a limiting factor. Is it capable of showing these streams under other distributions/OS?

The Celeron 220 is a Core2 core. It's a single core, single thread. I know my Atom 1.6 with 945 chipset graphics struggles to keep up with showing video as well, and thus frequently hiccups. The Celeron 220 should be slightly but not significantly faster, but the SiS graphics I don't know.

You may want to try setting CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3" and -march=native in make.conf (and re-emerging @world) which may speed up the codecs. This will not likely help adobe-flash.

Make sure you're not swapping. Though with 3GB RAM it should be enough for amd64 this is the absolute minimum IMHO.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
iurii
n00b
n00b


Joined: 19 Jan 2020
Posts: 38
Location: Crimea

PostPosted: Sat Feb 15, 2020 9:48 am    Post subject: Reply with quote

eccerr0r wrote:
I don't know about how fast the SiS chipset is...this may be a limiting factor. Is it capable of showing these streams under other distributions/OS?

The Celeron 220 is a Core2 core. It's a single core, single thread. I know my Atom 1.6 with 945 chipset graphics struggles to keep up with showing video as well, and thus frequently hiccups. The Celeron 220 should be slightly but not significantly faster, but the SiS graphics I don't know.

You may want to try setting CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3" and -march=native in make.conf (and re-emerging @world) which may speed up the codecs. This will not likely help adobe-flash.

Make sure you're not swapping. Though with 3GB RAM it should be enough for amd64 this is the absolute minimum IMHO.



Thanks you,
my memory is
Code:
MemTotal:        3066284 kB
MemFree:          959528 kB
MemAvailable:    1959024 kB
Buffers:           97868 kB
Cached:           889772 kB
SwapCached:        24752 kB
Active:          1016064 kB
Inactive:         942296 kB
Active(anon):     464040 kB
Inactive(anon):   520160 kB
Active(file):     552024 kB
Inactive(file):   422136 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       1048572 kB
SwapFree:         864764 kB
Dirty:              8044 kB
Writeback:           780 kB
AnonPages:        950736 kB
Mapped:           124588 kB
Shmem:             13488 kB
Slab:             108156 kB
SReclaimable:      70408 kB
SUnreclaim:        37748 kB
KernelStack:        7456 kB
PageTables:        14060 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     2581712 kB
Committed_AS:    4042712 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
Percpu:             1168 kB
HardwareCorrupted:     0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB

It consists of two 2Gbyte memory stick.
Explane me please, how can I not swapping?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9696
Location: almost Mile High in the USA

PostPosted: Sat Feb 15, 2020 8:51 pm    Post subject: Reply with quote

As I would expect from a 3GB amd64 machine, you're using a little swap. It's OK to swap, as long as you're not constantly swapping - I don't know if you can check your mass storage device activity light, make sure your machine isn't constantly using the disk when doing video decoding.

If you are swapping a lot, you'll have to use smaller programs, quit programs you're not using, or possibly reverting to an x86 installation.

After you are sure you're not swapping during decode, ensure your applications are optimized for your CPU. I believe Youtube is using HTML5 now upon default so it's critical that your browser is optimized for your CPU.

I'm also hoping that the recent cpu vulnerability workarounds aren't slowing the machine down below necessary speed for video decode...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
iurii
n00b
n00b


Joined: 19 Jan 2020
Posts: 38
Location: Crimea

PostPosted: Thu Mar 19, 2020 3:57 pm    Post subject: Reply with quote

eccerr0r wrote:
As I would expect from a 3GB amd64 machine, you're using a little swap. It's OK to swap, as long as you're not constantly swapping - I don't know if you can check your mass storage device activity light, make sure your machine isn't constantly using the disk when doing video decoding.

If you are swapping a lot, you'll have to use smaller programs, quit programs you're not using, or possibly reverting to an x86 installation.

After you are sure you're not swapping during decode, ensure your applications are optimized for your CPU. I believe Youtube is using HTML5 now upon default so it's critical that your browser is optimized for your CPU.

I'm also hoping that the recent cpu vulnerability workarounds aren't slowing the machine down below necessary speed for video decode...


I made the proposed changes to make.conf and recompiled the kernel with the following changes:
Processor type and features --->[ ] Symmetric multi-processing support
Processor type and features --->Processor family (Intel P4 / older Netburst based Xeon) --->.

Tried to disable swap.
But these actions did not affect the speed of Adobe Flash Player.
So, i wanted to replace Adobe Flash Player with gnash, but I got an error installing gnash:
Code:

localhost /home/lyudmila # emerge -av www-plugins/gnash
 * Last emerge --sync was Пн 27 янв 2020 13:05:01.

These are the packages that would be merged, in order:

Calculating dependencies... done!

emerge: there are no ebuilds to satisfy "www-plugins/gnash".

emerge: searching for similar names...
emerge: Maybe you meant any of these: www-plugins/passff, www-plugins/pdfjs, www-plugins/passff-host?
localhost /home/lyudmila #


Why can't I install gnash?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9696
Location: almost Mile High in the USA

PostPosted: Thu Mar 19, 2020 4:45 pm    Post subject: Reply with quote

NO, do NOT disable swap. Swap is not a bad thing, abusing it is the problem. If you just did it as an experiment, please reenable it.

However it seems to imply that your machine isn't fast enough at least with the current software or data that it's trying to decode.

Last time I tried gnash it was well behind adobe-flash's implementation and was unusable. It appears it has been removed from portage due to slow progress, and as html5 has mostly made it unnecessary except for legacy.

As this appears to be a single core CPU, turning on SMP does not help and likely only adds overhead. And this should be a core2 CPU, though optimizing it for a Netburst CPU probably won't hurt that much it's not optimal.

Likely this is about as fast as it goes with today's software along with the security workarounds...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54397
Location: 56N 3W

PostPosted: Thu Mar 19, 2020 5:53 pm    Post subject: Reply with quote

iurii,

Setting
Code:
CPU_FLAGS_X86=
correctly for your system will allow multimedia applications to use special hand optimised assembler routines that tae advantage of all the features of your CPU.
Code:
app-portage/cpuid2cpuflags
will tell you what to set.

Using -march=native allows gcc to do the same thing.

Fix that and rebuild all of your multimedia applicationons, your video driver(s) and mesa, if you have it installed.

You cannot stop the kernel swapping. Turning off swap in the kernel only robs the kernel of one possible way to swap, so don't do that.
Swap space is only ever used for dynamically allocated RAM as it has no permanent home on HDD.
The kernel can swap by dropping any read only memory space immediately. That includes code. It will be reloaded when its needed next but that incurs a big performance penalty.
Read/write memory, waiting to be written to disk can be dropped after the write. It will be reloaded as required, again with a big performance penalty.

There is no xf86-video-sis* driver in ::gentoo repo any longer, so you will be using a driver that depends on software acceleration.
Please put your /var/log/Xorg.0.log onto a pastebin site so we can see what Xorg did when it started.

There have been lots of sis chipsets over the years. If yours is supported, you may be in luck.



Please post the output of
Code:
lspci -nnk

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9696
Location: almost Mile High in the USA

PostPosted: Thu Mar 19, 2020 9:26 pm    Post subject: Reply with quote

Ah... that is true too, hopefully you're using the hardware specific driver. You may need to write your own ebuild or build the driver by itself, though at least last I tried the no-longer-in-gentoo but still in the Xorg distribution drivers still work in Gentoo though other than the specific hardware, has no other features. Using the VESA driver, being the default, would be very slow and likely the root of the problem though most windowing applications should also show some sluggishness.

Last I tried was the sisusb driver, but this was at least a year or so ago, so not exactly recent but after the decision by Gentoo to remove infrequently used drivers. I wasn't aware the sis driver was also removed...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
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