Jump to content


Server log size

log file size p4vs

  • Please log in to reply
6 replies to this topic

#1 Mihaylov

Mihaylov

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 23 April 2015 - 02:19 PM

Dear Sirs,

We use Perforce server P4D/NTX64/2014.2/978861 (2014/12/19) and four Visual Studio plugins (P4VS P4VS/2014.2.97.6861 or P4VS/2015.1.103.4687) for server connection. We found that server log file is enormous. File size is increased by 20 Mb per day! The size of log file is bigger than the Depot folder size!!!. The log file is filled with lines in the following format:

Perforce server info:
<date time> pid 2928 <username>@<workspace> <user IP> [P4VS/2015.1.103.4687] 'user-fstat -Olhp <File path>

Is there any option to disable the logging of that useless (for us) information?

Best regards,
Stefan Mihaylov

#2 P4Sam

P4Sam

    Advanced Member

  • Members
  • PipPipPip
  • 484 posts
  • LocationSan Francisco, CA

Posted 23 April 2015 - 02:45 PM

What configurables do you have set on the server?  ("p4 configure show")  It sounds like you might have one of the diagnostic flags enabled; normally the log doesn't get that big that quickly.

#3 Mihaylov

Mihaylov

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 23 April 2015 - 03:15 PM

All settings are set by default. I changed the log and auditlog file paths from "\Server" to "\Server\Backup" 5 minute ago.

Command:
    PS D:\perforce\checkpoint> p4 configure show
Result:
P4ROOT=D:\Perforce\Server (set -S)
P4PORT=1666 (set -S)
P4JOURNAL=D:\Perforce\Server\Backup\journal (set -S)
P4NAME=Perforce (services registry)
P4LOG=D:\Perforce\Server\Backup\log (set -S)
P4AUDIT=D:\Perforce\Server\backup\Auditlog (set -S)
p4zk.log.file=p4zk.log (default)
auth.default.method=perforce (default)
zk.connect.timeout=300 (default)
server: 1 (P4DEBUG)

The AuditLog was enabled later, but the log file size become about 100Mb for 20 days.

#4 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 23 April 2015 - 04:40 PM

Hi Stefan,

Sorry that your log size is rapidly growing so big. Thank you for sending your server and P4VS versions right away, along with your configure output.

If it is P4VS causing many fstats, you should try clicking the 'Lazy Load' option, which should alleviate the issue of many fstats on your project files. It was introduced in the version 2015.1 of P4VS. This feature is turned on/off via the menu Tools -> Options -> Source Control -> Perforce General.

The "Lazy Load" feature was designed to cut down load time and general performance on large projects and/or slow connections.  The doc also describes the feature here:

  http://ftp.perforce....s.general.files

The P4VS release notes mention it here under New functionality in 2015.1,
1020819 (Bug 77607) *:

  http://www.perforce....r/p4vsnotes.txt

Please let us know if this helps resolve your issue.

#5 P4Sam

P4Sam

    Advanced Member

  • Members
  • PipPipPip
  • 484 posts
  • LocationSan Francisco, CA

Posted 23 April 2015 - 05:06 PM

View PostMihaylov, on 23 April 2015 - 03:15 PM, said:

server: 1 (P4DEBUG)

There's your culprit.  :)  Unset P4DEBUG to disable the debug log messages.  That should cut way down on future log file growth.

#6 Mihaylov

Mihaylov

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 24 April 2015 - 07:42 AM

Thank you for your prompt reply.

This P4DEBUG setting was set by default during the server installation. I have never changed these settings.

I changed the P4DEBUG setting to "server=0" and the P4VS/P4V logging stopped.
After that I looked for P4VS "lazy load" setting but it was inactive. I only use P4VS ver.2015 to test it, my colleagues use P4VS ver.2014.
We experience some problems using the P4VS, but I will describe them some other time, when I have more free time.

Best regards,
Stefan Mihaylov

#7 Robert Cowham

Robert Cowham

    Advanced Member

  • PCP
  • 271 posts
  • LocationLondon, UK

Posted 24 April 2015 - 11:25 AM

Hi Stefan

Logging isn't always useful, but when you need it it can be a life saver! For keeping an eye on performance etc we (in Perforce consulting) tend to recommend the following:
  • turn logging on - to a higher level (3) which increases log size but allows you to parse the logs and analyze such things as average command response time
  • regularly (e.g. nightly)
    • rotate the logs
    • pruned older logs, e.g. keeping last 7 days worth or some other configurable value
To give you an idea, the Windows SDP has scripts to perform the above, although it requires a particular setup to be enabled. You might find it worth having a look at. See https://swarm.worksh...e-software-sdp/ and also https://swarm.worksh...ide_Windows.pdf

The SDP might be overkill for a small installation, but the ideas are good.

One other thing - I notice you have a P4AUDIT log defined - this is a log which the majority of our customers don't have turned on - and it will also generate reasonable amounts of data. If you have it one, then I suggest you also rotate it and prune older ones on a regular basis.

Regards
Robert
Co-Author of "Learning Perforce SCM", PACKT Publishing, 25 September 2013, ISBN 9781849687645

"It's wonderful to see a new book about Perforce, especially one written by Robert Cowham and Neal Firth. No one can teach Perforce better than these seasoned subject matter experts"
  • Laura Wingerd, author of Practical Perforce, former VP of Product Technology at Perforce





Also tagged with one or more of these keywords: log, file size, p4vs

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users