WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Firefox for piCore 11  (Read 1215 times)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10273
Re: Firefox for piCore 11
« Reply #30 on: July 20, 2020, 09:30:39 AM »
Yes, the RAM filesystem is included under "cached".
The only barriers that can stop you are the ones you create yourself.

Offline ashfame

  • Full Member
  • ***
  • Posts: 112
Re: Firefox for piCore 11
« Reply #31 on: July 21, 2020, 05:43:16 AM »
Yes, the RAM filesystem is included under "cached".

Thanks for confirming!

Offline ashfame

  • Full Member
  • ***
  • Posts: 112
Re: Firefox for piCore 11
« Reply #32 on: July 21, 2020, 08:08:12 AM »
Like epiphany, midori uses webkitgtk, so I'm not sure how much better it will be - I haven't tried vivaldi.

Thanks for the heads up!

Offline ashfame

  • Full Member
  • ***
  • Posts: 112
Re: Firefox for piCore 11
« Reply #33 on: July 21, 2020, 08:16:44 AM »
Hi ashfame
I am not sure if the epiphany browser is not functional or I am running out of memory ...
Spoiler alert. Web browsers are selfish and inconsiderate programs. In their attempt to cache every last byte of data they sucked
in, they will consume most/all of your RAM. Epiphany may also be caching stuff to disk (/home/tc/) which in your case also resides
in RAM.

Quote
... I tried launching it via terminal and saw messages regarding "memory pressure", but when I check free memory by running `free -m`, it tells me ~12M is free ...
I would call that  "out of memory territory".

Quote
... but over 300M is cached, which as per my understanding can be released by kernel when required, unless in TinyCore RAM based file system is shown under cached and that's actually not freeable memory?
I've noticed that even if you tell the system to clear the cache, it never goes to zero. That suggests that not everything that is currently
cached can be released.

I believe you disabled the  zswap  to free up RAM.  You could try adding a little back to see if it relieves the pressure any. Maybe try
adding about 50 Mbytes:

... By default, Tinycore uses 25% of your RAM for  zswap (swap space in RAM). If you want to change the amount used, try this:

First, boot using the  nozswap  boot code.
Then
Code: [Select]
sudo su
# remove all existing swap
swapoff -a

# Set the size to 50000 K bytes
echo "50000K" > /sys/block/zram0/disksize

# Create the swap file
mkswap /dev/zram0 >/dev/null 2>&1

# Update fstab.
echo "/dev/zram0  swap         swap    defaults,noauto   0       0" >> /etc/fstab # Lets swapoff -a work

# Enable this swap device first so it has priority.
swapon /dev/zram0

# Enable any remaining swap devices.
swapon -a
exit

To see the status of your swap devices:
Code: [Select]
cat /proc/swaps
If this does what you want, then add it to your  /opt/bootsync.sh  file before the line that calls  /opt/bootlocal.sh.  Do not include
the lines that say  sudo su  or  exit.

Hi Rich, thanks for the instructions. I wasn't convinced if use of swap could help at all, since it would barely have unused code that it can push to swap. But perhaps a compressed swap would result in some sort of optimization, so I simply tried removing the "nozswap" bootcode and it didn't result in much of a difference. The web process inside of the browser crashed at the same point where it was crashing without swap and at that point, zswap was full 100M too. It just got sluggish that browser was struggling to show anything inside it. I am guessing because of constant swap in/out movement.

I tried your instruction to use a little swap to see if that makes any difference but it didn't let me update the disksize for swap stating it was busy. I did use `swapoff -a` before but I think your instructions required not to have swap enabled? Anyway, I don't think that will make a difference unless I reduce the size of this browser itself. I got my hands on palemoon and vivaldi binary that I am gonna try using and see if they occupy less disk space.

Great point about browser trying to cache stuff as well. I will explore if I can disable that using a flag or something.


Offline ashfame

  • Full Member
  • ***
  • Posts: 112
Re: Firefox for piCore 11
« Reply #34 on: July 21, 2020, 02:59:50 PM »
Hey folks,

It just occurred to me I am essentially trying to bundle a browser in my remaster because my application UI is web based. So instead of running a full fledged browser will something like webkit-gtk wrapper of some sort would do the job just fine?

Essentially I am loading localhost:3002 in the browser. So perhaps there is an easy way to package my UI for ARM6 than just trying to include a common browser that has a lot more stuff than simple rendering of webpage. I do need WebRTC support, not sure if that kinda forces me to run a full fledged browser though. Thoughts?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12404
Re: Firefox for piCore 11
« Reply #35 on: July 21, 2020, 10:32:14 PM »
You could try /usr/local/lib/webkit2gtk-4.0/MiniBrowser from webkitgtk4?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10273
Re: Firefox for piCore 11
« Reply #36 on: July 22, 2020, 12:08:56 AM »
WebRTC is such a new feature you may be out of options.
The only barriers that can stop you are the ones you create yourself.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 8122
Re: Firefox for piCore 11
« Reply #37 on: July 22, 2020, 06:05:49 AM »
Hi ashfame
I just glanced through them, but maybe some of these will be of interest:
https://github.com/EricssonResearch/openwebrtc/issues/403
http://www.linux-projects.org/    This one mentions using Pi Zero near the bottom of the page.
https://www.raspberrypi.org/forums/viewtopic.php?t=211124

If you plug this into Google:
Code: [Select]
linux webrtc without browseryou will find it is not an uncommon question.