diff --git a/plugins/php/versions/82/install.sh b/plugins/php/versions/82/install.sh
index 9a0d23516..0de5125d1 100755
--- a/plugins/php/versions/82/install.sh
+++ b/plugins/php/versions/82/install.sh
@@ -55,6 +55,25 @@ if [ "$IS_64BIT" == "64" ];then
OPTIONS="${OPTIONS} --with-libdir=lib64"
fi
+# ----- cpu start ------
+if [ -z "${cpuCore}" ]; then
+ cpuCore="1"
+fi
+
+if [ -f /proc/cpuinfo ];then
+ cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
+fi
+
+MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
+if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
+ if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
+ cpuCore="${MEM_INFO}"
+ fi
+else
+ cpuCore="1"
+fi
+# ----- cpu end ------
+
ZIP_OPTION='--with-zip'
libzip_version=`pkg-config libzip --modversion`
if version_lt "$libzip_version" "0.11.0" ;then
diff --git a/plugins/swap/index.html b/plugins/swap/index.html
index 89601d38f..f479a52ca 100755
--- a/plugins/swap/index.html
+++ b/plugins/swap/index.html
@@ -3,7 +3,7 @@
@@ -12,14 +12,7 @@
\ No newline at end of file
diff --git a/plugins/swap/js/swap.js b/plugins/swap/js/swap.js
new file mode 100755
index 000000000..9262274dd
--- /dev/null
+++ b/plugins/swap/js/swap.js
@@ -0,0 +1,38 @@
+
+
+function swapPost(method, version, args,callback){
+ var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
+
+ var req_data = {};
+ req_data['name'] = 'swap';
+ req_data['func'] = method;
+ req_data['version'] = version;
+
+ if (typeof(args) == 'string'){
+ req_data['args'] = JSON.stringify(toArrayObject(args));
+ } else {
+ req_data['args'] = JSON.stringify(args);
+ }
+
+ $.post('/plugins/run', req_data, function(data) {
+ layer.close(loadT);
+ if (!data.status){
+ //错误展示10S
+ layer.msg(data.msg,{icon:0,time:2000,shade: [10, '#000']});
+ return;
+ }
+
+ if(typeof(callback) == 'function'){
+ callback(data);
+ }
+ },'json');
+}
+
+
+function readme(){
+ var readme = '';
+ readme += '- dd if=/dev/zero of=/www/server/swap/swapfile bs=1M count=2048
';
+ readme += '- mkswap /www/server/swap/swapfile
';
+ readme += '
';
+ $('.soft-man-con').html(readme);
+}