Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-28, 08:33:51

Author Topic: Scavenge  (Read 7638 times)

0 Members and 1 Guest are viewing this topic.

Offline zjsz007

  • Junior Member
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Scavenge
« on: 2013-07-19, 17:42:17 »
How to disable ../bin/scavenge.php
What is scavenge work for ?
Cron daily,Collecquota seem cost lots of IO and CPU.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Scavenge
« Reply #1 on: 2013-07-19, 20:38:00 »
I gave Mustafa full quota solution for scavenge to reduce I/O to almost zero and he didn't use it...
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: Scavenge
« Reply #2 on: 2013-07-24, 21:03:06 »
Quote from: "Spacedust"
I gave Mustafa full quota solution for scavenge to reduce I/O to almost zero and he didn't use it...
Mustafa why did you not use this code?  If it reduces IO that much why have you not included it?
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Scavenge
« Reply #3 on: 2013-07-24, 21:17:38 »
Quota need adjustment in /etc/fstab and most server not use it.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Scavenge
« Reply #4 on: 2013-07-24, 22:01:31 »
Quote from: "MRatWork"
Quota need adjustment in /etc/fstab and most server not use it.

Funny... 99% of hosting servers use quota to control disk usage. We've got about 25 million files on our array and counting this with du -sc would kill the server because of I/O.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: Scavenge
« Reply #5 on: 2013-07-24, 23:24:24 »
I would agree with spacedust on this issue.  I think that quotas are available on most if not all servers - even lowend vps can have quotas turned on by provider.

Why not incorporate quota use with an option to turn it on or off?

If spacedust provided solution, simply leave old code and add a config option to use the new code?

Mustafa please be open minded in all things.

Thank you
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Scavenge
« Reply #6 on: 2013-07-25, 01:00:04 »
Quote from: "chrisf"
I would agree with spacedust on this issue.  I think that quotas are available on most if not all servers - even lowend vps can have quotas turned on by provider.

Why not incorporate quota use with an option to turn it on or off?

If spacedust provided solution, simply leave old code and add a config option to use the new code?

Mustafa please be open minded in all things.

Thank you
It's nothing about 'open mind' but how to make VPS to know quota.

This is /etc/fstab in my VPS:
Code: [Select]
LABEL=root / ext4 defaults,usrquota,grpquota,errors=remount-ro 1 1
none /dev/shm tmpfs defaults,usrquota,grpquota 0 0

You see 'usrquota, grpquota' but quota still not work like running 'quotaon' and 'quotaoff'. Always appear:
 
Code: [Select]
> quotaon -a
quotaon: cannot find //quota.group on /dev/sda1 [/]
quotaon: cannot find //quota.user on /dev/sda1 [/]
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Scavenge
« Reply #7 on: 2013-07-25, 01:12:27 »
Quote
To enable quota, run these commands:

touch /quota.user /quota.group
chmod 600 /quota.*
mount -o remount /

quotacheck -avugm
quotaon -avug
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Scavenge
« Reply #8 on: 2013-07-25, 01:16:03 »
Quote from: "Spacedust"
Quote
To enable quota, run these commands:

touch /quota.user /quota.group
chmod 600 /quota.*
mount -o remount /

quotacheck -avugm
quotaon -avug
Already run this code but still not work!.

Look like VPS not work for quota.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Scavenge
« Reply #9 on: 2013-07-25, 02:03:27 »
Quote from: "MRatWork"
Quote from: "Spacedust"
Quote
To enable quota, run these commands:

touch /quota.user /quota.group
chmod 600 /quota.*
mount -o remount /

quotacheck -avugm
quotaon -avug
Already run this code but still not work!.

Look like VPS not work for quota.

Give me SSH access and I will fix this right away.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: Scavenge
« Reply #10 on: 2013-07-25, 02:50:35 »
You can run that command until you grow old and on openVz unless second level quotas are enabled - nothing.  I ran into this dilema on my machines and fixed it easily.  If you do not run the box (dedi) have your host apply these commands.  I would suggest the users be set to the possible maximum clients for that box.

Turning On and Off Second-Level Quotas for Container

The parameter that controls the second-level disk quotas is
QUOTAUGIDLIMIT in the Container configuration file.
 By default, the value of this parameter is zero and this
corresponds to disabled per-user/group quotas.

If you assign a non-zero value to the
 QUOTAUGIDLIMIT parameter, this action brings about
the two following results:

1. Second-level (per-user and per-group) disk quotas are enabled for
the given Container;
2. The value that you assign to this parameter will be the limit for the
number of file owners and groups of this Container, including
Linux system users. Note that you will theoretically be able to create extra users of this Container, but if the number of file
owners inside the Container has already reached the limit, these
users will not be able to own files.
Enabling per-user/group quotas for a Container requires restarting
the Container. The value for it should be carefully chosen; the
bigger value you set, the bigger kernel memory overhead this
Container creates. This value must be greater than or equal to the
number of entries in the Container /etc/passwd and /etc/group files. Taking into account that a newly created
Red Hat Linux-based CT has about 80 entries in total, the typical
value would be 100. However, for Containers with a large number
of users this value may be increased.
REMEMBER in kloxo - client = user!

The session below turns on second-level quotas for Container 101:
Code: [Select]
# vzctl set 101 --quotaugidlimit 100 --save
Unable to apply new quota values: ugid quota not initialized
Saved parameters for CT 101
# vzctl restart 101
Restarting container
Stopping container ...
Container was stopped
Container is unmounted
Starting container ...
Container is mounted
Adding IP address(es): 192.168.16.123
Setting CPU units: 1000
Configure meminfo: 65536
File resolv.conf was modified
Container start in progress...

Setting Up Second-Level Disk Quota Parameters

In order to work with disk quotas inside a Container, you should
have standard quota tools installed:
Code: [Select]
# vzctl exec 101 rpm -q quota
quota-3.12-5
This command shows that the quota package is installed into the
Container. Use the utilities from this package (as is prescribed in
your Linux manual) to set OpenVZ second-level quotas for the
given CT. For example:
Code: [Select]
# ssh ve101
root@ve101's password:
Last login: Sat Jul 5 00:37:07 2003 from 10.100.40.18
[root@ve101 root]# edquota root
Disk quotas for user root (uid 0):
Filesystem blocks soft hard inodes soft hard
/dev/simfs 38216 50000 60000 45454 70000 70000
[root@ve101 root]# repquota -a
*** Report for user quotas on device /dev/simfs
Block grace time: 00:00; Inode grace time: 00:00
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root — 38218 50000 60000 45453 70000 70000
[the rest of repquota output is skipped]
[root@ve101 root]# dd if=/dev/zero of=test
dd: writing to `test': Disk quota exceeded
23473+0 records in
23472+0 records out
[root@ve101 root]# repquota -a
*** Report for user quotas on device /dev/simfs
Block grace time: 00:00; Inode grace time: 00:00
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root +- 50001 50000 60000 none 45454 70000 70000
[the rest of repquota output is skipped]
The above example shows the session when the root user has the
disk space quota set to the hard limit of 60,000 1Kb blocks and to
the soft limit of 50,000 1Kb blocks; both hard and soft limits for
the number of inodes are set to 70,000.
It is also possible to set the grace period separately for block limits
and inodes limits with the help of the /usr/sbin/setquota
command. For more information on using the utilities from the
quota package, please consult the system administration guide
shipped with your Linux distribution or manual pages included in
the package.

So essentially - you need to issue three commands for the container.  EASY to do and magically all quotas will work on the OpenVZ vps.  Verified :)

Hope this helps Mustafa.  Would really like quota use in Kloxo - fast and real-time disk usage statistics would be available.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Scavenge
« Reply #11 on: 2013-07-25, 03:05:48 »
Try running /script/fixquota
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: Scavenge
« Reply #12 on: 2013-07-25, 03:24:31 »
@spacedust - THERE IS NOTHING that can be done to fix quotas without turning on second level quotas on a vps.

It is disabled by default.  It HAS to be enabled (OpenVZ)

This is easy as I explained above.  If not done you can edit fstab - run fixquotas - whatever, the vps will not work with quotas (OpenVZ) until turned on.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Scavenge
« Reply #13 on: 2013-07-25, 03:36:36 »
Quote from: "chrisf"
@spacedust - THERE IS NOTHING that can be done to fix quotas without turning on second level quotas on a vps.

It is disabled by default.  It HAS to be enabled (OpenVZ)

This is easy as I explained above.  If not done you can edit fstab - run fixquotas - whatever, the vps will not work with quotas (OpenVZ) until turned on.

I was testing on a SolusVM VPS and it was working out of the box ;)
« Last Edit: 1970-01-01, 01:00:00 by Guest »

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo

Page created in 0.047 seconds with 21 queries.

web stats analysis