Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 19 Jun 2018, 18:40
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
XenialDog 64bit (Ubuntu 'Xenial Xerus' LTS, 64-bit)
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 23 of 27 [395 Posts]   Goto page: Previous 1, 2, 3, ..., 21, 22, 23, 24, 25, 26, 27 Next
Author Message
wiak

Joined: 11 Dec 2007
Posts: 856
Location: not Bulgaria

PostPosted: Sun 21 Jan 2018, 21:27    Post subject:  

I maybe should mention that I tend to manage about 12 open gmail tabs with latest firefox on my 2GB RAM machine when using 1GB zram swap. One other method (quickest!) to save from the browser freeze/crash issue is to immediately close a busy tab or two as soon as mouse slowdown is noticed...

wiak
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 856
Location: not Bulgaria

PostPosted: Mon 22 Jan 2018, 02:44    Post subject:  

I still haven't tried zswap on my xenialdog, but though it has disadvantage that it also needs actual swap space allocated it has advantage that the first pages paged out of swap will be the Least Recently Used, whereas most recently used would be better (in my understanding at least). Nice post about zswap performance (much of which might apply to zram) here:

https://www.ibm.com/developerworks/community/blogs/fe313521-2e95-46f2-817d-44a4f27eba32/entry/new_linux_zswap_compression_functionality7?lang=en

But also from that post the comments section is very interesting.

I guess we just have to suck them and see (i.e. try them both out).

Note that you can also use a zram like any other block device. For example you don't need to use it for swap - you can make a filesystem (mkfs) on it and use as a temporary disc in ram.

wiak
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 856
Location: not Bulgaria

PostPosted: Mon 22 Jan 2018, 03:41    Post subject:  

Doing some experiments...

Code:
root@xenial64:~# dmesg | grep zswap
[    0.000000] Command line: noauto from=/xenial64/ changes=EXIT:/xenial64/casper/ zswap.enabled=1 zswap.compressor=lz4
[    0.000000] Kernel command line: noauto from=/xenial64/ changes=EXIT:/xenial64/casper/ zswap.enabled=1 zswap.compressor=lz4
[    3.759855] zswap: compressor lz4 not available, using default lzo
[    3.759911] zswap: loaded using pool lzo/zbud
root@xenial64:~# free
              total        used        free      shared  buff/cache   available
Mem:        1911492       95460     1400088       38080      415944     1608912
Swap:        955744           0      955744


Note how to enable zswap on kernel line of grub4dos menu.lst from above dmesg output. I don't have any other 'actual' swap except zram. I'm wondering how this goes - I'm presuming zram won't be used till zswap compressed cache area filled and maybe Most Recent In First Out will work in stead of zram Last In First Out.

EDIT: Of course, for more conventional zswap use (or combined for experiments with zram) I could create and activate a swap file like the following (also could effectively create it in RAM on Porteus changes folder boot machine by creating it in /root or similar...):

Code:
dd if=/dev/zero of=/mnt/home/swapfile0 bs=1024 count=256k
# could also use 'fallocate -l 256M /mnt/home/swapfile0' command but only works on some filesystem types
chmod 600 /mnt/home/swapfile0
ls -lh /mnt/home/swapfile0 # to check creation size
mkswap /mnt/home/swapfile0
swapon /mnt/home/swapfile0


EDIT: Short answer is that mixing zram with zswap doesn't work so well cos both are taking RAM space (once swapping occurs) but zswap itself isn't actually contributing any additional swap space (unless a swap file or partition is also being used out of RAM, whereupon it might work well, assuming I reduce zram amount proportionally - to be tested...)

Anyway, sorry Fred, this stuff definitely needs thread of its own now...

wiak
Back to top
View user's profile Send private message 
belham2

Joined: 15 Aug 2016
Posts: 1520

PostPosted: Mon 22 Jan 2018, 04:09    Post subject:  

Hi all,

Question: do either zram and/or zswap apply to people who are running more than, say, 1GB of RAM?

Reason I ask, is that I have both desktop machines and laptops I use, and when I go through & do everything to have either zram and/or zswap, I cannot tell one bit of "performance"or "speed" or "efficiency" differences (doing heavy loaded browser tests---multiple tabs and even multiple browsers open) on any of my machines. Even my Atom Intel netbook, with 2GB of RAM and that punk little atom processor, shows very little performance increase (less than 2-3%). And on my 8GB & 16GB RAM machines with old Athlon X2 processors & 7-10 yr old motherboards, there is "zero" performance and "speed" increase.

I've come to the conclusion this zram/zswap benefit is all in our heads, and both zram/zswap are not worth anything. What makes me even more suspicious is the talk on the zram/zswap wiki pages of..well, you know people, listen to us, our zram/zswap will "at least" give longer life (in terms of writes) to your USB and/or SSD drives. That stuff is marketing 101 bullsh!t, every one in the Linuzx industry has known that for years.

Please, I know this is contrary to what some of you say you are seeing with zram/zswap enabled, but I honestly just don't get it. How do you know for sure, other than non-technical "observation" tests now being performed, that zram/zswap is effective. Answer? You don't know for sure, unless you can dis-assemble a kernel (along with the hardware) and test each component individually with zram/zswap enabled vs dis-abled. Linux Torvalds & others debunked this a few years ago concerning zram/zswap.

Another additional observation: if zram and zswap were so effective, why is "neither of them" included in any other linux distro that I know of except for Lubuntu? And even Lubuntu's developers (of which I follow) are talking about abandoning it because it is a "solution" looking for problems that don't exist.

It is my belief to much time is wasted on stuff like this, but hey, what do I know, I am just a lowly user with absolute zero skills, lol.
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 856
Location: not Bulgaria

PostPosted: Mon 22 Jan 2018, 04:26    Post subject:  

belham,

You obviously haven't tried browser load tests (e.g. load multiple tabs with heavy use webpages such as gmail). Browsers such as Chrome or Firefox will crash on 2GB RAM machine with as little as 8 such tabs open. They manage around 12 such tabs open on my machine with zram-config installed. These are not just 'observations' - the memory versus swap-consumed are measurable via top command amongst others. Such work is my profession. It is not about performance increase - it is about more virtual RAM without so much loss of performance conventional swap file or partition would result in.

EDIT: By the way, since zram provides a block device you could also configure it to provide compressed /tmp filesystem, which could also be handy since gives a larger /tmp in RAM filesystem. Maybe even a compressed /mnt/live/memory/changes filesystem... could be very handy for certain types of development work.

wiak

Last edited by wiak on Mon 22 Jan 2018, 04:54; edited 1 time in total
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1506
Location: GERMANY

PostPosted: Mon 22 Jan 2018, 04:54    Post subject:  

Hi Belham !

Quote:
Question: do either zram and/or zswap apply to people who are running more than, say, 1GB of RAM?

Mostly recommended only for Machines with little Ram .
I just relate to Zram .

There are discussions/rumors about , if zram is use-full/less with more than 2 Gigs Ram .Some say using Zram with more than >2Gigs Ram could be counter productive .
It seems a lot of people "believe" to experience some Performance Boost when having little Ram .
Just a Placebo-Effect ?

Nevertheless ..... it seems there is no Disadvantage/Danger when using it on Low-Ram Machines .That`s for sure .

I am using it with additional Swap-Partion .(Seems Zram is used prior to Swap-Partition ) . Zram and Swap-Partiton both can both manually disabled/enabled seperately on Demand during Session.
Sometimes i flush Zram and/or Swap-partition by disabling and re-enabling during Session .Seems to make system work more fluent .
But maybe just my Imagination .
Nevertheless.....does not cost anything ....and seems no Risk in it .

B.T.W.------Feeling a bit uncomfortable highjacking Fred`s Thread with Zram Topic .

Regards !

Last edited by backi on Mon 22 Jan 2018, 05:07; edited 3 times in total
Back to top
View user's profile Send private message 
belham2

Joined: 15 Aug 2016
Posts: 1520

PostPosted: Mon 22 Jan 2018, 04:56    Post subject:  

wiak wrote:
belham,

You obviously haven't tried browser load tests (e.g. load multiple tabs with heavy use webpages such as gmail). Browsers such as Chrome or Firefox will crash on 2GB RAM machine with as little as 8 such tabs open. They manage around 12 such tabs open on my machine with zram-config installed. These are not just 'observations' - the memory versus swap-consumed are measurable via top command amongst others. Such work is my profession. It is not about performance increase - it is about more virtual RAM without so much loss of performance conventional swap file or partition would result in.

EDIT: By the way, since zram provides a block device you could also configure it to provide compressed /tmp filesystem, which could also be handy since gives a larger /tmp in RAM filesystem. Maybe even a compressed /mnt/live filesystem... could be very handy for certain types of development work.

wiak


Wiak,

Do you read "English"?

Read my post again. I've run heavy loaded, multiple browser tests. '

Pay attention, please.

And go read and look at what the major developers of Linux kernels say about zram/zswap.

You're arguing pixie dust fantasies here.

If someone wants to put a bandaid (zram/zswap) on a cut or bruise that doesn't exist, and make themselves "feel" better, that is their perogative.

But don't pretend otherwise.
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 856
Location: not Bulgaria

PostPosted: Mon 22 Jan 2018, 05:00    Post subject:  

backi wrote:

B.T.W.------Feeling a bit uncomfortable highjacking Fred`s Thread with Zram Topic .

Regards !


True, but not really, since such discussion could end up providing DebianDog extra functionality/option especially configured. But, yes, needs own thread since much testing/configuration discussion needed if using outside the simple scenario. No harm of large GB machines either since zram (like standard swap) not normally used at all until swapping begins (at which time it is more performance efficient than slow hard drives or maybe even SSDs, since in RAM - only performance slow down is more CPU cycles for the lzo or lz4 compression/decompression but these are not so slow in practice I feel).

Anyway, main thing is we got zram-config lz4-use systemd configuration sorted out above now.

By the way, since Android 4.4:

Quote:
OEMs building the next generation of Android devices can take advantage of targeted recommendations and options to run Android 4.4 efficiently, even on low-memory devices. Dalvik JIT code cache tuning, kernel samepage merging (KSM), swap to zRAM, and other optimizations help manage memory
Clearly zram is useless belham...

wiak
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1506
Location: GERMANY

PostPosted: Mon 22 Jan 2018, 05:18    Post subject:  

Hi wiak !

Quote:
True, but not really, since such discussion could end up providing DebianDog extra functionality/option especially configured.

You give me some Confidence .
That`s the Way of the Pioneer (Avantegarde).....and that`s the Way it should be .
So....what about opening a separate Thread for Zram Topics.......who makes the first Step ? I am a bit too retentive/conservative .My english is a bit clumpsy .

Last edited by backi on Mon 22 Jan 2018, 05:32; edited 1 time in total
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 856
Location: not Bulgaria

PostPosted: Mon 22 Jan 2018, 05:31    Post subject:  

Just open one backi. I seem to remember you talking about zram long time ago. I just took it up more cos I use it with XenialDog (which is why I've used this thread since I can't guarantee everything I've tried would work on other distributions without extra steps.

wiak
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 856
Location: not Bulgaria

PostPosted: Mon 22 Jan 2018, 05:36    Post subject:  

belham,

Yes, I can read and write and even speak English - I do not speak Bulgarian but wish I did. I have trouble with your 'technical' language however.

I did note your claim you tested zram via loading browser tabs. However, those of us who know such tests realise your claim isn't a good one because loading browser tabs like that eventually needs swap on low RAM systems and the advantage of zram becomes obvious at that stage. You didn't discover that, hence you didn't do your 'browser loading tests' adequately, sorry.

https://www.kernel.org/doc/Documentation/blockdev/zram.txt

wiak

Last edited by wiak on Mon 22 Jan 2018, 05:41; edited 2 times in total
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1506
Location: GERMANY

PostPosted: Mon 22 Jan 2018, 05:37    Post subject:  

It also worked as far as i remember also in Dpup Exprimo .....works also in Tahrpup.....but not in each Puppy...can`t remember exactly.

Thanks for opening seperate Zram Thead .Interesting Topic .

Cheers !
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 856
Location: not Bulgaria

PostPosted: Mon 22 Jan 2018, 06:06    Post subject:  

backi wrote:
It also worked as far as i remember also in Dpup Exprimo .....works also in Tahrpup.....but not in each Puppy...can`t remember exactly.

Thanks for opening seperate Zram Thead .Interesting Topic .

Cheers !


Did you open separate zram thread backi or someone else or are you requesting for such a thread to be opened? Just open one yourself I suggest, or I can if you like. Then we could blank our posts about it here and copy main stuff to new thread? Certainly a lot of zram/zswap issues/ideas to explore.

By the way, I find it useful to make a copy of the /usr/bin/init-zram-swapping bash script (under other name) to make mods to it for testing zram in different configurations and for different uses (e.g. making RAM disks out of it using the likes of mkfs -t ext4 /dev/ram1). When using the systemd service method of using zram you can disable it simply by 'systemctl stop zram-config.service' or by running script '/usr/bin/end-zram-swapping' Can start it again using either 'systemctl start zram-config.service' or by running '/usr/bin/init-zram-swapping'.

wiak
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1506
Location: GERMANY

PostPosted: Mon 22 Jan 2018, 06:55    Post subject:  

Hi wiak !

Can only find interrupted Threads here :
http://www.murga-linux.com/puppy/viewtopic.php?p=762989&sid=db08a762fd04493e58ce731587d507c2

http://www.murga-linux.com/puppy/viewtopic.php?p=972381&sid=5715a3cd0fdb2f8e94e7ab257c2a98a8

http://bkhome.org/news/201701/overlayfs-cannot-handle-zram.html

Think it is better to start separate Zram Thread from Scratch .
Since my English is not so fluent and my technical knowledge and Expression is quite limited ,you would do me a favor if you would open this Thread .But .......don`t hurry..... keep it cool man .
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 856
Location: not Bulgaria

PostPosted: Mon 22 Jan 2018, 08:31    Post subject:  

Okay backi,

Late here where I am, so I'll open thread tomorrow. Mainly cos it would be good to keep the tested/discovered info/ideas together, since it is an interesting/useful topic, in one thread and to free up this xenialdog64 thread of Fred. IMO anyone with 2GB or less of RAM would be advised to use zswap or zram - the benefits are actually obvious to anyone with a brain that still works.

wiak
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 23 of 27 [395 Posts]   Goto page: Previous 1, 2, 3, ..., 21, 22, 23, 24, 25, 26, 27 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0877s ][ Queries: 12 (0.0327s) ][ GZIP on ]