On Tue, Oct 15, 2024 at 10:14:42AM +0200, Christian Schulte wrote:
> On 10/15/24 09:51, Christian Schulte wrote:
> > On 10/14/24 15:49, Stuart Henderson wrote:
> >> On 2024-10-14, Christian Schulte <c...@schulte.it> wrote:
> >>> On 10/14/24 10:33, Stuart Henderson wrote:
> >>>> On 2024-10-12, Christian Schulte <c...@schulte.it> wrote:
> >>>>>     Take i386. Compile it with something -march=i686 or pentiumpro by
> >>>>> default. That's it. Add support for the various PAE MMU options.
> >>>>
> >>>> "That's it". "Add support for". Do you really think it's a thing simple
> >>>> enough to sum up in a few words?
> >>>
> >>> That "add support for the various PAE MMU options" is not just a few
> >>> words, of course. Waste of time? Maybe. If 4GB is not enough upgrade the
> >>> hardware and run amd64.
> >>>
> >>>>
> >>>> Last time steps in this direction were attempted, i386 was subtly broken
> >>>> on AMD CPUs for months.
> >>>>
> >>>>>       My current daily is a Lenovo x240 with 8GB of RAM running amd64
> >>>>> and this thing is swapping like mad. Throw a 32 bit OS at it supporting
> >>>>> those 8GB of RAM and go for it. Why would anyone throw away such a
> >>>>> machine, just because a 64 bit OS hits its boundaries, when a 32 bit OS
> >>>>> would not?
> >>>>
> >>>> And then ASLR would be seriously limited, because of the low amount of
> >>>> address space per process. And it's hard to predict how usable it would
> >>>> actually be, especially on an OS that uses PIE widely, due to the lower
> >>>> number of registers.
> >>>>
> >>>
> >>> Running i386 on a CPU supporting amd64 makes no sense, I admit.
> >>
> >> i386 snapshot packages would take a _lot_ longer to build if I had to do
> >> that on hardware which does not support amd64...
> >>
> >>>                                                                 Last
> >>> time running i386 is more than a decade ago. Step one for me currently is:
> >>>
> >>> 1. Am I the only one experiencing this 8GB of RAM is not enough for an
> >>> amd64 laptop just because Firefox with a few open tabs and Thunderbird
> >>> running in parallel will make it swap? The answer seems to be yes. Quite
> >>> confused right now. I upgraded RAM from 4GB to
> >>>
> >>> spdmem0 at iic0 addr 0x50: 8GB DDR3 SDRAM PC3-12800 SO-DIMM
> >>>
> >>> two weeks ago. That's why the subject caught my attention. Still swaps
> >>> but cannot add more than 8GB to that machine. What now? Have some fun
> >>> with KiCAD? No - buy a new laptop. How on earth can 8GB physical RAM not
> >>> be enough for browsing the web and doing email? I must be doing
> >>> something seriously wrong.
> >>
> >> Running Firefox and Thunderbird simultaneously is probably asking
> >> a lot from 8GB.
> >>
> >> I wouldn't consider less than 16GB for a laptop now. For that,
> >> Thinkpad-wise you'll need at least X250 (if you can find one where
> >> the machine hasn't been destroyed with extreme prejudice due to the
> >> absolutely terrible clunkpad) or more likely X260, if not one of the
> >> newer ones - X240 is single slot and I don't think Intel released a
> >> MRC for the generation of CPUs used in X240 that supports 16GB DIMMs.
> >> (https://en.wikipedia.org/wiki/Memory_Reference_Code)
> >>
> > 
> > I'd first like to find out why this system is swapping at all. I managed
> > to issue top(1) this time, when the system was locked up due to
> > swapping. Here are the readings I could capture - issuing top(1) took
> > nearly a minute to come up:
> > 
> > load averages:  0.04,  0.35,  0.54
> > 
> >                                           x500.schulte.it 09:44:01
> > 70 processes: 68 idle, 2 on processor
> > 
> >                                                 up 4 days 01:17:15
> > CPU0 states:  9.0% user,  0.0% nice,  3.2% sys,  0.2% spin,  1.0% intr,
> > 86.6% idle
> > CPU2 states:  6.9% user,  0.0% nice,  3.5% sys,  0.2% spin,  0.0% intr,
> > 89.4% idle
> > Memory: Real: 2867M/4129M act/tot Free: 3483M Cache: 277M Swap: 718M/4230M
> > 
> > That's more than half a GB of swapped out memory, although there are
> > nearly 4GB of memory reported as free. So why does it start swapping,
> > locking up the whole system from time to time, although there is nearly
> > 4GB of free unwired RAM available?
> > 
> 
> Maybe I did something wrong when still running i386. I always copied my
> home directory over to new systems and moved the hard disk a couple of
> times from one laptop to the other. This is, what I found in my .xession
> file. Last time I touched that file is more than a decade ago when
> running i386.
> 
> x500$ cat .xsession
> LANG="de_DE.UTF-8"
> LC_ALL="de_DE.UTF-8"
> export LANG LC_ALL
> 
> ulimit -d `ulimit -aH | grep data | awk '{print $2}'`
> ulimit -n `ulimit -aH | grep nofiles | awk '{print $2}'`
> ulimit -s `ulimit -aH | grep stack | awk '{print $2}'`
> ulimit -l `ulimit -aH | grep locked | awk '{print $2}'`
> ulimit -m `ulimit -aH | grep memory | awk '{print $2}'`
> ulimit -p `ulimit -aH | grep processes | awk '{print $2}'`
> 
> wmaker
> 
> 
> ulimit -a currently reads:
> 
> x500$ ulimit -a
> time(cpu-seconds)    unlimited
> file(blocks)         unlimited
> coredump(blocks)     unlimited
> data(kbytes)         134217728
                       
That's 128 GB.

> stack(kbytes)        32768
> lockedmem(kbytes)    262144
> memory(kbytes)       7785940
> nofiles(descriptors) 1024
> processes            512
> 
> Still. this does not explain why the system is swapping, although half
> of the physical RAM is not even wired.

Check the rest of top for memory usage per process, or do something like

    $ ps -auxm -o pmem | head

to see which processes are using the most memory.

I have no idea what stating "you can use 128GB of memory on this 8GB RAM
+ 4GB swap machine" does to the system's memory management, but I
wouldn't be surprised if weird things happen.

> 
> -- 
> Christian
> 

-- 
 

Reply via email to