Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samba: build with profiling enabled #82509

Merged
merged 7 commits into from Mar 29, 2020
Merged

samba: build with profiling enabled #82509

merged 7 commits into from Mar 29, 2020

Conversation

Izorkin
Copy link
Contributor

@Izorkin Izorkin commented Mar 13, 2020

Motivation for this change

Add support monitoring with netdata - https://docs.netdata.cloud/collectors/python.d.plugin/samba

Cleanup build configuration and removed unused packages. Checked here - https://wiki.samba.org/index.php/Package_Dependencies_Required_to_Build_Samba

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@Izorkin
Copy link
Contributor Author

Izorkin commented Mar 13, 2020

@GrahamcOfBorg test samba

@Izorkin
Copy link
Contributor Author

Izorkin commented Mar 13, 2020

@GrahamcOfBorg test samba

@bachp
Copy link
Member

bachp commented Mar 14, 2020

@Izorkin What is the impact on performance? Is this something that can be enabled by default without degrading performance to much?

@Izorkin
Copy link
Contributor Author

Izorkin commented Mar 15, 2020

Small check
max cpu load 8.6 download speed ~110Mb/s
max cpu load 8.5 download speed ~110Mb/s

Is there a correct method to check?

@bachp
Copy link
Member

bachp commented Mar 15, 2020

I don't know what the correct methodnto measure this would be, just wanted to check there is not s huge impact.

If you don't see one it's fine with me.

@Izorkin
Copy link
Contributor Author

Izorkin commented Mar 23, 2020

cc @bachp @jtojnar

@jtojnar
Copy link
Contributor

jtojnar commented Mar 23, 2020

The diff is hard to read. Could you format the derivation so that there is one dependency per line without any other changes (e.g. using nixpkgs-fmt), and then rebase this PR onto that?

@Izorkin
Copy link
Contributor Author

Izorkin commented Mar 25, 2020

@jtojnar update PR.

pkgs/servers/samba/4.x.nix Outdated Show resolved Hide resolved
@Izorkin Izorkin force-pushed the samba4 branch 2 times, most recently from 70cac8e to 182bf0d Compare March 28, 2020 13:59
@Izorkin
Copy link
Contributor Author

Izorkin commented Mar 28, 2020

@jtojnar checked PR?

Copy link
Contributor

@jtojnar jtojnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, though I wanted to wait for someone who actually uses this package.

@Izorkin
Copy link
Contributor Author

Izorkin commented Mar 28, 2020

@jtojnar don`t need to squashed PR?

@jtojnar
Copy link
Contributor

jtojnar commented Mar 28, 2020

No need for squashing. When there are non-trivial changes, it is nice to have them split into multiple commits. Not only is that easier to review but also, it will be easier to figure out why each line was introduced in future debugging. More descriptive commit messages would be nice, thought (git rebase --interactive and change pick to reword).

@Izorkin
Copy link
Contributor Author

Izorkin commented Mar 28, 2020

That's correct?

@Izorkin
Copy link
Contributor Author

Izorkin commented Mar 28, 2020

Fixed

iff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix
index ff647cc0a27..1d6951bb8c1 100644
--- a/pkgs/servers/samba/4.x.nix
+++ b/pkgs/servers/samba/4.x.nix
@@ -2,6 +2,8 @@
 , fetchurl
 , python
 , pkgconfig
+, bison
+, flex
 , perl
 , libxslt
 , docbook_xsl
@@ -58,6 +60,8 @@ stdenv.mkDerivation rec {

   nativeBuildInputs = [
     pkgconfig
+    bison
+    flex
     perl
     perl.pkgs.ParseYapp
     libxslt

Copy link
Contributor

@aneeshusa aneeshusa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cherry-picked this locally and was able to run my samba server with these changes. Note that profiling is off by default and has to be turned on so I am not too worried about the overhead of compiling this support in - didn't notice much difference locally but also didn't get any hard numbers.

@jtojnar jtojnar merged commit 22ada10 into NixOS:master Mar 29, 2020
@Izorkin Izorkin deleted the samba4 branch March 29, 2020 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants