Set it as the homepageBookmark this site

简体中文 繁體中文 English 日本語 Deutsch 한국 사람 بالعربية TÜRKÇE português คนไทย

 Retrieve your password
 Sign up now
img_loading
Intelligent detection

QQ login

Just one step, get started quickly

Search
Ad delivery contact QQ68610888Ad delivery contact QQ68610888
View: 22574|Reply: 65

4530 memory is not enough, increase the swap cache partition

 fire [Copy link]
Post at 2013-11-24 10:31 | Show all floors |Reading mode
This post was last edited by ice5221 on 2013-11-24 13:13

My 4530 ran an ecshop mall, a discuz forum, and just added a remote thunderbolt in the past two days.
The problem of CPU resource shortage is good to say, and it has been solved in a post. See:https://www.right.com.cn/forum/thread-133045-1-1.html
There is no good way to solve the problem of insufficient memory, and the only way to solve it is to add a swap partition.
  1. <blockquote>root@OpenWrt:~# free
Copy the code


free command, we see. By default, there is no swap partition.
So now let's add a swap partition!

  1. <blockquote>root@OpenWrt:~# dd if=/dev/sda1 of=/root/swap bs=1024 count=1024000
Copy the code
The landlord uses an 80G notebook hard disk with a 4530 plus IDE interface, so use the above command to add a 1024M swap partition.
Next, we're going to set up a swap file

  1. root@OpenWrt:~# mkswap /root/swap
  2. Setting up swapspace version 1, size = 1023996 KiB
  3. no label, UUID=8975a384-8114-4e02-83b7-35c05a1a3791
Copy the code

Finally, let's enable this swap
Let him take effect!
  1. root@OpenWrt:~# swapon /root/swap
Copy the code


See how it turns out。。。。。。

  1. root@OpenWrt:~# free -m
  2.                                 total           used                free        shared       buffers
  3. Mem:                      126804        124600          2204             0           17892
  4. -/+ buffers:             106708         20096
  5. Swap:                     1023996             0          1023996
Copy the code

See, we have space now!

But whether it works or not, we'll have to wait a few minutes to see.

  1. root@OpenWrt:~# free
  2.                        total              used             free           shared       buffers
  3. Mem:             126804        123696          3108             0            5332
  4. -/+ buffers:    118364          8440
  5. Swap:            1023996           464       1023532
Copy the code

It's already in effect. I run it for a few days and then come back to supplement the usage.



After actual testing, there is very little use of swap partitions, so
  1. sysctl -w vm.swappiness=90
Copy the code
Use this command to increase the usage of the swap partition.


Only talk about technology, don't talk about politics! (Click for details) | Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.
Post at 2013-11-24 10:39 | Show all floors
Waiting for the tutorial...
Only talk about technology, don't talk about politics! (Click for details) | Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.
Landlord| Posted at 2013-11-24 10:44 | Show all floors
tvrohd on 2013-11-24 10:39
Waiting for the tutorial...

It's done.
Only talk about technology, don't talk about politics! (Click for details) | Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.
Posted at 2013-11-24 10:57 | Show all floors
Is the same command for portable hard drives?
Only talk about technology, don't talk about politics! (Click for details) | Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.
Landlord| Posted at 2013-11-24 10:57 | Show all floors
tvrohd Posted on 2013-11-24 10:57
Is the same command for portable hard drives?

I'm a portable hard drive
Only talk about technology, don't talk about politics! (Click for details) | Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.
Posted at 2013-11-24 10:57 | Show all floors
See if it works
Only talk about technology, don't talk about politics! (Click for details) | Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.
Post at 2013-11-24 11:43 | Show all floors
SEE HOW SWAP SETS UP REST
Only talk about technology, don't talk about politics! (Click for details) | Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.
Landlord| Post at 2013-11-24 11:56 | Show all floors
qiu_jianhui 2013-11-24 11:46
Is this also the case with USB flash drives???

It's all pretty much the same.
Only talk about technology, don't talk about politics! (Click for details) | Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.
Published on 2013-11-24 12:00 | Show all floors
Hidden stickers are not recommended.
Only talk about technology, don't talk about politics! (Click for details) | Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.
Post at 2013-11-24 12:16 | Show all floors
It's all going to be hidden......
Only talk about technology, don't talk about politics! (Click for details) | Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.
Posted on 2013-11-24 12:17 | Show all floors
It's useless, just look at how much you use
Only talk about technology, don't talk about politics! (Click for details) | Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.
Landlord| Post at 2013-11-24 12:19 | Show all floors
frankmm 2013-11-24 12:16
It's all going to be hidden......

If it is not hidden, it will soon be buried.
Only talk about technology, don't talk about politics! (Click for details) | Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.
Landlord| Posted on 2013-11-24 12:20 | Show all floors
frankmm 2013-11-24 12:17
It's useless, just look at how much you use

I also wonder why I use so little.
Only talk about technology, don't talk about politics! (Click for details) | Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.
Posted on 2013-11-24 12:30 | Show all floors
ice5221 2013-11-24 12:20
I also wonder why I use so little.

OP doesn't support swap well. I think that as long as the running program does not quit because of insufficient memory, then there is no need to add memory. However, the things you run do take up more memory
Only talk about technology, don't talk about politics! (Click for details) | Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.
Post at 2013-11-24 13:46 | Show all floors
While thinking, thank you for sharing
Only talk about technology, don't talk about politics! (Click for details) | Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.
You'll need to be logged in to reply to posts login | Sign up now

This version of the points rules

Shut down

Welcome to the Enshan Wireless Forum

Only talk about technology, don't talk about politics! Don't spread rumors! For you and for others.
Only talk about technology, don't talk about politics! (Click for details) Remember not to spread rumors at will, just live your life in peace, for your own good and for the good of everyone. Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.

View »

If in doubt, add an administrator QQ86788181|Mobile version|Little dark house|Archiver|Enshan Wireless Forum (Changzhou Enshan Computer Development Co., Ltd. All rights reserved) ( Su ICP No. 05084872 )

GMT+8, 2025-6-23 00:22

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com

快速回复 返回顶部 返回列表