User avatar
DougieLawson
Posts: 34168
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Sat Dec 31, 2016 3:52 pm

jamesh wrote:What I have taken away from this thread is that Dougie has a twin brother - that means THERE ARE TWO OF THEM!
My brother Cliff is a massive poster on the AVRfreaks forum. He also worked for Alan Sugar for 25 years.

He's a fraternal twins, so no more like any other normal pair of brothers. It's the monozygote twins that are extremely weird.
Note:The use of baseball bats for educational purposes is completely disallowed on this forum.

Any DMs sent on Twitter will be answered next month.

User avatar
PeterO
Posts: 4296
Joined: Sun Jul 22, 2012 4:14 pm

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Sat Dec 31, 2016 4:12 pm

Heater wrote:That's right.

We had a teletype in technical college back in '74. Used for our programming classes. It had a "HERE IS" key. Nobody knew what it was for. It did nothing when you pressed it.
One of the Creed 7 teleprinters we had at school would send "BENUE VOLTA LDN" when it received a "WRU" (Who aRe yoU) character. We never did find out who Benue Volta were, but the phrase became on of those "lost in the mists of time" things that stick in your memory for no good reason !

The device that generated the reply was called a "porcupine". It was a small drum with spikes on it that pressed against the five keyboard code bars as it slowly rotated. Pushing the code bars simulated the keys on the keyboard being pressed by an operator.
You can see it just above and to the right of the red lamp in this picture of a Creed 7 teleprinter.
http://zenphoto.heiserhollow.net/index. ... y-5123.jpg

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

W. H. Heydt
Posts: 9254
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Sat Dec 31, 2016 5:51 pm

DougieLawson wrote: He's a fraternal twins, so no more like any other normal pair of brothers. It's the monozygote twins that are extremely weird.
So he was your womb mate.

W. H. Heydt
Posts: 9254
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Sat Dec 31, 2016 5:55 pm

Heater wrote:That's right.

We had a teletype in technical college back in '74. Used for our programming classes. It had a "HERE IS" key. Nobody knew what it was for. It did nothing when you pressed it.
PuTTY has a setting for an answer back when it receives a Ctrl-E. Default is "PuTTY".

peterlite
Posts: 720
Joined: Sun Apr 17, 2016 4:00 am

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Sat Dec 31, 2016 10:50 pm

Dougie's mum created a RAID 1 child. :geek: :geek:

Heater
Posts: 10300
Joined: Tue Jul 17, 2012 3:02 pm

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Sat Dec 31, 2016 11:52 pm

W. H. Heydt,
PuTTY has a setting for an answer back when it receives a Ctrl-E. Default is "PuTTY".
Wow, always wondered what ENQ (Ctrl-E.) was for!

I'm very sure our old teletypes did not respond to that.

ASCII is full of weird stuff. Now we have Unicode with thousands of times more weird stuff. Like the "Pile of poo" character. No, seriously.

User avatar
ric96
Posts: 1253
Joined: Sun Mar 17, 2013 6:03 am
Location: NOIDA, India
Contact: Website

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Thu Mar 16, 2017 10:27 pm

back to this sensitive topic,
looks like zram solves the issue, I created 4x256mb zram swap spaces (not that i needed that much). Then againg ran the qt5 source c./configure test and ended up with ~7min straight from 362min.
Video of me doing so if you are interested: https://www.youtube.com/edit?o=U&video_id=CJ4VAelq-wE

But what i wanted to understand is what are the major drawback and why not implement a 100mb or more zram swap rather than the default sdcard swap in raspbian?
My apologies for shameless YouTube Plugs...
youtube.com/sahajsarup
twitter @sahajsarup
skype srics1996
e-mail: [email protected]
Blog: http://www.geektillithertz.com/wordpress
Web: http://www.geektillithertz.com

Gadgetguy
Posts: 81
Joined: Fri Aug 15, 2014 2:55 am

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Fri Mar 17, 2017 8:33 am

Further to:

" by ric96 » Thu Mar 16, 2017 10:27 pm
back to this sensitive topic,
looks like zram solves the issue"


I have wandered into this thread after seeing ric96's recent youtube video referred to above, enttitled
“ Increasing RAM Capacity on Raspberry Pi using zRAM. Does It Work? “
My primary use of my Raspberry pi 2 up to this point has been to hook it up to my hdmi tv for light web browsing, watching video's, listening to audio and internet radio etc. And I have generally been pleased and satisfied. When using a modern windows computer with ample ram one gets spoiled, opening a plethora of javascript infested web pages in multiple tabs without too much strain. Attemting to replicate this (bad?) habit on a pi leads to slowdowns, freezes and frustrations. I have attributed this behaviour- I assume correctly - to the limited memory resources of our beloved(?) little computer. So it was with hopeful anticipation that I tried ric96's script found at:

https://github.com/ric96/zram_rpi3


If I understand correctly running the pi with this script or hack enabled has the effect of providing signifigantly more usable ram ( up to 2gb?) albeit at the cost of slightly increased cpu usage . After trying the script for a little while with ric96's easy to follow instructions (even for this linux novitiate) my subjective experience seemed to bear this out. It appeared I could open signifigantly more tabs than usual with some multi-tasking of video and audio. The cpu usage on my pi 2 did appear noticeably higher according to the resource monitor but without too many noticeable adverse effects perhaps running a little more sluggishly (I'm not sure). The pi's temperature did not seem to increase.. Presumably the script would have even more benefit on a pi 3 since it has a little more cpu speed to sacrifice. I have my pi2 overclocked to 1000. Ric96 refers to this script as being a bit of an experiment and indicates it as particulary useful for difficult compiling tasks.
My questions to Ric96 are: does he see this script as useful for web browsing scenarios and general usage? What are the advantages and disadvantages? Can the script be better optimized particulary for web browsing ? Does he plan to further develop, refine or enhance this script or has it already acheieved a level of perfection so beautiful to behold that it cannot possibly be improved? In other words should I keep using it?

Pursuant to an earlier thread:

viewtopic.php?f=63&t=164359&p=1061307&h ... 7#p1061307

I have followed G. Kreidl's advice therein and reduced swapping by setting
sysctl vm.swappiness=1



Does this setting of swappiness effect the usefulness of this script for better or worse? Should I change the setting? My /etc/dphys-swapfile has been left at the default of 100 meg. Should this be changed? Sorry, if these questions seem elementary or stupid but as noted I am pretty much a novice and am seeing things but through a glass darkly so to speak.

PS.
Since this thread is in the off-topic section of the forum how much benefit would I see in web browsing performance by getting a pi 3. My Pi 2 is overclocked arm core gpu etc. I really don't use wireless or bluetooth much and I already have dongles?

Heater
Posts: 10300
Joined: Tue Jul 17, 2012 3:02 pm

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Fri Mar 17, 2017 9:13 am

What is that Qt5 test you did exactly?

Back in the wheezy days I compiled Qt5 from source on an original Pi. I could not get the build to finish without providing a swap file. That was horrible slow on SD card. I ended up putting all the source files, target directory and swap file on an NFS share from my PC.

The build still took two days...

I have to try out this zram idea.

User avatar
ric96
Posts: 1253
Joined: Sun Mar 17, 2013 6:03 am
Location: NOIDA, India
Contact: Website

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Fri Mar 17, 2017 12:10 pm

Heater wrote:What is that Qt5 test you did exactly?

Back in the wheezy days I compiled Qt5 from source on an original Pi. I could not get the build to finish without providing a swap file. That was horrible slow on SD card. I ended up putting all the source files, target directory and swap file on an NFS share from my PC.

The build still took two days...

I have to try out this zram idea.
on this guide https://wiki.qt.io/Native_Build_of_Qt5_ ... spberry_Pi
apt-get required package. and then jump to the ./configure after exporting "MAKEFLAGS="-j4"
before swapping around 360min, after zram ~7min.
My apologies for shameless YouTube Plugs...
youtube.com/sahajsarup
twitter @sahajsarup
skype srics1996
e-mail: [email protected]
Blog: http://www.geektillithertz.com/wordpress
Web: http://www.geektillithertz.com

User avatar
ric96
Posts: 1253
Joined: Sun Mar 17, 2013 6:03 am
Location: NOIDA, India
Contact: Website

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Fri Mar 17, 2017 12:12 pm

Gadgetguy wrote:Further to:

" by ric96 » Thu Mar 16, 2017 10:27 pm
back to this sensitive topic,
looks like zram solves the issue"


I have wandered into this thread after seeing ric96's recent youtube video referred to above, enttitled
“ Increasing RAM Capacity on Raspberry Pi using zRAM. Does It Work? “
My primary use of my Raspberry pi 2 up to this point has been to hook it up to my hdmi tv for light web browsing, watching video's, listening to audio and internet radio etc. And I have generally been pleased and satisfied. When using a modern windows computer with ample ram one gets spoiled, opening a plethora of javascript infested web pages in multiple tabs without too much strain. Attemting to replicate this (bad?) habit on a pi leads to slowdowns, freezes and frustrations. I have attributed this behaviour- I assume correctly - to the limited memory resources of our beloved(?) little computer. So it was with hopeful anticipation that I tried ric96's script found at:

https://github.com/ric96/zram_rpi3


If I understand correctly running the pi with this script or hack enabled has the effect of providing signifigantly more usable ram ( up to 2gb?) albeit at the cost of slightly increased cpu usage . After trying the script for a little while with ric96's easy to follow instructions (even for this linux novitiate) my subjective experience seemed to bear this out. It appeared I could open signifigantly more tabs than usual with some multi-tasking of video and audio. The cpu usage on my pi 2 did appear noticeably higher according to the resource monitor but without too many noticeable adverse effects perhaps running a little more sluggishly (I'm not sure). The pi's temperature did not seem to increase.. Presumably the script would have even more benefit on a pi 3 since it has a little more cpu speed to sacrifice. I have my pi2 overclocked to 1000. Ric96 refers to this script as being a bit of an experiment and indicates it as particulary useful for difficult compiling tasks.
My questions to Ric96 are: does he see this script as useful for web browsing scenarios and general usage? What are the advantages and disadvantages? Can the script be better optimized particulary for web browsing ? Does he plan to further develop, refine or enhance this script or has it already acheieved a level of perfection so beautiful to behold that it cannot possibly be improved? In other words should I keep using it?

Pursuant to an earlier thread:

viewtopic.php?f=63&t=164359&p=1061307&h ... 7#p1061307

I have followed G. Kreidl's advice therein and reduced swapping by setting
sysctl vm.swappiness=1



Does this setting of swappiness effect the usefulness of this script for better or worse? Should I change the setting? My /etc/dphys-swapfile has been left at the default of 100 meg. Should this be changed? Sorry, if these questions seem elementary or stupid but as noted I am pretty much a novice and am seeing things but through a glass darkly so to speak.

PS.
Since this thread is in the off-topic section of the forum how much benefit would I see in web browsing performance by getting a pi 3. My Pi 2 is overclocked arm core gpu etc. I really don't use wireless or bluetooth much and I already have dongles?
My suggestion would be to try it out yourself and for you specific use case.
My apologies for shameless YouTube Plugs...
youtube.com/sahajsarup
twitter @sahajsarup
skype srics1996
e-mail: [email protected]
Blog: http://www.geektillithertz.com/wordpress
Web: http://www.geektillithertz.com

Heater
Posts: 10300
Joined: Tue Jul 17, 2012 3:02 pm

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Fri Mar 17, 2017 2:07 pm

I think those are a slightly updated version of the Qt5 building instructions I followed. Much the same anyway. Took forever on the old Pi. I have not tried building Qt on a Pi 3 yet.

runboy93
Posts: 339
Joined: Tue Feb 28, 2017 1:17 pm
Location: Finland
Contact: Website

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Thu Jun 15, 2017 12:43 pm

IMO zram could be enabled by default on RPi, I don't understand why it's not enabled by default D:

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20944
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Thu Jun 15, 2017 1:12 pm

runboy93 wrote:IMO zram could be enabled by default on RPi, I don't understand why it's not enabled by default D:
It is, isn't it, or at least, its built in ready to be used if you turn it on (loadable module)?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

User avatar
ric96
Posts: 1253
Joined: Sun Mar 17, 2013 6:03 am
Location: NOIDA, India
Contact: Website

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Thu Jun 15, 2017 1:14 pm

jamesh wrote:
runboy93 wrote:IMO zram could be enabled by default on RPi, I don't understand why it's not enabled by default D:
It is, isn't it, or at least, its built in ready to be used if you turn it on (loadable module)?
I think runboy93 means enabled by default as swap instead of using swap from sdcard.
My apologies for shameless YouTube Plugs...
youtube.com/sahajsarup
twitter @sahajsarup
skype srics1996
e-mail: [email protected]
Blog: http://www.geektillithertz.com/wordpress
Web: http://www.geektillithertz.com

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20944
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Thu Jun 15, 2017 2:17 pm

ric96 wrote:
jamesh wrote:
runboy93 wrote:IMO zram could be enabled by default on RPi, I don't understand why it's not enabled by default D:
It is, isn't it, or at least, its built in ready to be used if you turn it on (loadable module)?
I think runboy93 means enabled by default as swap instead of using swap from sdcard.
Because that would be a waste of main memory?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

cjan
Posts: 623
Joined: Sun May 06, 2012 12:00 am

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Fri Jun 16, 2017 9:08 am

does need swapoff default 100M swap first, if test zram?

Heater
Posts: 10300
Joined: Tue Jul 17, 2012 3:02 pm

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Fri Jun 16, 2017 9:20 am

cjan,
does need swapoff default 100M swap first, if test zram?
Sorry, I don't understand what you have written there. Is that a statement or a question or what?


User avatar
PeterO
Posts: 4296
Joined: Sun Jul 22, 2012 4:14 pm

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Fri Jun 16, 2017 9:35 am

"I have four cores so I need four zram devices" seems like a non sequitur.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),Aeromodelling,1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

W. H. Heydt
Posts: 9254
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Sun Jun 18, 2017 4:07 am

PeterO wrote:"I have four cores so I need four zram devices" seems like a non sequitur.

PeterO
One might think the most reasonable reply would be, "but you only have one operating system."

User avatar
Gavinmc42
Posts: 2208
Joined: Wed Aug 28, 2013 3:31 am

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Sun Jun 18, 2017 4:27 am

One might think the most reasonable reply would be, "but you only have one operating system."
Or, "Hey I have 4 cores, why not run 4 OS's?"
Only one memory interface :(
32KB cache, hmm 32KB OS?
512KB second level cache?

Is there an OS that will fit in that 32KB?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
ric96
Posts: 1253
Joined: Sun Mar 17, 2013 6:03 am
Location: NOIDA, India
Contact: Website

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Sun Jun 18, 2017 4:30 am

https://unix.stackexchange.com/question ... m-and-swap
I'll leave this here...
PeterO wrote:"I have four cores so I need four zram devices" seems like a non sequitur.

PeterO
My apologies for shameless YouTube Plugs...
youtube.com/sahajsarup
twitter @sahajsarup
skype srics1996
e-mail: [email protected]
Blog: http://www.geektillithertz.com/wordpress
Web: http://www.geektillithertz.com

User avatar
rpdom
Posts: 12954
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Sun Jun 18, 2017 9:10 am

ric96 wrote:https://unix.stackexchange.com/question ... m-and-swap
I'll leave this here...
PeterO wrote:"I have four cores so I need four zram devices" seems like a non sequitur.

PeterO
That only relates to kernels prior to 3.15. That is ancient history.
https://wiki.gentoo.org/wiki/Zram
Prior to kernel 3.15, each zram device contains it's own compression buffer, memory pools and other metadata as well as per-device locks. This can become a serious bottleneck for multi-core machines. To work around this problem, zram is capable of initializing multiple devices. For this reason, the recommended amount of devices for swap is 1 per cpu core for kernels prior to 3.15.

User avatar
ric96
Posts: 1253
Joined: Sun Mar 17, 2013 6:03 am
Location: NOIDA, India
Contact: Website

Re: Raspberry Pi 3 with 2GB RAM playing the devil's advocate

Sun Jun 18, 2017 9:51 am

rpdom wrote:
ric96 wrote:https://unix.stackexchange.com/question ... m-and-swap
I'll leave this here...
PeterO wrote:"I have four cores so I need four zram devices" seems like a non sequitur.

PeterO
That only relates to kernels prior to 3.15. That is ancient history.
https://wiki.gentoo.org/wiki/Zram
Prior to kernel 3.15, each zram device contains it's own compression buffer, memory pools and other metadata as well as per-device locks. This can become a serious bottleneck for multi-core machines. To work around this problem, zram is capable of initializing multiple devices. For this reason, the recommended amount of devices for swap is 1 per cpu core for kernels prior to 3.15.
Old habits die hard lol. But I'll keep the script as is, I have other SBCs running on ancient kernel.
My apologies for shameless YouTube Plugs...
youtube.com/sahajsarup
twitter @sahajsarup
skype srics1996
e-mail: [email protected]
Blog: http://www.geektillithertz.com/wordpress
Web: http://www.geektillithertz.com

Return to “Off topic discussion”