You are not logged in.

#1 2018-02-14 18:28:30

SpX91
Member
Registered: 2017-12-23
Posts: 34

Intel Stick - SWAP problem

Hi,

I have an Intel Stick with Arch Linux :

Linux 4.15.3-1-ARCH #1 SMP PREEMPT Mon Feb 12 23:01:17 UTC 2018 x86_64 GNU/Linux

Intel stick config :

Processor:

 Intel(R) Atom(TM) x5-Z8330  CPU @ 1.44GHz 

Mem:

MemTotal:        1955840 kB
MemFree:          207456 kB
MemAvailable:     198192 kB
Buffers:            5096 kB
Cached:           229240 kB
SwapCached:          780 kB
Active:           976148 kB
Inactive:         383964 kB
Active(anon):     923584 kB
Inactive(anon):   328616 kB
Active(file):      52564 kB
Inactive(file):    55348 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:        525304 kB
SwapFree:              4 kB
Dirty:             12348 kB
Writeback:             0 kB
AnonPages:       1125020 kB
Mapped:            99716 kB
Shmem:            138720 kB
Slab:              56044 kB
SReclaimable:      23532 kB
SUnreclaim:        32512 kB
KernelStack:        4880 kB
PageTables:        26704 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     1503224 kB
Committed_AS:    3258048 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:     71680 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      272000 kB
DirectMap2M:     1736704 kB

Disk:

Filesystem      Size  Used Avail Use% Mounted on
dev             936M     0  936M   0% /dev
run             955M  1.1M  954M   1% /run
/dev/mmcblk0p2   28G  5.5G   21G  22% /
tmpfs           955M   47M  909M   5% /dev/shm
tmpfs           955M     0  955M   0% /sys/fs/cgroup
tmpfs           955M   28K  955M   1% /tmp
/dev/mmcblk0p1  510M   67M  444M  14% /boot
tmpfs           191M  4.0K  191M   1% /run/user/1000

I have Chromium / Apache and Mysql running, i use this stick for KIOSK mode.

On Ubuntu no problem - no swap
With ArchLinux....SWAP is full usage

arch:

> $ free -m
              total        used        free      shared  buff/cache   available
Mem:           1910        1435         202         129         271         235
Swap:           512         512           0

ubuntu:

:~$ free -m
              total        used        free      shared  buff/cache   available
Mem:           1927         530         492         220         904        1001
Swap:          1951           0        1951

Any idea ?

Offline

#2 2018-02-14 18:33:08

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: Intel Stick - SWAP problem

SpX91 wrote:

Any idea ?

About what?  Why Ubuntu doesn't use swap properly?  No, these are the wrong forums for that.

Is there an actual problem?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2018-02-14 18:45:01

lo1
Member
Registered: 2017-09-25
Posts: 584

Re: Intel Stick - SWAP problem

Seems like Linux ate your RAM...


Wait a minute...

free -h
              total        used        free      shared  buff/cache   available
Mem:           3,3G        698M        2,1G         11M        602M        2,2G
Swap:            0B          0B          0B

I think I have some problems here ¯\_(ツ)_/¯

Last edited by lo1 (2018-02-14 18:49:50)

Offline

#4 2018-02-14 18:51:44

SpX91
Member
Registered: 2017-12-23
Posts: 34

Re: Intel Stick - SWAP problem

Trilby wrote:
SpX91 wrote:

Any idea ?

About what?  Why Ubuntu doesn't use swap properly?  No, these are the wrong forums for that.

Is there an actual problem?

Why arch is using 100% of SWAP memory ?

If is 100% i think i need more than 512MB ?

Offline

#5 2018-02-14 18:59:10

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: Intel Stick - SWAP problem

SpX91 wrote:

Why arch is using 100% of SWAP memory

Because that's what it's for.  You enabled swap, right?  You didn't enable it in order for it to not be used.

Again, is there an actual problem?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2018-02-14 19:17:50

SpX91
Member
Registered: 2017-12-23
Posts: 34

Re: Intel Stick - SWAP problem

Trilby wrote:
SpX91 wrote:

Why arch is using 100% of SWAP memory

Because that's what it's for.  You enabled swap, right?  You didn't enable it in order for it to not be used.

Again, is there an actual problem?

In my books ... the Swap is used only if the physical memory is full? That's right ?
In any case on Debian and Ubuntu it works like that, is it different with Arch?

Offline

#7 2018-02-15 13:44:21

SpX91
Member
Registered: 2017-12-23
Posts: 34

Re: Intel Stick - SWAP problem

So on Arch is normal to have SWAP ?

Regards,

Offline

#8 2018-02-15 14:23:17

null
Member
Registered: 2009-05-06
Posts: 398

Re: Intel Stick - SWAP problem

Nope. It depends on your configuration

Last edited by null (2018-02-15 14:24:12)

Offline

#9 2018-02-15 14:58:44

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: Intel Stick - SWAP problem

SpX91 wrote:

So on Arch is normal to have SWAP?

On arch it is normal for each user to configure their system to their own preferences.  Some enable swap, some don't.  Some that enable swap have high swapiness settings, others have low.

The only thing not normal on Arch is for it to be exactly identical to Ubuntu.  If you want something exactly identical to Ubuntu, then use Ubuntu.  If you want to configure your own system the way you like, then configure it the way you like.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2018-02-16 18:28:52

SpX91
Member
Registered: 2017-12-23
Posts: 34

Re: Intel Stick - SWAP problem

Trilby wrote:
SpX91 wrote:

So on Arch is normal to have SWAP?

On arch it is normal for each user to configure their system to their own preferences.  Some enable swap, some don't.  Some that enable swap have high swapiness settings, others have low.

The only thing not normal on Arch is for it to be exactly identical to Ubuntu.  If you want something exactly identical to Ubuntu, then use Ubuntu.  If you want to configure your own system the way you like, then configure it the way you like.

Good answer, but my initial question is....if SWAP is use....(in my books) Is because Physical Memory is FULL ? So it's use SWAP to add another memory option ?

That true ?

Offline

#11 2018-02-16 19:03:33

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: Intel Stick - SWAP problem

I'm sorry, I can't understand any of your last questions.  Swap can certainly be in use without physical memory being full.  You may want to read the answers here:

https://askubuntu.com/questions/157793/ … ram#157809


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#12 2018-02-16 20:02:59

SpX91
Member
Registered: 2017-12-23
Posts: 34

Re: Intel Stick - SWAP problem

Trilby wrote:

I'm sorry, I can't understand any of your last questions.  Swap can certainly be in use without physical memory being full.  You may want to read the answers here:

https://askubuntu.com/questions/157793/ … ram#157809

Thanks,

But right now i have this issues:

[79239.223379] Out of memory: Kill process 999 (chromium) score 357 or sacrifice child
[79239.223451] Killed process 999 (chromium) total-vm:1332596kB, anon-rss:98500kB, file-rss:0kB, shmem-rss:27584kB
> $ free -m
              total        used        free      shared  buff/cache   available
Mem:           1910        1301         237         155         371         319
Swap:           512         268         244
> $ uptime
 15:02:33 up 22:26,  2 users,  load average: 4.10, 3.77, 3.58

Last edited by SpX91 (2018-02-16 20:03:40)

Offline

#13 2018-02-16 20:20:24

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: Intel Stick - SWAP problem

Trilby wrote:

Is there an actual problem?

Ah, about time, so there actually is a problem.

Yes, you have just 2 GB of ram, and chrome was using 1.3GB of that.  It's not surprising you ran out of memory.

You also have a pretty high load average, and rereading your first post, you are trying to run a full LAMP stack and the heaviest most bloated browser out there on a atom processor with 2GB of ram.  That will not likely work.  Why are you running a LAMP stack *and* a browser on this?

If all the content is on the single device, why do you need a client and server?

In any case, the problem isn't a misuse of swap, it's simply that you are throwing way to much heavy processing at underpowered hardware.  Either get better hardware, or simplify your configuration (the latter seems much more practical).

You could increase your swap size, but you'd still run out of memory, then you'd be swapping like mad which would be a significant performance drain.  Further if the swap is on cheap flash (I think this is the case for Intel Sticks), you could risk excessive wear on the storage.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#14 2018-02-16 20:29:17

SpX91
Member
Registered: 2017-12-23
Posts: 34

Re: Intel Stick - SWAP problem

Trilby wrote:
Trilby wrote:

Is there an actual problem?

Ah, about time, so there actually is a problem.

Yes, you have just 2 GB of ram, and chrome was using 1.3GB of that.  It's not surprising you ran out of memory.

You also have a pretty high load average, and rereading your first post, you are trying to run a full LAMP stack and the heaviest most bloated browser out there on a atom processor with 2GB of ram.  That will not likely work.  Why are you running a LAMP stack *and* a browser on this?

If all the content is on the single device, why do you need a client and server?

In any case, the problem isn't a misuse of swap, it's simply that you are throwing way to much heavy processing at underpowered hardware.  Either get better hardware, or simplify your configuration (the latter seems much more practical).

You could increase your swap size, but you'd still run out of memory, then you'd be swapping like mad which would be a significant performance drain.  Further if the swap is on cheap flash (I think this is the case for Intel Sticks), you could risk excessive wear on the storage.

Thanks for reply, i try the same solution on Arch, before i have Ubuntu on same hardware and never have OOM.

So that's why I ask the question if it's normal on Arch to have so many SWAP and use system, on Ubuntu same thing I do not have this problem.

I use a LAMP because I want to read local content with Chrome, in case the stick has no internet content remains local, it's a stick for KIOSK.

Offline

#15 2018-02-16 21:03:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: Intel Stick - SWAP problem

SpX91 wrote:

So that's why I ask the question if it's normal on Arch to have so many SWAP and use system, on Ubuntu same thing I do not have this problem.

And you ran all this software with Ubuntu?  I doubt that could work.

SpX91 wrote:

I use a LAMP because I want to read local content with Chrome, in case the stick has no internet content remains local, it's a stick for KIOSK.

You do not need a server to view local content in chrome.  Just use file://...


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#16 2018-02-17 04:05:45

SpX91
Member
Registered: 2017-12-23
Posts: 34

Re: Intel Stick - SWAP problem

Trilby wrote:
SpX91 wrote:

So that's why I ask the question if it's normal on Arch to have so many SWAP and use system, on Ubuntu same thing I do not have this problem.

And you ran all this software with Ubuntu?  I doubt that could work.

SpX91 wrote:

I use a LAMP because I want to read local content with Chrome, in case the stick has no internet content remains local, it's a stick for KIOSK.

You do not need a server to view local content in chrome.  Just use file://...

I confirm i use same software :

xxx@xxx:~$ free -m
              total        used        free      shared  buff/cache   available
Mem:           1927         563         252         419        1111         742
Swap:          1951           0        1951
xxx@xxx:~$ uptime
 23:02:29 up 2 days, 13:56,  2 users,  load average: 2.44, 2.54, 2.63
xxx@xxx:~$ uname -a
Linux xxx 4.11.12-041112-generic #201707210350 SMP Fri Jul 21 07:53:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
xxx@xxx:~$ pstree
systemd─┬─NetworkManager─┬─dhclient
        │                ├─dnsmasq
        │                ├─{gdbus}
        │                └─{gmain}
        ├─accounts-daemon─┬─{gdbus}
        │                 └─{gmain}
        ├─acpid
        ├─agetty
        ├─apache2───9*[apache2]
        ├─atd
        ├─avahi-daemon───avahi-daemon
        ├─chrome─┬─2*[cat]
        │        ├─chrome─┬─chrome───chrome─┬─{AudioOutputDevi}
        │        │        │                 ├─{Chrome_ChildIOT}
        │        │        │                 ├─3*[{CompositorTileW}]
        │        │        │                 ├─{Compositor}
        │        │        │                 ├─{GpuMemoryThread}
        │        │        │                 ├─3*[{Media}]
        │        │        │                 ├─{Renderer::FILE}
        │        │        │                 ├─{ScriptStreamerT}
        │        │        │                 ├─{TaskSchedulerRe}
        │        │        │                 ├─{TaskSchedulerSe}
        │        │        │                 ├─2*[{WorkerPool/2972}]
        │        │        │                 └─2*[{WorkerPool/2973}]
        │        │        └─nacl_helper
        │        ├─{AudioThread}
        │        ├─3*[{BrowserBlocking}]
        │        ├─{BrowserWatchdog}
        │        ├─{Chrome_CacheThr}
        │        ├─{Chrome_ChildIOT}
        │        ├─{Chrome_DBThread}
        │        ├─{Chrome_FileThre}
        │        ├─{Chrome_FileUser}
        │        ├─{Chrome_HistoryT}
        │        ├─{Chrome_IOThread}
        │        ├─{Chrome_InProcGp}
        │        ├─{Chrome_ProcessL}
        │        ├─{CompositorTileW}
        │        ├─{CrShutdownDetec}
        │        ├─{D-Bus thread}
        │        ├─{IndexedDB}
        │        ├─{NetworkChangeNo}
        │        ├─4*[{SimpleCacheWork}]
        │        ├─2*[{TaskSchedulerBa}]
        │        ├─2*[{TaskSchedulerFo}]
        │        ├─{TaskSchedulerSe}
        │        ├─{WorkerPool/2250}
        │        ├─{chrome}
        │        ├─{extension_crash}
        │        ├─{gdbus}
        │        ├─{gmain}
        │        ├─{inotify_reader}
        │        ├─{renderer_crash_}
        │        ├─{sandbox_ipc_thr}
        │        └─{threaded-ml}
        ├─cron
        ├─2*[dbus-daemon]
        ├─dbus-launch
        ├─gpsd
        ├─irqbalance
        ├─lightdm─┬─Xorg───{InputThread}
        │         ├─lightdm─┬─openbox───ssh-agent
        │         │         ├─{gdbus}
        │         │         └─{gmain}
        │         ├─{gdbus}
        │         └─{gmain}
        ├─mysqld───29*[{mysqld}]
        ├─ntpd
        ├─polkitd─┬─{gdbus}
        │         └─{gmain}
        ├─pulseaudio───{alsa-sink-HdmiL}
        ├─rsyslogd─┬─{in:imklog}
        │          ├─{in:imuxsock}
        │          └─{rs:main Q:Reg}
        ├─rtkit-daemon───2*[{rtkit-daemon}]
        ├─ssh
        ├─sshd───sshd───sshd───bash───pstree
        ├─systemd───(sd-pam)
        ├─systemd-journal
        ├─systemd-logind
        ├─systemd-udevd
        ├─thermald───{thermald}
        ├─whoopsie─┬─{gdbus}
        │          └─{gmain}
        ├─wpa_supplicant
        └─xbindkeys

No OOM on ubuntu.

So i dont understand why is different for Arch sad

Offline

#17 2018-02-19 13:28:50

SpX91
Member
Registered: 2017-12-23
Posts: 34

Re: Intel Stick - SWAP problem

Ok guys...update !!!!

I have find my problem for memory high load.

I have tune mysql and apache2 but to high for the STICK intel.

So i have return to default setting and now this is the new memory load :

 free -m
              total        used        free      shared  buff/cache   available
Mem:           1910         871         286         170         752         713
Swap:           512           2         510
 uptime
 08:24:58 up 18:01,  2 users,  load average: 3.69, 3.79, 3.90

For the high Load average, i dont know why is high.

I have try to launch apps by apps to verify usage.

and this is the htop :

htop.png

Regards,

Offline

#18 2018-02-20 14:02:18

SpX91
Member
Registered: 2017-12-23
Posts: 34

Re: Intel Stick - SWAP problem

Another update,

I have reduce my load average with add more switch to chromium

--disable-gpu-driver-bug-workarounds \
--enable-native-gpu-memory-buffers \

Now is better smile

Thanks for help,
Regards,

Last edited by SpX91 (2018-02-20 14:03:00)

Offline

Board footer

Powered by FluxBB